aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2012-09-28 09:06:41 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-10-09 08:16:55 -0400
commit3c7ef08bba65d1fef0b7486b30b5bbcdb42c5d9c (patch)
tree137f58766c6d6c0a4c2e055a687a6904528d9fb0 /arch/s390
parent9e2d8656f5e8aa214e66b462680cf86b210b74a8 (diff)
s390/facilities: cleanup PFMF and HPAGE machine facility detection
MACHINE_HAS_PFMF and MACHINE_HAS_HPAGE actually have the same semantics: the cpu has the EDAT1 facility installed in zArch mode. So remove one of the feature flags in machine_flags and rename the other one to EDAT1. The two old macros simply get mapped to MACHINE_HAS_EDAT1. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/setup.h11
-rw-r--r--arch/s390/kernel/early.c15
2 files changed, 9 insertions, 17 deletions
diff --git a/arch/s390/include/asm/setup.h b/arch/s390/include/asm/setup.h
index 8cfd731a18d8..a798985515b7 100644
--- a/arch/s390/include/asm/setup.h
+++ b/arch/s390/include/asm/setup.h
@@ -75,8 +75,7 @@ extern unsigned int s390_user_mode;
75#define MACHINE_FLAG_DIAG9C (1UL << 7) 75#define MACHINE_FLAG_DIAG9C (1UL << 7)
76#define MACHINE_FLAG_MVCOS (1UL << 8) 76#define MACHINE_FLAG_MVCOS (1UL << 8)
77#define MACHINE_FLAG_KVM (1UL << 9) 77#define MACHINE_FLAG_KVM (1UL << 9)
78#define MACHINE_FLAG_HPAGE (1UL << 10) 78#define MACHINE_FLAG_EDAT1 (1UL << 10)
79#define MACHINE_FLAG_PFMF (1UL << 11)
80#define MACHINE_FLAG_LPAR (1UL << 12) 79#define MACHINE_FLAG_LPAR (1UL << 12)
81#define MACHINE_FLAG_SPP (1UL << 13) 80#define MACHINE_FLAG_SPP (1UL << 13)
82#define MACHINE_FLAG_TOPOLOGY (1UL << 14) 81#define MACHINE_FLAG_TOPOLOGY (1UL << 14)
@@ -88,6 +87,8 @@ extern unsigned int s390_user_mode;
88#define MACHINE_IS_LPAR (S390_lowcore.machine_flags & MACHINE_FLAG_LPAR) 87#define MACHINE_IS_LPAR (S390_lowcore.machine_flags & MACHINE_FLAG_LPAR)
89 88
90#define MACHINE_HAS_DIAG9C (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG9C) 89#define MACHINE_HAS_DIAG9C (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG9C)
90#define MACHINE_HAS_PFMF MACHINE_HAS_EDAT1
91#define MACHINE_HAS_HPAGE MACHINE_HAS_EDAT1
91 92
92#ifndef CONFIG_64BIT 93#ifndef CONFIG_64BIT
93#define MACHINE_HAS_IEEE (S390_lowcore.machine_flags & MACHINE_FLAG_IEEE) 94#define MACHINE_HAS_IEEE (S390_lowcore.machine_flags & MACHINE_FLAG_IEEE)
@@ -96,8 +97,7 @@ extern unsigned int s390_user_mode;
96#define MACHINE_HAS_DIAG44 (1) 97#define MACHINE_HAS_DIAG44 (1)
97#define MACHINE_HAS_MVPG (S390_lowcore.machine_flags & MACHINE_FLAG_MVPG) 98#define MACHINE_HAS_MVPG (S390_lowcore.machine_flags & MACHINE_FLAG_MVPG)
98#define MACHINE_HAS_MVCOS (0) 99#define MACHINE_HAS_MVCOS (0)
99#define MACHINE_HAS_HPAGE (0) 100#define MACHINE_HAS_EDAT1 (0)
100#define MACHINE_HAS_PFMF (0)
101#define MACHINE_HAS_SPP (0) 101#define MACHINE_HAS_SPP (0)
102#define MACHINE_HAS_TOPOLOGY (0) 102#define MACHINE_HAS_TOPOLOGY (0)
103#define MACHINE_HAS_TE (0) 103#define MACHINE_HAS_TE (0)
@@ -109,8 +109,7 @@ extern unsigned int s390_user_mode;
109#define MACHINE_HAS_DIAG44 (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG44) 109#define MACHINE_HAS_DIAG44 (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG44)
110#define MACHINE_HAS_MVPG (1) 110#define MACHINE_HAS_MVPG (1)
111#define MACHINE_HAS_MVCOS (S390_lowcore.machine_flags & MACHINE_FLAG_MVCOS) 111#define MACHINE_HAS_MVCOS (S390_lowcore.machine_flags & MACHINE_FLAG_MVCOS)
112#define MACHINE_HAS_HPAGE (S390_lowcore.machine_flags & MACHINE_FLAG_HPAGE) 112#define MACHINE_HAS_EDAT1 (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT1)
113#define MACHINE_HAS_PFMF (S390_lowcore.machine_flags & MACHINE_FLAG_PFMF)
114#define MACHINE_HAS_SPP (S390_lowcore.machine_flags & MACHINE_FLAG_SPP) 113#define MACHINE_HAS_SPP (S390_lowcore.machine_flags & MACHINE_FLAG_SPP)
115#define MACHINE_HAS_TOPOLOGY (S390_lowcore.machine_flags & MACHINE_FLAG_TOPOLOGY) 114#define MACHINE_HAS_TOPOLOGY (S390_lowcore.machine_flags & MACHINE_FLAG_TOPOLOGY)
116#define MACHINE_HAS_TE (S390_lowcore.machine_flags & MACHINE_FLAG_TE) 115#define MACHINE_HAS_TE (S390_lowcore.machine_flags & MACHINE_FLAG_TE)
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index 00d114445068..4c91d078d091 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -283,14 +283,6 @@ static noinline __init void setup_facility_list(void)
283 ARRAY_SIZE(S390_lowcore.stfle_fac_list)); 283 ARRAY_SIZE(S390_lowcore.stfle_fac_list));
284} 284}
285 285
286static noinline __init void setup_hpage(void)
287{
288 if (!test_facility(2) || !test_facility(8))
289 return;
290 S390_lowcore.machine_flags |= MACHINE_FLAG_HPAGE;
291 __ctl_set_bit(0, 23);
292}
293
294static __init void detect_mvpg(void) 286static __init void detect_mvpg(void)
295{ 287{
296#ifndef CONFIG_64BIT 288#ifndef CONFIG_64BIT
@@ -378,10 +370,12 @@ static __init void detect_diag44(void)
378static __init void detect_machine_facilities(void) 370static __init void detect_machine_facilities(void)
379{ 371{
380#ifdef CONFIG_64BIT 372#ifdef CONFIG_64BIT
373 if (test_facility(8)) {
374 S390_lowcore.machine_flags |= MACHINE_FLAG_EDAT1;
375 __ctl_set_bit(0, 23);
376 }
381 if (test_facility(3)) 377 if (test_facility(3))
382 S390_lowcore.machine_flags |= MACHINE_FLAG_IDTE; 378 S390_lowcore.machine_flags |= MACHINE_FLAG_IDTE;
383 if (test_facility(8))
384 S390_lowcore.machine_flags |= MACHINE_FLAG_PFMF;
385 if (test_facility(27)) 379 if (test_facility(27))
386 S390_lowcore.machine_flags |= MACHINE_FLAG_MVCOS; 380 S390_lowcore.machine_flags |= MACHINE_FLAG_MVCOS;
387 if (test_facility(40)) 381 if (test_facility(40))
@@ -484,7 +478,6 @@ void __init startup_init(void)
484 detect_diag9c(); 478 detect_diag9c();
485 detect_diag44(); 479 detect_diag44();
486 detect_machine_facilities(); 480 detect_machine_facilities();
487 setup_hpage();
488 setup_topology(); 481 setup_topology();
489 sclp_facilities_detect(); 482 sclp_facilities_detect();
490 detect_memory_layout(memory_chunk); 483 detect_memory_layout(memory_chunk);