diff options
| author | Anton Blanchard <anton@samba.org> | 2002-05-02 13:01:43 +1000 |
|---|---|---|
| committer | Anton Blanchard <anton@samba.org> | 2002-05-02 13:01:43 +1000 |
| commit | de8aec0426f98611dff9d3d557785ac2873653e2 (patch) | |
| tree | 1602867519d82cd45941ad24fe1bc53712f062f7 /include/asm-ppc64/memory.h | |
| parent | e8812777bc1b1f24890e24519000876f888543ec (diff) | |
ppc64: Only implement thread priority macros on HMT or iSeries kernels
Drop back to eieio in spinlocks for the moment due to performance
issues of sync on power3
Diffstat (limited to 'include/asm-ppc64/memory.h')
| -rw-r--r-- | include/asm-ppc64/memory.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/asm-ppc64/memory.h b/include/asm-ppc64/memory.h index 25d0fb6f6a90..60ece9cc43b8 100644 --- a/include/asm-ppc64/memory.h +++ b/include/asm-ppc64/memory.h @@ -41,4 +41,24 @@ static inline void isync(void) #define isync_on_smp() __asm__ __volatile__("": : :"memory") #endif +/* Macros for adjusting thread priority (hardware multi-threading) */ + +#if defined(CONFIG_PPC_ISERIES) || defined(CONFIG_HMT) +#define HMT_low() asm volatile("or 1,1,1 # low priority") +#define HMT_medium() asm volatile("or 2,2,2 # medium priority") +#define HMT_high() asm volatile("or 3,3,3 # high priority") + +#define HMT_LOW "\tor 1,1,1 # low priority\n" +#define HMT_MEDIUM "\tor 2,2,2 # medium priority\n" +#define HMT_MEDIUM "\tor 3,3,3 # high priority\n" +#else +#define HMT_low() do { } while(0) +#define HMT_medium() do { } while(0) +#define HMT_high() do { } while(0) + +#define HMT_LOW +#define HMT_MEDIUM +#define HMT_LOW +#endif + #endif |
