diff options
author | Jack Steiner <steiner@sgi.com> | 2009-04-02 19:59:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-02 22:05:05 -0400 |
commit | fe5bb6b00c3a9374841d651e01694fe4190a677e (patch) | |
tree | 8580ba3dac70d236261557a458df535cdc0e2acd /drivers/misc/sgi-gru/grutables.h | |
parent | 66666e50fcd69d80117d7d243ce02e1f774cbaf5 (diff) |
sgi-gru: misc GRU cleanup
Misc trivial GRU drivers fixes:
- fix long lines
- eliminate extra whitespace
- eliminate compiler warning
- better validation of invalidate user parameters
- bug fix for GRU TLB flush (not the cpu TLB flush)
These changes are all internal to the SGI GRU driver and have no effect
on the base kernel.
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/grutables.h')
-rw-r--r-- | drivers/misc/sgi-gru/grutables.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/misc/sgi-gru/grutables.h b/drivers/misc/sgi-gru/grutables.h index a78f70deeb59..db3fe08bf79e 100644 --- a/drivers/misc/sgi-gru/grutables.h +++ b/drivers/misc/sgi-gru/grutables.h | |||
@@ -278,13 +278,12 @@ struct gru_stats_s { | |||
278 | /* Generate a GRU asid value from a GRU base asid & a virtual address. */ | 278 | /* Generate a GRU asid value from a GRU base asid & a virtual address. */ |
279 | #if defined CONFIG_IA64 | 279 | #if defined CONFIG_IA64 |
280 | #define VADDR_HI_BIT 64 | 280 | #define VADDR_HI_BIT 64 |
281 | #define GRUREGION(addr) ((addr) >> (VADDR_HI_BIT - 3) & 3) | ||
282 | #elif defined CONFIG_X86_64 | 281 | #elif defined CONFIG_X86_64 |
283 | #define VADDR_HI_BIT 48 | 282 | #define VADDR_HI_BIT 48 |
284 | #define GRUREGION(addr) (0) /* ZZZ could do better */ | ||
285 | #else | 283 | #else |
286 | #error "Unsupported architecture" | 284 | #error "Unsupported architecture" |
287 | #endif | 285 | #endif |
286 | #define GRUREGION(addr) ((addr) >> (VADDR_HI_BIT - 3) & 3) | ||
288 | #define GRUASID(asid, addr) ((asid) + GRUREGION(addr)) | 287 | #define GRUASID(asid, addr) ((asid) + GRUREGION(addr)) |
289 | 288 | ||
290 | /*------------------------------------------------------------------------------ | 289 | /*------------------------------------------------------------------------------ |
@@ -297,12 +296,12 @@ struct gru_state; | |||
297 | * This structure is pointed to from the mmstruct via the notifier pointer. | 296 | * This structure is pointed to from the mmstruct via the notifier pointer. |
298 | * There is one of these per address space. | 297 | * There is one of these per address space. |
299 | */ | 298 | */ |
300 | struct gru_mm_tracker { | 299 | struct gru_mm_tracker { /* pack to reduce size */ |
301 | unsigned int mt_asid_gen; /* ASID wrap count */ | 300 | unsigned int mt_asid_gen:24; /* ASID wrap count */ |
302 | int mt_asid; /* current base ASID for gru */ | 301 | unsigned int mt_asid:24; /* current base ASID for gru */ |
303 | unsigned short mt_ctxbitmap; /* bitmap of contexts using | 302 | unsigned short mt_ctxbitmap:16;/* bitmap of contexts using |
304 | asid */ | 303 | asid */ |
305 | }; | 304 | } __attribute__ ((packed)); |
306 | 305 | ||
307 | struct gru_mm_struct { | 306 | struct gru_mm_struct { |
308 | struct mmu_notifier ms_notifier; | 307 | struct mmu_notifier ms_notifier; |
@@ -359,6 +358,8 @@ struct gru_thread_state { | |||
359 | required for contest */ | 358 | required for contest */ |
360 | unsigned char ts_cbr_au_count;/* Number of CBR resources | 359 | unsigned char ts_cbr_au_count;/* Number of CBR resources |
361 | required for contest */ | 360 | required for contest */ |
361 | char ts_blade; /* If >= 0, migrate context if | ||
362 | ref from diferent blade */ | ||
362 | char ts_force_unload;/* force context to be unloaded | 363 | char ts_force_unload;/* force context to be unloaded |
363 | after migration */ | 364 | after migration */ |
364 | char ts_cbr_idx[GRU_CBR_AU];/* CBR numbers of each | 365 | char ts_cbr_idx[GRU_CBR_AU];/* CBR numbers of each |