diff options
Diffstat (limited to 'drivers/misc/sgi-gru/grutables.h')
-rw-r--r-- | drivers/misc/sgi-gru/grutables.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/misc/sgi-gru/grutables.h b/drivers/misc/sgi-gru/grutables.h index 4ddb5b92acbb..1c85fdcf5d37 100644 --- a/drivers/misc/sgi-gru/grutables.h +++ b/drivers/misc/sgi-gru/grutables.h | |||
@@ -174,9 +174,12 @@ struct gru_stats_s { | |||
174 | atomic_long_t assign_context; | 174 | atomic_long_t assign_context; |
175 | atomic_long_t assign_context_failed; | 175 | atomic_long_t assign_context_failed; |
176 | atomic_long_t free_context; | 176 | atomic_long_t free_context; |
177 | atomic_long_t load_context; | 177 | atomic_long_t load_user_context; |
178 | atomic_long_t unload_context; | 178 | atomic_long_t load_kernel_context; |
179 | atomic_long_t steal_context; | 179 | atomic_long_t lock_kernel_context; |
180 | atomic_long_t unlock_kernel_context; | ||
181 | atomic_long_t steal_user_context; | ||
182 | atomic_long_t steal_kernel_context; | ||
180 | atomic_long_t steal_context_failed; | 183 | atomic_long_t steal_context_failed; |
181 | atomic_long_t nopfn; | 184 | atomic_long_t nopfn; |
182 | atomic_long_t break_cow; | 185 | atomic_long_t break_cow; |
@@ -454,6 +457,9 @@ struct gru_blade_state { | |||
454 | reserved cb */ | 457 | reserved cb */ |
455 | void *kernel_dsr; /* First kernel | 458 | void *kernel_dsr; /* First kernel |
456 | reserved DSR */ | 459 | reserved DSR */ |
460 | struct rw_semaphore bs_kgts_sema; /* lock for kgts */ | ||
461 | struct gru_thread_state *bs_kgts; /* GTS for kernel use */ | ||
462 | |||
457 | /* ---- the following are protected by the bs_lock spinlock ---- */ | 463 | /* ---- the following are protected by the bs_lock spinlock ---- */ |
458 | spinlock_t bs_lock; /* lock used for | 464 | spinlock_t bs_lock; /* lock used for |
459 | stealing contexts */ | 465 | stealing contexts */ |
@@ -597,6 +603,11 @@ static inline void unlock_tgh_handle(struct gru_tlb_global_handle *tgh) | |||
597 | __unlock_handle(tgh); | 603 | __unlock_handle(tgh); |
598 | } | 604 | } |
599 | 605 | ||
606 | static inline int is_kernel_context(struct gru_thread_state *gts) | ||
607 | { | ||
608 | return !gts->ts_mm; | ||
609 | } | ||
610 | |||
600 | /*----------------------------------------------------------------------------- | 611 | /*----------------------------------------------------------------------------- |
601 | * Function prototypes & externs | 612 | * Function prototypes & externs |
602 | */ | 613 | */ |