diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/do_mounts_initrd.c | 1 | ||||
-rw-r--r-- | init/main.c | 19 |
2 files changed, 19 insertions, 1 deletions
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index 425f4bcf4b77..22c7f41ff642 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -29,7 +29,6 @@ static struct ctl_table kern_do_mounts_initrd_table[] = { .mode = 0644, .proc_handler = proc_dointvec, }, - { } }; static __init int kernel_do_mounts_initrd_sysctls_init(void) diff --git a/init/main.c b/init/main.c index 91e74827f858..206acdde51f5 100644 --- a/init/main.c +++ b/init/main.c @@ -345,6 +345,11 @@ static int __init xbc_snprint_cmdline(char *buf, size_t size, continue; } xbc_array_for_each_value(vnode, val) { + /* + * For prettier and more readable /proc/cmdline, only + * quote the value when necessary, i.e. when it contains + * whitespace. + */ q = strpbrk(val, " \t\r\n") ? "\"" : ""; ret = snprintf(buf, rest(buf, end), "%s=%s%s%s ", xbc_namebuf, q, val, q); @@ -881,6 +886,19 @@ static void __init print_unknown_bootoptions(void) memblock_free(unknown_options, len); } +static void __init early_numa_node_init(void) +{ +#ifdef CONFIG_USE_PERCPU_NUMA_NODE_ID +#ifndef cpu_to_node + int cpu; + + /* The early_cpu_to_node() should be ready here. */ + for_each_possible_cpu(cpu) + set_cpu_numa_node(cpu, early_cpu_to_node(cpu)); +#endif +#endif +} + asmlinkage __visible __init __no_sanitize_address __noreturn __no_stack_protector void start_kernel(void) { @@ -911,6 +929,7 @@ void start_kernel(void) setup_nr_cpu_ids(); setup_per_cpu_areas(); smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */ + early_numa_node_init(); boot_cpu_hotplug_init(); pr_notice("Kernel command line: %s\n", saved_command_line); |