diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2016-12-29 13:52:52 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-01-16 07:27:54 +0100 |
commit | 68cc795d1933285705ced6d841ef66c00ce98cbe (patch) | |
tree | 7108b880b2dc0dc6416d5ac02944f7a319399a3e /arch/s390/kernel/early.c | |
parent | 970ba6ac6a59ff1f1579e472a97765adc50186f9 (diff) | |
download | linux-next-68cc795d1933285705ced6d841ef66c00ce98cbe.tar.gz |
s390/topology: make "topology=off" parameter work
The "topology=off" kernel parameter is supposed to prevent the kernel
to use hardware topology information to generate scheduling domains
etc.
For an unknown reason I implemented this in a very odd way back then:
instead of simply clearing the MACHINE_HAS_TOPOLOGY flag within the
lowcore I added a second variable which indicated that topology
information should not be used. This is more than suboptimal since it
partially doesn't work. For the fake NUMA case topology information
is still considered and scheduling domains will be created based on
this.
To fix this and to simplify the code get rid of the extra variable and
implement the "topology=off" case like it is done for other features.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/early.c')
-rw-r--r-- | arch/s390/kernel/early.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 324f1c147a41..d756315b7985 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c @@ -364,6 +364,18 @@ static inline void save_vector_registers(void) #endif } +static int __init topology_setup(char *str) +{ + bool enabled; + int rc; + + rc = kstrtobool(str, &enabled); + if (!rc && !enabled) + S390_lowcore.machine_flags &= ~MACHINE_HAS_TOPOLOGY; + return rc; +} +early_param("topology", topology_setup); + static int __init disable_vector_extension(char *str) { S390_lowcore.machine_flags &= ~MACHINE_FLAG_VX; |