[PATCH 8/8] Move variables in ppc64 head.S from .data to .bss

David Gibson david at gibson.dropbear.id.au
Mon Aug 1 15:53:59 EST 2005


The ppc64 head.S defines several zero-initialized structures, such as
the empty_zero_page and the kernel top-level pagetable.  Currently
they are defined to be in the data section.  However, they're not used
until after the bss is cleared, so this patch moves them to the bss,
saving two and a half pages from the vmlinux.

Signed-off-by: David Gibson <dwg at au1.ibm.com>

 arch/ppc64/kernel/head.S |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

Index: working-2.6/arch/ppc64/kernel/head.S
===================================================================
--- working-2.6.orig/arch/ppc64/kernel/head.S	2005-07-28 15:07:47.000000000 +1000
+++ working-2.6/arch/ppc64/kernel/head.S	2005-07-28 15:52:43.000000000 +1000
@@ -1970,20 +1970,19 @@
 
 /*
  * We put a few things here that have to be page-aligned.
- * This stuff goes at the beginning of the data segment,
- * which is page-aligned.
+ * This stuff goes at the beginning of the bss, which is page-aligned.
  */
-	.data
+	.section ".bss"
+
 	.align	12
-	.globl	sdata
-sdata:
+
 	.globl	empty_zero_page
 empty_zero_page:
-	.space	4096
+	.space	PAGE_SIZE
 
 	.globl	swapper_pg_dir
 swapper_pg_dir:
-	.space	4096
+	.space	PAGE_SIZE
 
 /*
  * This space gets a copy of optional info passed to us by the bootstrap



More information about the Linuxppc64-dev mailing list