aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/asm-offsets.c
diff options
context:
space:
mode:
authorTrent Piepho <tpiepho@freescale.com>2008-12-08 22:34:55 -0500
committerKumar Gala <galak@kernel.crashing.org>2009-01-07 16:33:06 -0500
commit19f5465e823858a2f0b0e9a92e52816ba3ee70bb (patch)
tree4e4112f7d8e5a3699df5e808a83ac9eed44bd8d7 /arch/powerpc/kernel/asm-offsets.c
parent565f37642c78754a85efe6c20a4a15e18ed21f07 (diff)
powerpc/fsl-booke: Don't hard-code size of struct tlbcam
Some assembly code in head_fsl_booke.S hard-coded the size of struct tlbcam to 20 when it indexed the TLBCAM table. Anyone changing the size of struct tlbcam would not know to expect that. The kernel already has a system to get the size of C structures into assembly language files, asm-offsets, so let's use it. The definition of the struct gets moved to a header, so that asm-offsets.c can include it. Signed-off-by: Trent Piepho <tpiepho@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/asm-offsets.c')
-rw-r--r--arch/powerpc/kernel/asm-offsets.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 661d07d2146b..06958da94f17 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -56,6 +56,10 @@
56#include "head_booke.h" 56#include "head_booke.h"
57#endif 57#endif
58 58
59#if defined(CONFIG_FSL_BOOKE)
60#include "../mm/mmu_decl.h"
61#endif
62
59int main(void) 63int main(void)
60{ 64{
61 DEFINE(THREAD, offsetof(struct task_struct, thread)); 65 DEFINE(THREAD, offsetof(struct task_struct, thread));
@@ -384,6 +388,9 @@ int main(void)
384 DEFINE(PGD_T_LOG2, PGD_T_LOG2); 388 DEFINE(PGD_T_LOG2, PGD_T_LOG2);
385 DEFINE(PTE_T_LOG2, PTE_T_LOG2); 389 DEFINE(PTE_T_LOG2, PTE_T_LOG2);
386#endif 390#endif
391#ifdef CONFIG_FSL_BOOKE
392 DEFINE(TLBCAM_SIZE, sizeof(struct tlbcam));
393#endif
387 394
388 return 0; 395 return 0;
389} 396}