[PATCH 2/2] [POWERPC] Size swapper_pg_dir correctly

Kumar Gala galak at kernel.crashing.org
Thu Aug 23 13:26:35 EST 2007


On Aug 22, 2007, at 10:10 PM, Stephen Rothwell wrote:

> David Gibson pointed out that swapper_pg_dir actually need to be
> PGD_TABLE_SIZE bytes long not PAGE_SIZE.  This actually saves 64k in
> the bss for a ppc64_defconfig kernel built with CONFIG_PPC_64K_PAGES.
>
> Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
> ---
>  arch/powerpc/kernel/asm-offsets.c |    4 ++++
>  arch/powerpc/kernel/head_64.S     |    2 +-
>  include/asm-powerpc/pgtable-4k.h  |    2 ++
>  include/asm-powerpc/pgtable-64k.h |    2 ++
>  4 files changed, 9 insertions(+), 1 deletions(-)
>
> --  
> Cheers,
> Stephen Rothwell                    sfr at canb.auug.org.au
>
> diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/ 
> kernel/asm-offsets.c
> index a408053..0ae5d57 100644
> --- a/arch/powerpc/kernel/asm-offsets.c
> +++ b/arch/powerpc/kernel/asm-offsets.c
> @@ -320,5 +320,9 @@ int main(void)
>  	DEFINE(VMALLOC_START_ESID, GET_ESID(VMALLOC_START));
>  	DEFINE(VMALLOC_START_VSID, KERNEL_VSID(VMALLOC_START));
>  #endif
> +
> +#ifdef CONFIG_PPC64
> +	DEFINE(PGD_TABLE_SIZE, PGD_TABLE_SIZE);
> +#endif

Why limit this to ppc64?  The cleanup should be reasonable for all ppc.

- k






More information about the Linuxppc-dev mailing list