[Patch 09/25] GRU - add software reserved bits to cbr definition

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: steiner
Date: Thursday, August 26, 2010 - 6:19 am

From: Jack Steiner <steiner@sgi.com>

The GRU hardware has reserved a few bits for software use.
Add these "software reserved" fields to the structure definitions.

Signed-off-by: Jack Steiner <steiner@sgi.com>

---
 drivers/misc/sgi-gru/gru_instructions.h |   19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

Index: linux/drivers/misc/sgi-gru/gru_instructions.h
===================================================================
--- linux.orig/drivers/misc/sgi-gru/gru_instructions.h	2010-06-09 08:11:38.907960603 -0500
+++ linux/drivers/misc/sgi-gru/gru_instructions.h	2010-06-09 08:11:43.303963161 -0500
@@ -112,7 +112,8 @@ struct gru_instruction_bits {
     unsigned char		reserved3: 1;
     unsigned char		tlb_fault_color: 1;
     /* DW 1 */
-    unsigned long		idef4;		/* 42 bits: TRi1, BufSize */
+    unsigned int		idef4;		/* 32 bits: TRi1, BufSize */
+    unsigned int		sw_reserved;
     /* DW 2-6 */
     unsigned long		idef1;		/* BAddr0 */
     unsigned long		idef5;		/* Nelem */
@@ -136,7 +137,13 @@ struct gru_instruction {
 		unsigned int	tri0;
 	};
     };
-    unsigned long		tri1_bufsize;		/* DW 1 */
+    union {
+	unsigned long		tri1_bufsize_64;	/* DW 1 */
+	struct {
+    		unsigned int	tri1_bufsize_32;
+		unsigned int	sw_reserved;
+	};
+    };
     unsigned long		baddr0;			/* DW 2 */
     unsigned long		nelem;			/* DW 3 */
     unsigned long		op1_stride;		/* DW 4 */
@@ -411,7 +418,7 @@ static inline void gru_ivload(void *cb,
 
 	ins->baddr0 = (long)mem_addr;
 	ins->nelem = nelem;
-	ins->tri1_bufsize = tri1;
+	ins->tri1_bufsize_64 = tri1;
 	gru_start_instruction(ins, __opdword(OP_IVLOAD, 0, xtype, IAA_RAM, 0,
 					tri0, CB_IMA(hints)));
 }
@@ -424,7 +431,7 @@ static inline void gru_ivstore(void *cb,
 
 	ins->baddr0 = (long)mem_addr;
 	ins->nelem = nelem;
-	ins->tri1_bufsize = tri1;
+	ins->tri1_bufsize_64 = tri1;
 	gru_start_instruction(ins, __opdword(OP_IVSTORE, 0, xtype, IAA_RAM, 0,
 					tri0, CB_IMA(hints)));
 }
@@ -452,7 +459,7 @@ static inline void gru_ivset(void *cb, u
 	ins->baddr0 = (long)mem_addr;
 	ins->op2_value_baddr1 = value;
 	ins->nelem = nelem;
-	ins->tri1_bufsize = tri1;
+	ins->tri1_bufsize_64 = tri1;
 	gru_start_instruction(ins, __opdword(OP_IVSET, 0, xtype, IAA_RAM, 0,
 					0, CB_IMA(hints)));
 }
@@ -488,7 +495,7 @@ static inline void gru_bcopy(void *cb, c
 	ins->baddr0 = (long)src;
 	ins->op2_value_baddr1 = (long)dest;
 	ins->nelem = nelem;
-	ins->tri1_bufsize = bufsize;
+	ins->tri1_bufsize_64 = bufsize;
 	gru_start_instruction(ins, __opdword(OP_BCOPY, 0, xtype, IAA_RAM,
 					IAA_RAM, tri0, CB_IMA(hints)));
 }

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[Patch 05/25] GRU - cbe cache flush, steiner, (Thu Aug 26, 6:19 am)
[Patch 06/25] GRU - change context stealing, steiner, (Thu Aug 26, 6:19 am)
[Patch 09/25] GRU - add software reserved bits to cbr defi ..., steiner, (Thu Aug 26, 6:19 am)
[Patch 13/25] GRU - delete obsolete debug code, steiner, (Thu Aug 26, 6:19 am)
[Patch 14/25] GRU - add polling for tlb misses, steiner, (Thu Aug 26, 6:19 am)
[Patch 15/25] GRU - reorder interrupt processing, steiner, (Thu Aug 26, 6:19 am)
[Patch 17/25] GRU - no panic on gru malfunction, steiner, (Thu Aug 26, 6:19 am)
[Patch 18/25] GRU - contexts must contain cbrs, steiner, (Thu Aug 26, 6:19 am)
[Patch 22/25] GRU - gru api cleanup, steiner, (Thu Aug 26, 6:19 am)
[Patch 23/25] GRU - update driverr version, steiner, (Thu Aug 26, 6:20 am)
[Patch 24/25] GRU - rename gru pagesize defines, steiner, (Thu Aug 26, 6:20 am)
[Patch 25/25] GRU - update cbrstate definitions, steiner, (Thu Aug 26, 6:20 am)