mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 01:34:14 +08:00
0415b00d17
Percpu allocator honors alignment request upto PAGE_SIZE and both the percpu addresses in the percpu address space and the translated kernel addresses should be aligned accordingly. The calculation of the former depends on the alignment of percpu output section in the kernel image. The linker script macros PERCPU_VADDR() and PERCPU() are used to define this output section and the latter takes @align parameter. Several architectures are using @align smaller than PAGE_SIZE breaking percpu memory alignment. This patch removes @align parameter from PERCPU(), renames it to PERCPU_SECTION() and makes it always align to PAGE_SIZE. While at it, add PCPU_SETUP_BUG_ON() checks such that alignment problems are reliably detected and remove percpu alignment comment recently added in workqueue.c as the condition would trigger BUG way before reaching there. For um, this patch raises the alignment of percpu area. As the area is in .init, there shouldn't be any noticeable difference. This problem was discovered by David Howells while debugging boot failure on mn10300. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Mike Frysinger <vapier@gentoo.org> Cc: uclinux-dist-devel@blackfin.uclinux.org Cc: David Howells <dhowells@redhat.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: user-mode-linux-devel@lists.sourceforge.net
109 lines
1.8 KiB
ArmAsm
109 lines
1.8 KiB
ArmAsm
#include <asm-generic/vmlinux.lds.h>
|
|
|
|
.fini : { *(.fini) } =0x9090
|
|
_etext = .;
|
|
PROVIDE (etext = .);
|
|
|
|
. = ALIGN(4096);
|
|
_sdata = .;
|
|
PROVIDE (sdata = .);
|
|
|
|
RODATA
|
|
|
|
.unprotected : { *(.unprotected) }
|
|
. = ALIGN(4096);
|
|
PROVIDE (_unprotected_end = .);
|
|
|
|
. = ALIGN(4096);
|
|
.note : { *(.note.*) }
|
|
EXCEPTION_TABLE(0)
|
|
|
|
BUG_TABLE
|
|
|
|
.uml.setup.init : {
|
|
__uml_setup_start = .;
|
|
*(.uml.setup.init)
|
|
__uml_setup_end = .;
|
|
}
|
|
|
|
.uml.help.init : {
|
|
__uml_help_start = .;
|
|
*(.uml.help.init)
|
|
__uml_help_end = .;
|
|
}
|
|
|
|
.uml.postsetup.init : {
|
|
__uml_postsetup_start = .;
|
|
*(.uml.postsetup.init)
|
|
__uml_postsetup_end = .;
|
|
}
|
|
|
|
.init.setup : {
|
|
INIT_SETUP(0)
|
|
}
|
|
|
|
PERCPU_SECTION(32)
|
|
|
|
.initcall.init : {
|
|
INIT_CALLS
|
|
}
|
|
|
|
.con_initcall.init : {
|
|
CON_INITCALL
|
|
}
|
|
|
|
.uml.initcall.init : {
|
|
__uml_initcall_start = .;
|
|
*(.uml.initcall.init)
|
|
__uml_initcall_end = .;
|
|
}
|
|
__init_end = .;
|
|
|
|
SECURITY_INIT
|
|
|
|
.exitcall : {
|
|
__exitcall_begin = .;
|
|
*(.exitcall.exit)
|
|
__exitcall_end = .;
|
|
}
|
|
|
|
.uml.exitcall : {
|
|
__uml_exitcall_begin = .;
|
|
*(.uml.exitcall.exit)
|
|
__uml_exitcall_end = .;
|
|
}
|
|
|
|
. = ALIGN(4);
|
|
.altinstructions : {
|
|
__alt_instructions = .;
|
|
*(.altinstructions)
|
|
__alt_instructions_end = .;
|
|
}
|
|
.altinstr_replacement : { *(.altinstr_replacement) }
|
|
/* .exit.text is discard at runtime, not link time, to deal with references
|
|
from .altinstructions and .eh_frame */
|
|
.exit.text : { *(.exit.text) }
|
|
.exit.data : { *(.exit.data) }
|
|
|
|
.preinit_array : {
|
|
__preinit_array_start = .;
|
|
*(.preinit_array)
|
|
__preinit_array_end = .;
|
|
}
|
|
.init_array : {
|
|
__init_array_start = .;
|
|
*(.init_array)
|
|
__init_array_end = .;
|
|
}
|
|
.fini_array : {
|
|
__fini_array_start = .;
|
|
*(.fini_array)
|
|
__fini_array_end = .;
|
|
}
|
|
|
|
. = ALIGN(4096);
|
|
.init.ramfs : {
|
|
INIT_RAM_FS
|
|
}
|
|
|