diff options
| -rw-r--r-- | arch/s390/include/asm/ap.h | 11 | ||||
| -rw-r--r-- | drivers/s390/cio/chsc.c | 13 | ||||
| -rw-r--r-- | drivers/s390/crypto/ap_bus.c | 10 |
3 files changed, 34 insertions, 0 deletions
diff --git a/arch/s390/include/asm/ap.h b/arch/s390/include/asm/ap.h index 1a6a7092d942..e94a0a28b5eb 100644 --- a/arch/s390/include/asm/ap.h +++ b/arch/s390/include/asm/ap.h | |||
| @@ -360,4 +360,15 @@ static inline struct ap_queue_status ap_dqap(ap_qid_t qid, | |||
| 360 | return reg1; | 360 | return reg1; |
| 361 | } | 361 | } |
| 362 | 362 | ||
| 363 | /* | ||
| 364 | * Interface to tell the AP bus code that a configuration | ||
| 365 | * change has happened. The bus code should at least do | ||
| 366 | * an ap bus resource rescan. | ||
| 367 | */ | ||
| 368 | #if IS_ENABLED(CONFIG_ZCRYPT) | ||
| 369 | void ap_bus_cfg_chg(void); | ||
| 370 | #else | ||
| 371 | static inline void ap_bus_cfg_chg(void){}; | ||
| 372 | #endif | ||
| 373 | |||
| 363 | #endif /* _ASM_S390_AP_H_ */ | 374 | #endif /* _ASM_S390_AP_H_ */ |
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index a0baee25134c..eaf4699be2c5 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <asm/crw.h> | 24 | #include <asm/crw.h> |
| 25 | #include <asm/isc.h> | 25 | #include <asm/isc.h> |
| 26 | #include <asm/ebcdic.h> | 26 | #include <asm/ebcdic.h> |
| 27 | #include <asm/ap.h> | ||
| 27 | 28 | ||
| 28 | #include "css.h" | 29 | #include "css.h" |
| 29 | #include "cio.h" | 30 | #include "cio.h" |
| @@ -586,6 +587,15 @@ static void chsc_process_sei_scm_avail(struct chsc_sei_nt0_area *sei_area) | |||
| 586 | " failed (rc=%d).\n", ret); | 587 | " failed (rc=%d).\n", ret); |
| 587 | } | 588 | } |
| 588 | 589 | ||
| 590 | static void chsc_process_sei_ap_cfg_chg(struct chsc_sei_nt0_area *sei_area) | ||
| 591 | { | ||
| 592 | CIO_CRW_EVENT(3, "chsc: ap config changed\n"); | ||
| 593 | if (sei_area->rs != 5) | ||
| 594 | return; | ||
| 595 | |||
| 596 | ap_bus_cfg_chg(); | ||
| 597 | } | ||
| 598 | |||
| 589 | static void chsc_process_sei_nt2(struct chsc_sei_nt2_area *sei_area) | 599 | static void chsc_process_sei_nt2(struct chsc_sei_nt2_area *sei_area) |
| 590 | { | 600 | { |
| 591 | switch (sei_area->cc) { | 601 | switch (sei_area->cc) { |
| @@ -612,6 +622,9 @@ static void chsc_process_sei_nt0(struct chsc_sei_nt0_area *sei_area) | |||
| 612 | case 2: /* i/o resource accessibility */ | 622 | case 2: /* i/o resource accessibility */ |
| 613 | chsc_process_sei_res_acc(sei_area); | 623 | chsc_process_sei_res_acc(sei_area); |
| 614 | break; | 624 | break; |
| 625 | case 3: /* ap config changed */ | ||
| 626 | chsc_process_sei_ap_cfg_chg(sei_area); | ||
| 627 | break; | ||
| 615 | case 7: /* channel-path-availability information */ | 628 | case 7: /* channel-path-availability information */ |
| 616 | chsc_process_sei_chp_avail(sei_area); | 629 | chsc_process_sei_chp_avail(sei_area); |
| 617 | break; | 630 | break; |
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 033a1acabf48..1546389d71db 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
| @@ -868,6 +868,16 @@ void ap_bus_force_rescan(void) | |||
| 868 | EXPORT_SYMBOL(ap_bus_force_rescan); | 868 | EXPORT_SYMBOL(ap_bus_force_rescan); |
| 869 | 869 | ||
| 870 | /* | 870 | /* |
| 871 | * A config change has happened, force an ap bus rescan. | ||
| 872 | */ | ||
| 873 | void ap_bus_cfg_chg(void) | ||
| 874 | { | ||
| 875 | AP_DBF(DBF_INFO, "%s config change, forcing bus rescan\n", __func__); | ||
| 876 | |||
| 877 | ap_bus_force_rescan(); | ||
| 878 | } | ||
| 879 | |||
| 880 | /* | ||
| 871 | * hex2bitmap() - parse hex mask string and set bitmap. | 881 | * hex2bitmap() - parse hex mask string and set bitmap. |
| 872 | * Valid strings are "0x012345678" with at least one valid hex number. | 882 | * Valid strings are "0x012345678" with at least one valid hex number. |
| 873 | * Rest of the bitmap to the right is padded with 0. No spaces allowed | 883 | * Rest of the bitmap to the right is padded with 0. No spaces allowed |
