params: <level>_initcall-like kernel parameters
This patch adds a set of macros that can be used to declare kernel parameters to be parsed _before_ initcalls at a chosen level are executed. We rename the now-unused "flags" field of struct kernel_param as the level. It's signed, for when we use this for early params as well, in future. Linker macro collating init calls had to be modified in order to add additional symbols between levels that are later used by the init code to split the calls into blocks. Signed-off-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Rusty Russell
parent
8b8252813d
commit
026cee0086
@@ -616,30 +616,23 @@
|
||||
*(.init.setup) \
|
||||
VMLINUX_SYMBOL(__setup_end) = .;
|
||||
|
||||
#define INITCALLS \
|
||||
*(.initcallearly.init) \
|
||||
VMLINUX_SYMBOL(__early_initcall_end) = .; \
|
||||
*(.initcall0.init) \
|
||||
*(.initcall0s.init) \
|
||||
*(.initcall1.init) \
|
||||
*(.initcall1s.init) \
|
||||
*(.initcall2.init) \
|
||||
*(.initcall2s.init) \
|
||||
*(.initcall3.init) \
|
||||
*(.initcall3s.init) \
|
||||
*(.initcall4.init) \
|
||||
*(.initcall4s.init) \
|
||||
*(.initcall5.init) \
|
||||
*(.initcall5s.init) \
|
||||
*(.initcallrootfs.init) \
|
||||
*(.initcall6.init) \
|
||||
*(.initcall6s.init) \
|
||||
*(.initcall7.init) \
|
||||
*(.initcall7s.init)
|
||||
#define INIT_CALLS_LEVEL(level) \
|
||||
VMLINUX_SYMBOL(__initcall##level##_start) = .; \
|
||||
*(.initcall##level##.init) \
|
||||
*(.initcall##level##s.init) \
|
||||
|
||||
#define INIT_CALLS \
|
||||
VMLINUX_SYMBOL(__initcall_start) = .; \
|
||||
INITCALLS \
|
||||
*(.initcallearly.init) \
|
||||
INIT_CALLS_LEVEL(0) \
|
||||
INIT_CALLS_LEVEL(1) \
|
||||
INIT_CALLS_LEVEL(2) \
|
||||
INIT_CALLS_LEVEL(3) \
|
||||
INIT_CALLS_LEVEL(4) \
|
||||
INIT_CALLS_LEVEL(5) \
|
||||
INIT_CALLS_LEVEL(rootfs) \
|
||||
INIT_CALLS_LEVEL(6) \
|
||||
INIT_CALLS_LEVEL(7) \
|
||||
VMLINUX_SYMBOL(__initcall_end) = .;
|
||||
|
||||
#define CON_INITCALL \
|
||||
|
||||
Reference in New Issue
Block a user