* [PATCH] powerpc: Explicit alignment for .data.cacheline_aligned
@ 2009-05-18 5:17 Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2009-05-18 5:17 UTC (permalink / raw)
To: linuxppc-dev
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(+)
--- 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)
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] powerpc: Explicit alignment for .data.cacheline_aligned
@ 2009-05-18 4:29 Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2009-05-18 4:29 UTC (permalink / raw)
To: linuxppc-dev
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>
---
arch/powerpc/kernel/vmlinux.lds.S | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- 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 14:24:22.000000000 +1000
@@ -264,7 +264,8 @@ SECTIONS
*(.data.page_aligned)
}
- .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
+ . = ALIGN(L1_CACHE_BYTES);
+ .cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
*(.data.cacheline_aligned)
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-18 5:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-18 5:17 [PATCH] powerpc: Explicit alignment for .data.cacheline_aligned Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2009-05-18 4:29 Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).