diff options
author | Harald Freudenberger <freude@linux.ibm.com> | 2022-02-16 12:30:34 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2022-03-01 21:05:10 +0100 |
commit | 8944d05f9bbf910c8b241e29a3de114900e31e42 (patch) | |
tree | c1c9dfee71c7db152e456c9829c927a13bb60921 /drivers/s390 | |
parent | 283915850a4455e8af40ce5b8d291dc79638cdae (diff) |
s390/ap: enable sysfs attribute scans to force AP bus rescan
This patch switches the sysfs attribute /sys/bus/ap/scans
from read-only to read-write. If there is something written
to this attribute, an AP bus rescan is forced. If an AP
bus scan is triggered this way a debug feature entry line
reports this in /sys/kernel/debug/s390dbf/ap/sprintf.
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Jakob Naucke <naucke@linux.ibm.com>
Reviewed-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/crypto/ap_bus.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index f5fae8b62bdf..555cc3394fe3 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -1472,7 +1472,17 @@ static ssize_t scans_show(struct bus_type *bus, char *buf) atomic64_read(&ap_scan_bus_count)); } -static BUS_ATTR_RO(scans); +static ssize_t scans_store(struct bus_type *bus, const char *buf, + size_t count) +{ + AP_DBF_INFO("%s force AP bus rescan\n", __func__); + + ap_bus_force_rescan(); + + return count; +} + +static BUS_ATTR_RW(scans); static ssize_t bindings_show(struct bus_type *bus, char *buf) { |