diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 22 | ||||
-rw-r--r-- | init/main.c | 4 |
2 files changed, 23 insertions, 3 deletions
diff --git a/init/Kconfig b/init/Kconfig index 22320804fbaf..fd664b3ab99e 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1420,6 +1420,28 @@ config KALLSYMS_ALL Say N unless you really need all symbols. +config KALLSYMS_ABSOLUTE_PERCPU + bool + default X86_64 && SMP + +config KALLSYMS_BASE_RELATIVE + bool + depends on KALLSYMS + default !IA64 && !(TILE && 64BIT) + help + Instead of emitting them as absolute values in the native word size, + emit the symbol references in the kallsyms table as 32-bit entries, + each containing a relative value in the range [base, base + U32_MAX] + or, when KALLSYMS_ABSOLUTE_PERCPU is in effect, each containing either + an absolute value in the range [0, S32_MAX] or a relative value in the + range [base, base + S32_MAX], where base is the lowest relative symbol + address encountered in the image. + + On 64-bit builds, this reduces the size of the address table by 50%, + but more importantly, it results in entries whose values are build + time constants, and no relocation pass is required at runtime to fix + up the entries based on the runtime load address of the kernel. + config PRINTK default y bool "Enable support for printk" if EXPERT diff --git a/init/main.c b/init/main.c index 8dc93df20f7f..b3c6e363ae18 100644 --- a/init/main.c +++ b/init/main.c @@ -705,7 +705,6 @@ static int __init initcall_blacklist(char *str) static bool __init_or_module initcall_blacklisted(initcall_t fn) { - struct list_head *tmp; struct blacklist_entry *entry; char *fn_name; @@ -713,8 +712,7 @@ static bool __init_or_module initcall_blacklisted(initcall_t fn) if (!fn_name) return false; - list_for_each(tmp, &blacklisted_initcalls) { - entry = list_entry(tmp, struct blacklist_entry, next); + list_for_each_entry(entry, &blacklisted_initcalls, next) { if (!strcmp(fn_name, entry->buf)) { pr_debug("initcall %s blacklisted\n", fn_name); kfree(fn_name); |