diff mbox

powerpc: Explicit alignment for .data.cacheline_aligned

Message ID 20090518051800.57B89DE05C@ozlabs.org (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Benjamin Herrenschmidt May 18, 2009, 5:17 a.m. UTC
I don't think anything guarantees that the objects in data.page_aligned
are a multiple of PAGE_SIZE, thus the section may end on any boundary.

So the following section, .data.cacheline_aligned needs an explicit
alignment.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

And this is the right patch after a "quilt ref" and without typo :-)

 arch/powerpc/kernel/vmlinux.lds.S |    1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

--- linux-work.orig/arch/powerpc/kernel/vmlinux.lds.S	2009-05-18 14:24:05.000000000 +1000
+++ linux-work/arch/powerpc/kernel/vmlinux.lds.S	2009-05-18 15:16:54.000000000 +1000
@@ -264,6 +264,7 @@  SECTIONS
 		*(.data.page_aligned)
 	}
 
+	. = ALIGN(L1_CACHE_BYTES);
 	.data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
 		*(.data.cacheline_aligned)
 	}