diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/lppaca.h | 6 | ||||
-rw-r--r-- | include/asm-powerpc/paca.h | 14 | ||||
-rw-r--r-- | include/asm-powerpc/spinlock.h | 2 | ||||
-rw-r--r-- | include/asm-powerpc/time.h | 5 |
4 files changed, 9 insertions, 18 deletions
diff --git a/include/asm-powerpc/lppaca.h b/include/asm-powerpc/lppaca.h index ff82ea7c4829..cd9f11f1ef14 100644 --- a/include/asm-powerpc/lppaca.h +++ b/include/asm-powerpc/lppaca.h | |||
@@ -29,7 +29,9 @@ | |||
29 | //---------------------------------------------------------------------------- | 29 | //---------------------------------------------------------------------------- |
30 | #include <asm/types.h> | 30 | #include <asm/types.h> |
31 | 31 | ||
32 | struct lppaca { | 32 | /* The Hypervisor barfs if the lppaca crosses a page boundary. A 1k |
33 | * alignment is sufficient to prevent this */ | ||
34 | struct __attribute__((__aligned__(0x400))) lppaca { | ||
33 | //============================================================================= | 35 | //============================================================================= |
34 | // CACHE_LINE_1 0x0000 - 0x007F Contains read-only data | 36 | // CACHE_LINE_1 0x0000 - 0x007F Contains read-only data |
35 | // NOTE: The xDynXyz fields are fields that will be dynamically changed by | 37 | // NOTE: The xDynXyz fields are fields that will be dynamically changed by |
@@ -129,5 +131,7 @@ struct lppaca { | |||
129 | u8 pmc_save_area[256]; // PMC interrupt Area x00-xFF | 131 | u8 pmc_save_area[256]; // PMC interrupt Area x00-xFF |
130 | }; | 132 | }; |
131 | 133 | ||
134 | extern struct lppaca lppaca[]; | ||
135 | |||
132 | #endif /* __KERNEL__ */ | 136 | #endif /* __KERNEL__ */ |
133 | #endif /* _ASM_POWERPC_LPPACA_H */ | 137 | #endif /* _ASM_POWERPC_LPPACA_H */ |
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index a64b4d425dab..c9add8f1ad94 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | register struct paca_struct *local_paca asm("r13"); | 24 | register struct paca_struct *local_paca asm("r13"); |
25 | #define get_paca() local_paca | 25 | #define get_paca() local_paca |
26 | #define get_lppaca() (get_paca()->lppaca_ptr) | ||
26 | 27 | ||
27 | struct task_struct; | 28 | struct task_struct; |
28 | 29 | ||
@@ -95,19 +96,6 @@ struct paca_struct { | |||
95 | u64 saved_r1; /* r1 save for RTAS calls */ | 96 | u64 saved_r1; /* r1 save for RTAS calls */ |
96 | u64 saved_msr; /* MSR saved here by enter_rtas */ | 97 | u64 saved_msr; /* MSR saved here by enter_rtas */ |
97 | u8 proc_enabled; /* irq soft-enable flag */ | 98 | u8 proc_enabled; /* irq soft-enable flag */ |
98 | |||
99 | /* | ||
100 | * iSeries structure which the hypervisor knows about - | ||
101 | * this structure should not cross a page boundary. | ||
102 | * The vpa_init/register_vpa call is now known to fail if the | ||
103 | * lppaca structure crosses a page boundary. | ||
104 | * The lppaca is also used on POWER5 pSeries boxes. | ||
105 | * The lppaca is 640 bytes long, and cannot readily change | ||
106 | * since the hypervisor knows its layout, so a 1kB | ||
107 | * alignment will suffice to ensure that it doesn't | ||
108 | * cross a page boundary. | ||
109 | */ | ||
110 | struct lppaca lppaca __attribute__((__aligned__(0x400))); | ||
111 | }; | 99 | }; |
112 | 100 | ||
113 | extern struct paca_struct paca[]; | 101 | extern struct paca_struct paca[]; |
diff --git a/include/asm-powerpc/spinlock.h b/include/asm-powerpc/spinlock.h index 754900901cd8..26b8744ed529 100644 --- a/include/asm-powerpc/spinlock.h +++ b/include/asm-powerpc/spinlock.h | |||
@@ -80,7 +80,7 @@ static int __inline__ __raw_spin_trylock(raw_spinlock_t *lock) | |||
80 | 80 | ||
81 | #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) | 81 | #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) |
82 | /* We only yield to the hypervisor if we are in shared processor mode */ | 82 | /* We only yield to the hypervisor if we are in shared processor mode */ |
83 | #define SHARED_PROCESSOR (get_paca()->lppaca.shared_proc) | 83 | #define SHARED_PROCESSOR (get_lppaca()->shared_proc) |
84 | extern void __spin_yield(raw_spinlock_t *lock); | 84 | extern void __spin_yield(raw_spinlock_t *lock); |
85 | extern void __rw_yield(raw_rwlock_t *lock); | 85 | extern void __rw_yield(raw_rwlock_t *lock); |
86 | #else /* SPLPAR || ISERIES */ | 86 | #else /* SPLPAR || ISERIES */ |
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h index d9b86a17271b..baddc9ab57ad 100644 --- a/include/asm-powerpc/time.h +++ b/include/asm-powerpc/time.h | |||
@@ -175,11 +175,10 @@ static inline void set_dec(int val) | |||
175 | set_dec_cpu6(val); | 175 | set_dec_cpu6(val); |
176 | #else | 176 | #else |
177 | #ifdef CONFIG_PPC_ISERIES | 177 | #ifdef CONFIG_PPC_ISERIES |
178 | struct paca_struct *lpaca = get_paca(); | ||
179 | int cur_dec; | 178 | int cur_dec; |
180 | 179 | ||
181 | if (lpaca->lppaca.shared_proc) { | 180 | if (get_lppaca()->shared_proc) { |
182 | lpaca->lppaca.virtual_decr = val; | 181 | get_lppaca()->virtual_decr = val; |
183 | cur_dec = get_dec(); | 182 | cur_dec = get_dec(); |
184 | if (cur_dec > val) | 183 | if (cur_dec > val) |
185 | HvCall_setVirtualDecr(); | 184 | HvCall_setVirtualDecr(); |