diff options
author | Vineeth Vijayan <vneethv@linux.ibm.com> | 2021-02-04 07:03:00 +0100 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2021-03-22 11:36:04 +0100 |
commit | 64a715ab4e91593465f62c8d9584dcc0279e5145 (patch) | |
tree | d6c952864d2b1d02d77522a0e0b12bf43fa4682c /drivers/s390 | |
parent | dee60c0dbc837ddca8abcb868e53ca3e9d11ea4c (diff) | |
download | linux-64a715ab4e91593465f62c8d9584dcc0279e5145.tar.bz2 |
s390/cio: introduce CIO debugfs directory
This patch introduces an s390 Common I/O layer debugfs directory that is
intended to provide access to debugging-related CIO functions and data.
The directory is created as /sys/kernel/debug/s390/cio
Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/Makefile | 2 | ||||
-rw-r--r-- | drivers/s390/cio/cio_debug.h | 3 | ||||
-rw-r--r-- | drivers/s390/cio/cio_debugfs.c | 23 |
3 files changed, 27 insertions, 1 deletions
diff --git a/drivers/s390/cio/Makefile b/drivers/s390/cio/Makefile index a9235f111e79..8622dba974c2 100644 --- a/drivers/s390/cio/Makefile +++ b/drivers/s390/cio/Makefile @@ -8,7 +8,7 @@ CFLAGS_trace.o := -I$(src) CFLAGS_vfio_ccw_trace.o := -I$(src) obj-y += airq.o blacklist.o chsc.o cio.o css.o chp.o idset.o isc.o \ - fcx.o itcw.o crw.o ccwreq.o trace.o ioasm.o + fcx.o itcw.o crw.o ccwreq.o trace.o ioasm.o cio_debugfs.o ccw_device-objs += device.o device_fsm.o device_ops.o ccw_device-objs += device_id.o device_pgid.o device_status.o obj-y += ccw_device.o cmf.o diff --git a/drivers/s390/cio/cio_debug.h b/drivers/s390/cio/cio_debug.h index 7bdbe73707c2..e6dcbd1be244 100644 --- a/drivers/s390/cio/cio_debug.h +++ b/drivers/s390/cio/cio_debug.h @@ -26,4 +26,7 @@ static inline void CIO_HEX_EVENT(int level, void *data, int length) debug_event(cio_debug_trace_id, level, data, length); } +/* For the CIO debugfs related features */ +extern struct dentry *cio_debugfs_dir; + #endif diff --git a/drivers/s390/cio/cio_debugfs.c b/drivers/s390/cio/cio_debugfs.c new file mode 100644 index 000000000000..0a3656fb5ad0 --- /dev/null +++ b/drivers/s390/cio/cio_debugfs.c @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * S/390 common I/O debugfs interface + * + * Copyright IBM Corp. 2021 + * Author(s): Vineeth Vijayan <vneethv@linux.ibm.com> + */ + +#include <linux/debugfs.h> +#include "cio_debug.h" + +struct dentry *cio_debugfs_dir; + +/* Create the debugfs directory for CIO under the arch_debugfs_dir + * i.e /sys/kernel/debug/s390/cio + */ +static int __init cio_debugfs_init(void) +{ + cio_debugfs_dir = debugfs_create_dir("cio", arch_debugfs_dir); + + return 0; +} +subsys_initcall(cio_debugfs_init); |