diff options
| -rw-r--r-- | arch/s390/include/asm/sclp.h | 3 | ||||
| -rw-r--r-- | arch/s390/kernel/early.c | 3 | ||||
| -rw-r--r-- | drivers/s390/char/sclp_early.c | 27 |
3 files changed, 11 insertions, 22 deletions
diff --git a/arch/s390/include/asm/sclp.h b/arch/s390/include/asm/sclp.h index 593069201bb9..30ef748bc161 100644 --- a/arch/s390/include/asm/sclp.h +++ b/arch/s390/include/asm/sclp.h | |||
| @@ -43,7 +43,6 @@ struct sclp_cpu_info { | |||
| 43 | int sclp_get_cpu_info(struct sclp_cpu_info *info); | 43 | int sclp_get_cpu_info(struct sclp_cpu_info *info); |
| 44 | int sclp_cpu_configure(u8 cpu); | 44 | int sclp_cpu_configure(u8 cpu); |
| 45 | int sclp_cpu_deconfigure(u8 cpu); | 45 | int sclp_cpu_deconfigure(u8 cpu); |
| 46 | void sclp_facilities_detect(void); | ||
| 47 | unsigned long long sclp_get_rnmax(void); | 46 | unsigned long long sclp_get_rnmax(void); |
| 48 | unsigned long long sclp_get_rzm(void); | 47 | unsigned long long sclp_get_rzm(void); |
| 49 | int sclp_sdias_blk_count(void); | 48 | int sclp_sdias_blk_count(void); |
| @@ -57,7 +56,7 @@ bool sclp_has_vt220(void); | |||
| 57 | int sclp_pci_configure(u32 fid); | 56 | int sclp_pci_configure(u32 fid); |
| 58 | int sclp_pci_deconfigure(u32 fid); | 57 | int sclp_pci_deconfigure(u32 fid); |
| 59 | int memcpy_hsa(void *dest, unsigned long src, size_t count, int mode); | 58 | int memcpy_hsa(void *dest, unsigned long src, size_t count, int mode); |
| 60 | void sclp_hsa_size_detect(void); | ||
| 61 | unsigned long sclp_get_hsa_size(void); | 59 | unsigned long sclp_get_hsa_size(void); |
| 60 | void sclp_early_detect(void); | ||
| 62 | 61 | ||
| 63 | #endif /* _ASM_S390_SCLP_H */ | 62 | #endif /* _ASM_S390_SCLP_H */ |
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index c0462f45cf1b..fca20b5fe79e 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
| @@ -483,8 +483,7 @@ void __init startup_init(void) | |||
| 483 | detect_diag44(); | 483 | detect_diag44(); |
| 484 | detect_machine_facilities(); | 484 | detect_machine_facilities(); |
| 485 | setup_topology(); | 485 | setup_topology(); |
| 486 | sclp_facilities_detect(); | 486 | sclp_early_detect(); |
| 487 | sclp_hsa_size_detect(); | ||
| 488 | #ifdef CONFIG_DYNAMIC_FTRACE | 487 | #ifdef CONFIG_DYNAMIC_FTRACE |
| 489 | S390_lowcore.ftrace_func = (unsigned long)ftrace_caller; | 488 | S390_lowcore.ftrace_func = (unsigned long)ftrace_caller; |
| 490 | #endif | 489 | #endif |
diff --git a/drivers/s390/char/sclp_early.c b/drivers/s390/char/sclp_early.c index cbec45fdcc59..f7aa080e9b28 100644 --- a/drivers/s390/char/sclp_early.c +++ b/drivers/s390/char/sclp_early.c | |||
| @@ -93,20 +93,7 @@ static void __init sclp_read_info_early(void) | |||
| 93 | } | 93 | } |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | static void __init sclp_event_mask_early(void) | 96 | static void __init sclp_facilities_detect(void) |
| 97 | { | ||
| 98 | struct init_sccb *sccb = &early_event_mask_sccb; | ||
| 99 | int rc; | ||
| 100 | |||
| 101 | do { | ||
| 102 | memset(sccb, 0, sizeof(*sccb)); | ||
| 103 | sccb->header.length = sizeof(*sccb); | ||
| 104 | sccb->mask_length = sizeof(sccb_mask_t); | ||
| 105 | rc = sclp_cmd_sync_early(SCLP_CMDW_WRITE_EVENT_MASK, sccb); | ||
| 106 | } while (rc == -EBUSY); | ||
| 107 | } | ||
| 108 | |||
| 109 | void __init sclp_facilities_detect(void) | ||
| 110 | { | 97 | { |
| 111 | struct read_info_sccb *sccb; | 98 | struct read_info_sccb *sccb; |
| 112 | 99 | ||
| @@ -122,8 +109,6 @@ void __init sclp_facilities_detect(void) | |||
| 122 | sclp_rnmax = sccb->rnmax ? sccb->rnmax : sccb->rnmax2; | 109 | sclp_rnmax = sccb->rnmax ? sccb->rnmax : sccb->rnmax2; |
| 123 | sclp_rzm = sccb->rnsize ? sccb->rnsize : sccb->rnsize2; | 110 | sclp_rzm = sccb->rnsize ? sccb->rnsize : sccb->rnsize2; |
| 124 | sclp_rzm <<= 20; | 111 | sclp_rzm <<= 20; |
| 125 | |||
| 126 | sclp_event_mask_early(); | ||
| 127 | } | 112 | } |
| 128 | 113 | ||
| 129 | bool __init sclp_has_linemode(void) | 114 | bool __init sclp_has_linemode(void) |
| @@ -246,7 +231,7 @@ unsigned long sclp_get_hsa_size(void) | |||
| 246 | return sclp_hsa_size; | 231 | return sclp_hsa_size; |
| 247 | } | 232 | } |
| 248 | 233 | ||
| 249 | void __init sclp_hsa_size_detect(void) | 234 | static void __init sclp_hsa_size_detect(void) |
| 250 | { | 235 | { |
| 251 | long size; | 236 | long size; |
| 252 | 237 | ||
| @@ -268,6 +253,12 @@ void __init sclp_hsa_size_detect(void) | |||
| 268 | if (size < 0) | 253 | if (size < 0) |
| 269 | return; | 254 | return; |
| 270 | out: | 255 | out: |
| 271 | sclp_set_event_mask(0, 0); | ||
| 272 | sclp_hsa_size = size; | 256 | sclp_hsa_size = size; |
| 273 | } | 257 | } |
| 258 | |||
| 259 | void __init sclp_early_detect(void) | ||
| 260 | { | ||
| 261 | sclp_facilities_detect(); | ||
| 262 | sclp_hsa_size_detect(); | ||
| 263 | sclp_set_event_mask(0, 0); | ||
| 264 | } | ||
