aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-gru/gru_instructions.h
diff options
context:
space:
mode:
authorRobin Holt <holt@sgi.com>2009-12-15 19:47:55 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 10:20:13 -0500
commit289750d1f1fd4a715baa2a2c6dd0cec2b8317fd7 (patch)
tree2c525297c460a9ab98b9649eb3021e534a8e77fd /drivers/misc/sgi-gru/gru_instructions.h
parentfae419f2abd15ab7d1cd1413e6683a276a4e14e2 (diff)
X86: uv: implement a gru_read_gpa kernel function
The BIOS has decided to store a pointer to the partition reserved page in a scratch MMR. The GRU is only able to read an MMR using a vload instruction. The gru_read_gpa() function will implemented. Signed-off-by: Robin Holt <holt@sgi.com> Signed-off-by: Jack Steiner <steiner@sgi.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/sgi-gru/gru_instructions.h')
-rw-r--r--drivers/misc/sgi-gru/gru_instructions.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/misc/sgi-gru/gru_instructions.h b/drivers/misc/sgi-gru/gru_instructions.h
index 3c9c06618e6a..e033b6ce4a3f 100644
--- a/drivers/misc/sgi-gru/gru_instructions.h
+++ b/drivers/misc/sgi-gru/gru_instructions.h
@@ -340,6 +340,19 @@ static inline void gru_start_instruction(struct gru_instruction *ins, int op32)
340 * - nelem and stride are in elements 340 * - nelem and stride are in elements
341 * - tri0/tri1 is in bytes for the beginning of the data segment. 341 * - tri0/tri1 is in bytes for the beginning of the data segment.
342 */ 342 */
343static inline void gru_vload_phys(void *cb, unsigned long gpa,
344 unsigned int tri0, int iaa, unsigned long hints)
345{
346 struct gru_instruction *ins = (struct gru_instruction *)cb;
347
348 ins->baddr0 = (long)gpa | ((unsigned long)iaa << 62);
349 ins->nelem = 1;
350 ins->tri0 = tri0;
351 ins->op1_stride = 1;
352 gru_start_instruction(ins, __opword(OP_VLOAD, 0, XTYPE_DW, iaa, 0,
353 CB_IMA(hints)));
354}
355
343static inline void gru_vload(void *cb, unsigned long mem_addr, 356static inline void gru_vload(void *cb, unsigned long mem_addr,
344 unsigned int tri0, unsigned char xtype, unsigned long nelem, 357 unsigned int tri0, unsigned char xtype, unsigned long nelem,
345 unsigned long stride, unsigned long hints) 358 unsigned long stride, unsigned long hints)