hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/s390/boot/als.c
....@@ -7,6 +7,7 @@
77 #include <asm/facility.h>
88 #include <asm/lowcore.h>
99 #include <asm/sclp.h>
10
+#include "boot.h"
1011
1112 /*
1213 * The code within this file will be called very early. It may _not_
....@@ -58,7 +59,7 @@
5859 *str = '\0';
5960 }
6061
61
-static void print_missing_facilities(void)
62
+void print_missing_facilities(void)
6263 {
6364 static char als_str[80] = "Missing facilities: ";
6465 unsigned long val;
....@@ -90,7 +91,6 @@
9091 }
9192 strcat(als_str, "\n");
9293 sclp_early_printk(als_str);
93
- sclp_early_printk("See Principles of Operations for facility bits\n");
9494 }
9595
9696 static void facility_mismatch(void)
....@@ -98,27 +98,15 @@
9898 sclp_early_printk("The Linux kernel requires more recent processor hardware\n");
9999 print_machine_type();
100100 print_missing_facilities();
101
- disabled_wait(0x8badcccc);
101
+ sclp_early_printk("See Principles of Operations for facility bits\n");
102
+ disabled_wait();
102103 }
103104
104105 void verify_facilities(void)
105106 {
106107 int i;
107108
108
- for (i = 0; i < ARRAY_SIZE(S390_lowcore.stfle_fac_list); i++)
109
- S390_lowcore.stfle_fac_list[i] = 0;
110
- asm volatile(
111
- " stfl 0(0)\n"
112
- : "=m" (S390_lowcore.stfl_fac_list));
113
- S390_lowcore.stfle_fac_list[0] = (u64)S390_lowcore.stfl_fac_list << 32;
114
- if (S390_lowcore.stfl_fac_list & 0x01000000) {
115
- register unsigned long reg0 asm("0") = ARRAY_SIZE(als) - 1;
116
-
117
- asm volatile(".insn s,0xb2b00000,0(%1)" /* stfle */
118
- : "+d" (reg0)
119
- : "a" (&S390_lowcore.stfle_fac_list)
120
- : "memory", "cc");
121
- }
109
+ __stfle(S390_lowcore.stfle_fac_list, ARRAY_SIZE(S390_lowcore.stfle_fac_list));
122110 for (i = 0; i < ARRAY_SIZE(als); i++) {
123111 if ((S390_lowcore.stfle_fac_list[i] & als[i]) != als[i])
124112 facility_mismatch();