Commit 8944d05f authored by Harald Freudenberger's avatar Harald Freudenberger Committed by Vasily Gorbik

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: default avatarHarald Freudenberger <freude@linux.ibm.com>
Reviewed-by: default avatarJakob Naucke <naucke@linux.ibm.com>
Reviewed-by: default avatarJuergen Christ <jchrist@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 28391585
......@@ -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)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment