Skip to content

Commit ca04ddb

Browse files
heicarstMartin Schwidefsky
authored andcommitted
s390/setup: get rid of MACHINE_HAS_MVCOS machine flag
MACHINE_HAS_MVCOS is used exactly once when the machine is brought up. There is no need to cache the flag in the machine_flags. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent 211deca commit ca04ddb

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

‎arch/s390/include/asm/setup.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ void create_mem_hole(struct mem_chunk mem_chunk[], unsigned long addr,
5959
#define MACHINE_FLAG_DIAG44 (1UL << 4)
6060
#define MACHINE_FLAG_IDTE (1UL << 5)
6161
#define MACHINE_FLAG_DIAG9C (1UL << 6)
62-
#define MACHINE_FLAG_MVCOS (1UL << 7)
6362
#define MACHINE_FLAG_KVM (1UL << 8)
6463
#define MACHINE_FLAG_ESOP (1UL << 9)
6564
#define MACHINE_FLAG_EDAT1 (1UL << 10)
@@ -85,7 +84,6 @@ void create_mem_hole(struct mem_chunk mem_chunk[], unsigned long addr,
8584
#define MACHINE_HAS_IDTE (0)
8685
#define MACHINE_HAS_DIAG44 (1)
8786
#define MACHINE_HAS_MVPG (S390_lowcore.machine_flags & MACHINE_FLAG_MVPG)
88-
#define MACHINE_HAS_MVCOS (0)
8987
#define MACHINE_HAS_EDAT1 (0)
9088
#define MACHINE_HAS_EDAT2 (0)
9189
#define MACHINE_HAS_LPP (0)
@@ -98,7 +96,6 @@ void create_mem_hole(struct mem_chunk mem_chunk[], unsigned long addr,
9896
#define MACHINE_HAS_IDTE (S390_lowcore.machine_flags & MACHINE_FLAG_IDTE)
9997
#define MACHINE_HAS_DIAG44 (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG44)
10098
#define MACHINE_HAS_MVPG (1)
101-
#define MACHINE_HAS_MVCOS (S390_lowcore.machine_flags & MACHINE_FLAG_MVCOS)
10299
#define MACHINE_HAS_EDAT1 (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT1)
103100
#define MACHINE_HAS_EDAT2 (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT2)
104101
#define MACHINE_HAS_LPP (S390_lowcore.machine_flags & MACHINE_FLAG_LPP)

‎arch/s390/kernel/early.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,6 @@ static __init void detect_machine_facilities(void)
380380
S390_lowcore.machine_flags |= MACHINE_FLAG_EDAT2;
381381
if (test_facility(3))
382382
S390_lowcore.machine_flags |= MACHINE_FLAG_IDTE;
383-
if (test_facility(27))
384-
S390_lowcore.machine_flags |= MACHINE_FLAG_MVCOS;
385383
if (test_facility(40))
386384
S390_lowcore.machine_flags |= MACHINE_FLAG_LPP;
387385
if (test_facility(50) && test_facility(73))

‎arch/s390/lib/uaccess_mvcos.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/errno.h>
1111
#include <linux/init.h>
1212
#include <linux/mm.h>
13+
#include <asm/facility.h>
1314
#include <asm/uaccess.h>
1415
#include <asm/futex.h>
1516
#include "uaccess.h"
@@ -242,7 +243,7 @@ EXPORT_SYMBOL(__strncpy_from_user);
242243

243244
static int __init uaccess_init(void)
244245
{
245-
if (!MACHINE_HAS_MVCOS)
246+
if (IS_ENABLED(CONFIG_32BIT) || !test_facility(27))
246247
static_key_slow_dec(&have_mvcos);
247248
return 0;
248249
}

0 commit comments

Comments
 (0)