diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-03-01 01:56:31 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-03-05 00:13:26 -0500 |
commit | 87e29cacb7d09c81b09224bec395f970df958af4 (patch) | |
tree | 536a67c79bc54a6de1e911b31b6918efa2700c6d | |
parent | 5c36e6578d81f79ede871d3e66a0d6beeffeb3dc (diff) |
sh: Use L1_CACHE_BYTES for .data.cacheline_aligned.
Previously this was using a hardcoded 32, use L1_CACHE_BYTES for
cacheline alignment instead.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/kernel/vmlinux.lds.S | 3 | ||||
-rw-r--r-- | include/asm-sh/cache.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S index 75de165867a0..78a6c09875b2 100644 --- a/arch/sh/kernel/vmlinux.lds.S +++ b/arch/sh/kernel/vmlinux.lds.S | |||
@@ -3,6 +3,7 @@ | |||
3 | * Written by Niibe Yutaka | 3 | * Written by Niibe Yutaka |
4 | */ | 4 | */ |
5 | #include <asm/thread_info.h> | 5 | #include <asm/thread_info.h> |
6 | #include <asm/cache.h> | ||
6 | #include <asm-generic/vmlinux.lds.h> | 7 | #include <asm-generic/vmlinux.lds.h> |
7 | 8 | ||
8 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | 9 | #ifdef CONFIG_CPU_LITTLE_ENDIAN |
@@ -53,7 +54,7 @@ SECTIONS | |||
53 | . = ALIGN(PAGE_SIZE); | 54 | . = ALIGN(PAGE_SIZE); |
54 | .data.page_aligned : { *(.data.page_aligned) } | 55 | .data.page_aligned : { *(.data.page_aligned) } |
55 | 56 | ||
56 | . = ALIGN(32); | 57 | . = ALIGN(L1_CACHE_BYTES); |
57 | __per_cpu_start = .; | 58 | __per_cpu_start = .; |
58 | .data.percpu : { *(.data.percpu) } | 59 | .data.percpu : { *(.data.percpu) } |
59 | __per_cpu_end = .; | 60 | __per_cpu_end = .; |
diff --git a/include/asm-sh/cache.h b/include/asm-sh/cache.h index e3a180cf5062..9a3cb6ba9d15 100644 --- a/include/asm-sh/cache.h +++ b/include/asm-sh/cache.h | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) | 22 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) |
23 | 23 | ||
24 | #ifndef __ASSEMBLY__ | ||
24 | struct cache_info { | 25 | struct cache_info { |
25 | unsigned int ways; /* Number of cache ways */ | 26 | unsigned int ways; /* Number of cache ways */ |
26 | unsigned int sets; /* Number of cache sets */ | 27 | unsigned int sets; /* Number of cache sets */ |
@@ -47,6 +48,6 @@ struct cache_info { | |||
47 | 48 | ||
48 | unsigned long flags; | 49 | unsigned long flags; |
49 | }; | 50 | }; |
50 | 51 | #endif /* __ASSEMBLY__ */ | |
51 | #endif /* __KERNEL__ */ | 52 | #endif /* __KERNEL__ */ |
52 | #endif /* __ASM_SH_CACHE_H */ | 53 | #endif /* __ASM_SH_CACHE_H */ |