s390: additional_cpus parameter
Subsystems (2)
PATCH 3/4 s390: additional_cpus parameter
From: Heiko Carstens <[email protected]>
Introduce additional_cpus command line option. By default no additional cpu can be attached to the system anymore. Only the cpus present at IPL time can be switched on/off. If it is desired that additional cpus can be attached to the system the maximum number of additional cpus needs to be specified with this option.
This change is necessary in order to limit the waste of per_cpu data structures.
Signed-off-by Heiko Carstens <[email protected]>
---
Documentation/cpu-hotplug.txt | 4 ++ arch/s390/kernel/setup.c | 2 + arch/s390/kernel/smp.c | 58 ++++++++++++++++++++++++++++-------------- include/asm-s390/smp.h | 2 + 4 files changed, 47 insertions(+), 19 deletions(-)
Documentation/cpu-hotplug.txt +3 -1
@@ -11,6 +11,8 @@ Joel Schopp <[email protected]> ia64/x86_64: Ashok Raj <[email protected]> + s390: + Heiko Carstens <[email protected]> Authors: Ashok Raj <[email protected]> Lots of feedback: Nathan Lynch <[email protected]>,
@@ -44,7 +46,7 @@ maxcpus=n Restrict boot time cpus to maxcpus=2 will only boot 2. You can choose to bring the other cpus later online, read FAQ's for more info. -additional_cpus=n [x86_64 only] use this to limit hotpluggable cpus. +additional_cpus=n [x86_64, s390 only] use this to limit hotpluggable cpus. This option sets cpu_possible_map = cpu_present_map + additional_cpus
arch/s390/kernel/setup.c +2 -0
@@ -600,6 +600,7 @@ setup_arch(char **cmdline_p) init_mm.brk = (unsigned long ) &_end;parse_cmdline_early (cmdline_p); +parse_early_param ();setup_memory ();setup_resources ();
@@ -607,6 +608,7 @@ setup_arch(char **cmdline_p)cpu_init (); __cpu_logical_map[0 ] = S390_lowcore.cpu_data.cpu_addr; +smp_setup_cpu_possible_map ();/* * Create kernel page tables and switch to virtual addressing.
arch/s390/kernel/smp.c +40 -18
137 lines not on this page · raw message
include/asm-s390/smp.h +2 -0
@@ -31,6 +31,7 @@ typedef struct__u16 cpu; } sigp_info; +extern void smp_setup_cpu_possible_map (void );extern int smp_call_function_on (void (*func) (void *info),void *info,int nonatomic,int wait,int cpu);#define NO_PROC_ID 0xFF/* No processor magic marker */
@@ -104,6 +105,7 @@ smp_call_function_on(void (*func) (void#define smp_cpu_not_running (cpu) 1#define smp_get_cpu (cpu) ({ 0; })#define smp_put_cpu (cpu) ({ 0; }) +#define smp_setup_cpu_possible_map ()#endif #endif