aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/asm-offsets.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-06-02 17:17:41 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-06-09 02:47:38 -0400
commit91c60b5b8209627590b31c07262e40c27d27d272 (patch)
tree02b8cd432bc4206f5064aab192b160a93355414b /arch/powerpc/kernel/asm-offsets.c
parent0ebc4cdaa3fd7c9144d15fe9a6bcfcd310c265b8 (diff)
powerpc: Separate PACA fields for server CPUs
This patch has no effect other than re-ordering PACA fields on current server CPUs. It however is a pre-requisite for future support of BookE 64-bit processors. Various parts of the PACA struct are now moved under some ifdef's, either the new CONFIG_PPC_BOOK3S or CONFIG_PPC_STD_MMU_64, whatever seems more appropriate. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.craashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/asm-offsets.c')
-rw-r--r--arch/powerpc/kernel/asm-offsets.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 1e40bc053946..ce90c570cd8e 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -122,8 +122,6 @@ int main(void)
122 DEFINE(PACAKSAVE, offsetof(struct paca_struct, kstack)); 122 DEFINE(PACAKSAVE, offsetof(struct paca_struct, kstack));
123 DEFINE(PACACURRENT, offsetof(struct paca_struct, __current)); 123 DEFINE(PACACURRENT, offsetof(struct paca_struct, __current));
124 DEFINE(PACASAVEDMSR, offsetof(struct paca_struct, saved_msr)); 124 DEFINE(PACASAVEDMSR, offsetof(struct paca_struct, saved_msr));
125 DEFINE(PACASTABREAL, offsetof(struct paca_struct, stab_real));
126 DEFINE(PACASTABVIRT, offsetof(struct paca_struct, stab_addr));
127 DEFINE(PACASTABRR, offsetof(struct paca_struct, stab_rr)); 125 DEFINE(PACASTABRR, offsetof(struct paca_struct, stab_rr));
128 DEFINE(PACAR1, offsetof(struct paca_struct, saved_r1)); 126 DEFINE(PACAR1, offsetof(struct paca_struct, saved_r1));
129 DEFINE(PACATOC, offsetof(struct paca_struct, kernel_toc)); 127 DEFINE(PACATOC, offsetof(struct paca_struct, kernel_toc));
@@ -131,35 +129,30 @@ int main(void)
131 DEFINE(PACAKMSR, offsetof(struct paca_struct, kernel_msr)); 129 DEFINE(PACAKMSR, offsetof(struct paca_struct, kernel_msr));
132 DEFINE(PACASOFTIRQEN, offsetof(struct paca_struct, soft_enabled)); 130 DEFINE(PACASOFTIRQEN, offsetof(struct paca_struct, soft_enabled));
133 DEFINE(PACAHARDIRQEN, offsetof(struct paca_struct, hard_enabled)); 131 DEFINE(PACAHARDIRQEN, offsetof(struct paca_struct, hard_enabled));
134 DEFINE(PACASLBCACHE, offsetof(struct paca_struct, slb_cache));
135 DEFINE(PACASLBCACHEPTR, offsetof(struct paca_struct, slb_cache_ptr));
136 DEFINE(PACACONTEXTID, offsetof(struct paca_struct, context.id)); 132 DEFINE(PACACONTEXTID, offsetof(struct paca_struct, context.id));
137 DEFINE(PACAVMALLOCSLLP, offsetof(struct paca_struct, vmalloc_sllp));
138#ifdef CONFIG_PPC_MM_SLICES 133#ifdef CONFIG_PPC_MM_SLICES
139 DEFINE(PACALOWSLICESPSIZE, offsetof(struct paca_struct, 134 DEFINE(PACALOWSLICESPSIZE, offsetof(struct paca_struct,
140 context.low_slices_psize)); 135 context.low_slices_psize));
141 DEFINE(PACAHIGHSLICEPSIZE, offsetof(struct paca_struct, 136 DEFINE(PACAHIGHSLICEPSIZE, offsetof(struct paca_struct,
142 context.high_slices_psize)); 137 context.high_slices_psize));
143 DEFINE(MMUPSIZEDEFSIZE, sizeof(struct mmu_psize_def)); 138 DEFINE(MMUPSIZEDEFSIZE, sizeof(struct mmu_psize_def));
139#endif /* CONFIG_PPC_MM_SLICES */
140#ifdef CONFIG_PPC_STD_MMU_64
141 DEFINE(PACASTABREAL, offsetof(struct paca_struct, stab_real));
142 DEFINE(PACASTABVIRT, offsetof(struct paca_struct, stab_addr));
143 DEFINE(PACASLBCACHE, offsetof(struct paca_struct, slb_cache));
144 DEFINE(PACASLBCACHEPTR, offsetof(struct paca_struct, slb_cache_ptr));
145 DEFINE(PACAVMALLOCSLLP, offsetof(struct paca_struct, vmalloc_sllp));
146#ifdef CONFIG_PPC_MM_SLICES
144 DEFINE(MMUPSIZESLLP, offsetof(struct mmu_psize_def, sllp)); 147 DEFINE(MMUPSIZESLLP, offsetof(struct mmu_psize_def, sllp));
145#else 148#else
146 DEFINE(PACACONTEXTSLLP, offsetof(struct paca_struct, context.sllp)); 149 DEFINE(PACACONTEXTSLLP, offsetof(struct paca_struct, context.sllp));
147
148#endif /* CONFIG_PPC_MM_SLICES */ 150#endif /* CONFIG_PPC_MM_SLICES */
149 DEFINE(PACA_EXGEN, offsetof(struct paca_struct, exgen)); 151 DEFINE(PACA_EXGEN, offsetof(struct paca_struct, exgen));
150 DEFINE(PACA_EXMC, offsetof(struct paca_struct, exmc)); 152 DEFINE(PACA_EXMC, offsetof(struct paca_struct, exmc));
151 DEFINE(PACA_EXSLB, offsetof(struct paca_struct, exslb)); 153 DEFINE(PACA_EXSLB, offsetof(struct paca_struct, exslb));
152 DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp));
153 DEFINE(PACALPPACAPTR, offsetof(struct paca_struct, lppaca_ptr)); 154 DEFINE(PACALPPACAPTR, offsetof(struct paca_struct, lppaca_ptr));
154 DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id));
155 DEFINE(PACA_STARTPURR, offsetof(struct paca_struct, startpurr));
156 DEFINE(PACA_STARTSPURR, offsetof(struct paca_struct, startspurr));
157 DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time));
158 DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time));
159 DEFINE(PACA_SLBSHADOWPTR, offsetof(struct paca_struct, slb_shadow_ptr)); 155 DEFINE(PACA_SLBSHADOWPTR, offsetof(struct paca_struct, slb_shadow_ptr));
160 DEFINE(PACA_DATA_OFFSET, offsetof(struct paca_struct, data_offset));
161 DEFINE(PACA_TRAP_SAVE, offsetof(struct paca_struct, trap_save));
162
163 DEFINE(SLBSHADOW_STACKVSID, 156 DEFINE(SLBSHADOW_STACKVSID,
164 offsetof(struct slb_shadow, save_area[SLB_NUM_BOLTED - 1].vsid)); 157 offsetof(struct slb_shadow, save_area[SLB_NUM_BOLTED - 1].vsid));
165 DEFINE(SLBSHADOW_STACKESID, 158 DEFINE(SLBSHADOW_STACKESID,
@@ -169,6 +162,15 @@ int main(void)
169 DEFINE(LPPACAANYINT, offsetof(struct lppaca, int_dword.any_int)); 162 DEFINE(LPPACAANYINT, offsetof(struct lppaca, int_dword.any_int));
170 DEFINE(LPPACADECRINT, offsetof(struct lppaca, int_dword.fields.decr_int)); 163 DEFINE(LPPACADECRINT, offsetof(struct lppaca, int_dword.fields.decr_int));
171 DEFINE(SLBSHADOW_SAVEAREA, offsetof(struct slb_shadow, save_area)); 164 DEFINE(SLBSHADOW_SAVEAREA, offsetof(struct slb_shadow, save_area));
165#endif /* CONFIG_PPC_STD_MMU_64 */
166 DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp));
167 DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id));
168 DEFINE(PACA_STARTPURR, offsetof(struct paca_struct, startpurr));
169 DEFINE(PACA_STARTSPURR, offsetof(struct paca_struct, startspurr));
170 DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time));
171 DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time));
172 DEFINE(PACA_DATA_OFFSET, offsetof(struct paca_struct, data_offset));
173 DEFINE(PACA_TRAP_SAVE, offsetof(struct paca_struct, trap_save));
172#endif /* CONFIG_PPC64 */ 174#endif /* CONFIG_PPC64 */
173 175
174 /* RTAS */ 176 /* RTAS */