aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-gru/gru_instructions.h
diff options
context:
space:
mode:
authorJack Steiner <steiner@sgi.com>2009-06-17 19:28:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 16:03:59 -0400
commitcd1334f03f7b799bc6893b511daf2080e8f73863 (patch)
tree468d9bc99e19aa7895321927eaf30c4dae55166f /drivers/misc/sgi-gru/gru_instructions.h
parentd6580a9f15238b87e618310c862231ae3f352d2d (diff)
gru: bug fixes for GRU exception handling
Bug fixes for GRU exception handling. Additional fields from the CBR must be returned to the user to allow the user to correctly diagnose GRU exceptions. Handle endcase in TFH TLB miss handling. Verify that TFH actually indicates a pending exception. Signed-off-by: Jack Steiner <steiner@sgi.com> 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.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/misc/sgi-gru/gru_instructions.h b/drivers/misc/sgi-gru/gru_instructions.h
index 3fde33c1e8f3..2feb885ca96f 100644
--- a/drivers/misc/sgi-gru/gru_instructions.h
+++ b/drivers/misc/sgi-gru/gru_instructions.h
@@ -81,6 +81,8 @@ struct control_block_extended_exc_detail {
81 int exopc; 81 int exopc;
82 long exceptdet0; 82 long exceptdet0;
83 int exceptdet1; 83 int exceptdet1;
84 int cbrstate;
85 int cbrexecstatus;
84}; 86};
85 87
86/* 88/*
@@ -107,7 +109,8 @@ struct gru_instruction_bits {
107 unsigned char reserved2: 2; 109 unsigned char reserved2: 2;
108 unsigned char istatus: 2; 110 unsigned char istatus: 2;
109 unsigned char isubstatus:4; 111 unsigned char isubstatus:4;
110 unsigned char reserved3: 2; 112 unsigned char reserved3: 1;
113 unsigned char tlb_fault_color: 1;
111 /* DW 1 */ 114 /* DW 1 */
112 unsigned long idef4; /* 42 bits: TRi1, BufSize */ 115 unsigned long idef4; /* 42 bits: TRi1, BufSize */
113 /* DW 2-6 */ 116 /* DW 2-6 */
@@ -253,6 +256,21 @@ struct gru_instruction {
253#define CBE_CAUSE_RESPONSE_DATA_ERROR (1 << 16) 256#define CBE_CAUSE_RESPONSE_DATA_ERROR (1 << 16)
254#define CBE_CAUSE_PROTOCOL_STATE_DATA_ERROR (1 << 17) 257#define CBE_CAUSE_PROTOCOL_STATE_DATA_ERROR (1 << 17)
255 258
259/* CBE cbrexecstatus bits */
260#define CBR_EXS_ABORT_OCC_BIT 0
261#define CBR_EXS_INT_OCC_BIT 1
262#define CBR_EXS_PENDING_BIT 2
263#define CBR_EXS_QUEUED_BIT 3
264#define CBR_EXS_TLBHW_BIT 4
265#define CBR_EXS_EXCEPTION_BIT 5
266
267#define CBR_EXS_ABORT_OCC (1 << CBR_EXS_ABORT_OCC_BIT)
268#define CBR_EXS_INT_OCC (1 << CBR_EXS_INT_OCC_BIT)
269#define CBR_EXS_PENDING (1 << CBR_EXS_PENDING_BIT)
270#define CBR_EXS_QUEUED (1 << CBR_EXS_QUEUED_BIT)
271#define CBR_EXS_TLBHW (1 << CBR_EXS_TLBHW_BIT)
272#define CBR_EXS_EXCEPTION (1 << CBR_EXS_EXCEPTION_BIT)
273
256/* 274/*
257 * Exceptions are retried for the following cases. If any OTHER bits are set 275 * Exceptions are retried for the following cases. If any OTHER bits are set
258 * in ecause, the exception is not retryable. 276 * in ecause, the exception is not retryable.