21 #include <linux/kernel.h>
28 #include <asm/processor.h>
29 #define GRU_OPERATION_TIMEOUT (((cycles_t) local_cpu_data->itc_freq)*10)
30 #define CLKS2NSEC(c) ((c) *1000000000 / local_cpu_data->itc_freq)
33 #define GRU_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000)
34 #define CLKS2NSEC(c) ((c) * 1000000 / tsc_khz)
38 #define GET_MSEG_HANDLE_STATUS(h) (((*(unsigned long *)(h)) >> 16) & 3)
42 static void update_mcs_stats(
enum mcs_op op,
unsigned long clks)
53 static void start_instruction(
void *
h)
55 unsigned long *
w0 =
h;
62 static void report_instruction_timeout(
void *
h)
64 unsigned long goff =
GSEGPOFF((
unsigned long)h);
77 static int wait_instruction_complete(
void *h,
enum mcs_op opc)
88 report_instruction_timeout(h);
93 update_mcs_stats(opc,
get_cycles() - start_time);
102 start_instruction(cch);
116 start_instruction(cch);
117 return wait_instruction_complete(cch,
cchop_start);
123 start_instruction(cch);
132 start_instruction(cch);
147 start_instruction(cch);
152 unsigned long vaddr,
unsigned long vaddrmask,
153 int asid,
int pagesize,
int global,
int n,
154 unsigned short ctxbitmap)
164 start_instruction(tgh);
169 unsigned long paddr,
int gaa,
180 start_instruction(tfh);
185 unsigned long paddr,
int gaa,
196 start_instruction(tfh);
202 start_instruction(tfh);
208 start_instruction(tfh);
214 start_instruction(tfh);