Skip to content

Commit 0f06c06

Browse files
committed
alpha: use L1_CACHE_BYTES for cacheline size in the linker script
Currently the linker script uses 64 for cacheline size which isn't optimal for all cases. Include asm/cache.h and use L1_CACHE_BYTES instead as suggested by Sam Ravnborg. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Sam Ravnborg <sam@ravnborg.org>
1 parent 19df0c2 commit 0f06c06

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎arch/alpha/kernel/vmlinux.lds.S‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <asm-generic/vmlinux.lds.h>
22
#include <asm/thread_info.h>
3+
#include <asm/cache.h>
34
#include <asm/page.h>
45

56
OUTPUT_FORMAT("elf64-alpha")
@@ -38,15 +39,15 @@ SECTIONS
3839
__init_begin = ALIGN(PAGE_SIZE);
3940
INIT_TEXT_SECTION(PAGE_SIZE)
4041
INIT_DATA_SECTION(16)
41-
PERCPU(64, PAGE_SIZE)
42+
PERCPU(L1_CACHE_BYTES, PAGE_SIZE)
4243
/* Align to THREAD_SIZE rather than PAGE_SIZE here so any padding page
4344
needed for the THREAD_SIZE aligned init_task gets freed after init */
4445
. = ALIGN(THREAD_SIZE);
4546
__init_end = .;
4647
/* Freed after init ends here */
4748

4849
_data = .;
49-
RW_DATA_SECTION(64, PAGE_SIZE, THREAD_SIZE)
50+
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
5051

5152
.got : {
5253
*(.got)

0 commit comments

Comments
 (0)