[PATCH 1/5] powerpc: booke: Don't hard-code size of struct tlbcam

Kumar Gala galak at kernel.crashing.org
Thu Jan 8 03:03:52 EST 2009


On Dec 8, 2008, at 9:34 PM, Trent Piepho wrote:

> 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 at freescale.com>
> ---
> arch/powerpc/kernel/asm-offsets.c    |    8 ++++++++
> arch/powerpc/kernel/head_fsl_booke.S |    2 +-
> arch/powerpc/mm/fsl_booke_mmu.c      |    8 +-------
> arch/powerpc/mm/mmu_decl.h           |    9 +++++++++
> 4 files changed, 19 insertions(+), 8 deletions(-)

applied to next

- k



More information about the Linuxppc-dev mailing list