aboutsummaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens2024-07-16 13:50:56 +0200
committerVasily Gorbik2024-07-23 16:02:31 +0200
commitbeb8cee06f9b8726616ba87783116cb8fb889c7a (patch)
tree55922612a226cac655607c090a0efc2271dfb52e /arch/s390
parent47837a5c74f432ad992239cfa5966543f466d4df (diff)
s390/alternatives: Remove alternative facility list
The alternative and the normal facility list are always identical. Remove the alternative facility list, which allows to simplify the alternatives code. Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Tested-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/alternative.h9
-rw-r--r--arch/s390/include/asm/facility.h1
-rw-r--r--arch/s390/kernel/alternative.c7
-rw-r--r--arch/s390/kernel/early.c6
-rw-r--r--arch/s390/kernel/setup.c1
5 files changed, 5 insertions, 19 deletions
diff --git a/arch/s390/include/asm/alternative.h b/arch/s390/include/asm/alternative.h
index 5f56a2f3aba6..3ddd6dbe5635 100644
--- a/arch/s390/include/asm/alternative.h
+++ b/arch/s390/include/asm/alternative.h
@@ -31,16 +31,15 @@
#define ALT_CTX_LATE 2
#define ALT_CTX_ALL (ALT_CTX_EARLY | ALT_CTX_LATE)
-#define ALT_TYPE_FACILITY_EARLY 0
-#define ALT_TYPE_FACILITY 1
-#define ALT_TYPE_SPEC 2
+#define ALT_TYPE_FACILITY 0
+#define ALT_TYPE_SPEC 1
#define ALT_DATA_SHIFT 0
#define ALT_TYPE_SHIFT 20
#define ALT_CTX_SHIFT 28
-#define ALT_FACILITY_EARLY(facility) (ALT_CTX_EARLY << ALT_CTX_SHIFT | \
- ALT_TYPE_FACILITY_EARLY << ALT_TYPE_SHIFT | \
+#define ALT_FACILITY_EARLY(facility) (ALT_CTX_EARLY << ALT_CTX_SHIFT | \
+ ALT_TYPE_FACILITY << ALT_TYPE_SHIFT | \
(facility) << ALT_DATA_SHIFT)
#define ALT_FACILITY(facility) (ALT_CTX_LATE << ALT_CTX_SHIFT | \
diff --git a/arch/s390/include/asm/facility.h b/arch/s390/include/asm/facility.h
index d46cc725f024..b7d234838a36 100644
--- a/arch/s390/include/asm/facility.h
+++ b/arch/s390/include/asm/facility.h
@@ -20,7 +20,6 @@
#define MAX_FACILITY_BIT (sizeof(stfle_fac_list) * 8)
extern u64 stfle_fac_list[16];
-extern u64 alt_stfle_fac_list[16];
static inline void __set_facility(unsigned long nr, void *facilities)
{
diff --git a/arch/s390/kernel/alternative.c b/arch/s390/kernel/alternative.c
index 05545669552f..eae254466192 100644
--- a/arch/s390/kernel/alternative.c
+++ b/arch/s390/kernel/alternative.c
@@ -19,14 +19,9 @@ void __apply_alternatives(struct alt_instr *start, struct alt_instr *end, unsign
if (!(a->ctx & ctx))
continue;
switch (a->type) {
- case ALT_TYPE_FACILITY_EARLY:
- replace = test_facility(a->data);
- break;
-#ifndef __DECOMPRESSOR
case ALT_TYPE_FACILITY:
- replace = __test_facility(a->data, alt_stfle_fac_list);
+ replace = test_facility(a->data);
break;
-#endif
case ALT_TYPE_SPEC:
replace = nobp_enabled();
break;
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index d142598e0532..3ce77cee272d 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -190,11 +190,6 @@ static noinline __init void setup_lowcore_early(void)
get_lowcore()->preempt_count = INIT_PREEMPT_COUNT;
}
-static noinline __init void setup_facility_list(void)
-{
- memcpy(alt_stfle_fac_list, stfle_fac_list, sizeof(alt_stfle_fac_list));
-}
-
static __init void detect_diag9c(void)
{
unsigned int cpu_address;
@@ -289,7 +284,6 @@ void __init startup_init(void)
lockdep_off();
sort_amode31_extable();
setup_lowcore_early();
- setup_facility_list();
detect_machine_type();
setup_arch_string();
setup_boot_command_line();
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 178daf4e3563..700003e1bc76 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -155,7 +155,6 @@ unsigned int __bootdata_preserved(zlib_dfltcc_support);
EXPORT_SYMBOL(zlib_dfltcc_support);
u64 __bootdata_preserved(stfle_fac_list[16]);
EXPORT_SYMBOL(stfle_fac_list);
-u64 alt_stfle_fac_list[16];
struct oldmem_data __bootdata_preserved(oldmem_data);
unsigned long VMALLOC_START;