linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: vmlinux.lds.S: do not hardcode cacheline size as 32 bytes
@ 2012-01-16 15:44 Will Deacon
  2012-01-16 15:44 ` [PATCH 2/2] ARM: cache: assume 64-byte L1 cachelines for ARMv7 CPUs Will Deacon
  2012-01-16 18:22 ` [PATCH 1/2] ARM: vmlinux.lds.S: do not hardcode cacheline size as 32 bytes Stephen Boyd
  0 siblings, 2 replies; 12+ messages in thread
From: Will Deacon @ 2012-01-16 15:44 UTC (permalink / raw)
  To: linux-arm-kernel

The linker script assumes a cacheline size of 32 bytes when aligning
the .data..cacheline_aligned and .data..percpu sections.

This patch updates the script to use L1_CACHE_BYTES, which should be set
to 64 on platforms that require it.

Signed-off-by: Will Deacon <will.deacon@arm.com>
---

v2: incorporated suggestions from Stephen Boyd

 arch/arm/kernel/vmlinux.lds.S |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index f76e755..1077e4f 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -4,6 +4,7 @@
  */
 
 #include <asm-generic/vmlinux.lds.h>
+#include <asm/cache.h>
 #include <asm/thread_info.h>
 #include <asm/memory.h>
 #include <asm/page.h>
@@ -181,7 +182,7 @@ SECTIONS
 	}
 #endif
 
-	PERCPU_SECTION(32)
+	PERCPU_SECTION(L1_CACHE_BYTES)
 
 #ifdef CONFIG_XIP_KERNEL
 	__data_loc = ALIGN(4);		/* location in binary */
@@ -212,8 +213,8 @@ SECTIONS
 #endif
 
 		NOSAVE_DATA
-		CACHELINE_ALIGNED_DATA(32)
-		READ_MOSTLY_DATA(32)
+		CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
+		READ_MOSTLY_DATA(L1_CACHE_BYTES)
 
 		/*
 		 * The exception fixup table (might need resorting at runtime)
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-01-17 10:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-16 15:44 [PATCH 1/2] ARM: vmlinux.lds.S: do not hardcode cacheline size as 32 bytes Will Deacon
2012-01-16 15:44 ` [PATCH 2/2] ARM: cache: assume 64-byte L1 cachelines for ARMv7 CPUs Will Deacon
2012-01-16 15:52   ` Shilimkar, Santosh
2012-01-16 16:09     ` Russell King - ARM Linux
2012-01-16 16:14       ` Will Deacon
2012-01-16 16:24       ` Shilimkar, Santosh
2012-01-16 18:22 ` [PATCH 1/2] ARM: vmlinux.lds.S: do not hardcode cacheline size as 32 bytes Stephen Boyd
2012-01-16 18:26   ` Will Deacon
2012-01-16 18:30     ` Stephen Boyd
2012-01-16 19:11       ` Will Deacon
2012-01-16 19:35         ` Nicolas Pitre
2012-01-17 10:11           ` Will Deacon

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).