aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/include
diff options
context:
space:
mode:
authorTim Sell <Timothy.Sell@unisys.com>2016-11-03 11:44:16 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-07 10:56:38 +0100
commit8217becc1b416e348d1bc8fcb54c09967e0f4987 (patch)
tree38dd76716bbf4e3da93b6592c3704834d5cca7ee /drivers/staging/unisys/include
parentstaging: unisys: visorbus: move DEVICE_ATTR_RO defs as-per conventions (diff)
downloadlinux-dev-8217becc1b416e348d1bc8fcb54c09967e0f4987.tar.xz
linux-dev-8217becc1b416e348d1bc8fcb54c09967e0f4987.zip
staging: unisys: visorbus: convert client_bus_info sysfs to debugfs
Previously, the sysfs entry (assuming traditional sysfs mountpoint): /sys/bus/visorbus/devices/visorbus<n>/client_bus_info violated kernel conventions by printing more than one item. This along with the fact that the data emitted was diagnostic data (intended to shadow the client driver info provided via s-Par livedumps) made it a logical candidate for debugfs. So this patch moves this sysfs entry to debugfs as (assuming traditional debugfs mountpoint): /sys/kernel/debug/visorbus/visorbus<n>/client_bus_info Data for this debugfs is emitted using the preferred seq_file interface, which allowed a vastly-simplified version of vbuschannel_print_devinfo() to format the individual output components. Functionality was verified as follows: [root@sparguest visorbus]# mount | grep debug debugfs on /sys/kernel/debug type debugfs (rw) [root@sparguest visorbus]# pwd /sys/kernel/debug/visorbus [root@sparguest visorbus]# l visorbus1/ total 0 drwxr-xr-x 2 root root 0 Sep 28 16:36 . drwxr-xr-x 4 root root 0 Sep 28 16:36 .. -r--r----- 1 root root 0 Sep 28 16:36 client_bus_info [root@sparguest visorbus]# l visorbus2 total 0 drwxr-xr-x 2 root root 0 Sep 28 16:36 . drwxr-xr-x 4 root root 0 Sep 28 16:36 .. -r--r----- 1 root root 0 Sep 28 16:36 client_bus_info [root@sparguest visorbus]# cat visorbus1/client_bus_info Client device / client driver info for s-Par Console partition (vbus #1): chipset visorchipset kernel ver. 4.8.0-rc6-ARCH+ clientbus visorbus kernel ver. 4.8.0-rc6-ARCH+ [2]keyboard visorinput kernel ver. 4.8.0-rc6-ARCH+ [3]mouse visorinput kernel ver. 4.8.0-rc6-ARCH+ [root@sparguest visorbus]# cat visorbus2/client_bus_info Client device / client driver info for s-Par IOVM partition (vbus #2): chipset visorchipset kernel ver. 4.8.0-rc6-ARCH+ clientbus visorbus kernel ver. 4.8.0-rc6-ARCH+ [0]ultravnic visornic kernel ver. 4.8.0-rc6-ARCH+ [1]ultravnic visornic kernel ver. 4.8.0-rc6-ARCH+ [2]sparvhba visorhba kernel ver. 4.8.0-rc6-ARCH+ Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/include')
-rw-r--r--drivers/staging/unisys/include/visorbus.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index 677627c72c4c..03d56f818a86 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -166,6 +166,8 @@ struct visor_device {
struct controlvm_message_header *pending_msg_hdr;
void *vbus_hdr_info;
uuid_le partition_uuid;
+ struct dentry *debugfs_dir;
+ struct dentry *debugfs_client_bus_info;
};
#define to_visor_device(x) container_of(x, struct visor_device, device)