diff options
Diffstat (limited to 'drivers/misc/sgi-gru/gruhandles.h')
-rw-r--r-- | drivers/misc/sgi-gru/gruhandles.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/misc/sgi-gru/gruhandles.h b/drivers/misc/sgi-gru/gruhandles.h index 47b762f89e0d..ea584ebf65b1 100644 --- a/drivers/misc/sgi-gru/gruhandles.h +++ b/drivers/misc/sgi-gru/gruhandles.h | |||
@@ -164,6 +164,16 @@ static inline void *gru_chiplet_vaddr(void *vaddr, int pnode, int chiplet) | |||
164 | return vaddr + GRU_SIZE * (2 * pnode + chiplet); | 164 | return vaddr + GRU_SIZE * (2 * pnode + chiplet); |
165 | } | 165 | } |
166 | 166 | ||
167 | static inline struct gru_control_block_extended *gru_tfh_to_cbe( | ||
168 | struct gru_tlb_fault_handle *tfh) | ||
169 | { | ||
170 | unsigned long cbe; | ||
171 | |||
172 | cbe = (unsigned long)tfh - GRU_TFH_BASE + GRU_CBE_BASE; | ||
173 | return (struct gru_control_block_extended*)cbe; | ||
174 | } | ||
175 | |||
176 | |||
167 | 177 | ||
168 | 178 | ||
169 | /* | 179 | /* |
@@ -446,6 +456,12 @@ struct gru_control_block_extended { | |||
446 | unsigned int cbrexecstatus:8; | 456 | unsigned int cbrexecstatus:8; |
447 | }; | 457 | }; |
448 | 458 | ||
459 | /* CBE fields for active BCOPY instructions */ | ||
460 | #define cbe_baddr0 idef1upd | ||
461 | #define cbe_baddr1 idef3upd | ||
462 | #define cbe_src_cl idef6cpy | ||
463 | #define cbe_nelemcur idef5upd | ||
464 | |||
449 | enum gru_cbr_state { | 465 | enum gru_cbr_state { |
450 | CBRSTATE_INACTIVE, | 466 | CBRSTATE_INACTIVE, |
451 | CBRSTATE_IDLE, | 467 | CBRSTATE_IDLE, |
@@ -493,8 +509,8 @@ int cch_interrupt_sync(struct gru_context_configuration_handle *cch); | |||
493 | int tgh_invalidate(struct gru_tlb_global_handle *tgh, unsigned long vaddr, | 509 | int tgh_invalidate(struct gru_tlb_global_handle *tgh, unsigned long vaddr, |
494 | unsigned long vaddrmask, int asid, int pagesize, int global, int n, | 510 | unsigned long vaddrmask, int asid, int pagesize, int global, int n, |
495 | unsigned short ctxbitmap); | 511 | unsigned short ctxbitmap); |
496 | void tfh_write_only(struct gru_tlb_fault_handle *tfh, unsigned long pfn, | 512 | int tfh_write_only(struct gru_tlb_fault_handle *tfh, unsigned long paddr, |
497 | unsigned long vaddr, int asid, int dirty, int pagesize); | 513 | int gaa, unsigned long vaddr, int asid, int dirty, int pagesize); |
498 | void tfh_write_restart(struct gru_tlb_fault_handle *tfh, unsigned long paddr, | 514 | void tfh_write_restart(struct gru_tlb_fault_handle *tfh, unsigned long paddr, |
499 | int gaa, unsigned long vaddr, int asid, int dirty, int pagesize); | 515 | int gaa, unsigned long vaddr, int asid, int dirty, int pagesize); |
500 | void tfh_restart(struct gru_tlb_fault_handle *tfh); | 516 | void tfh_restart(struct gru_tlb_fault_handle *tfh); |