Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Vineeth Vijayan and committed by
Heiko Carstens
64a715ab dee60c0d

+27 -1
+1 -1
drivers/s390/cio/Makefile
··· 8 8 CFLAGS_vfio_ccw_trace.o := -I$(src) 9 9 10 10 obj-y += airq.o blacklist.o chsc.o cio.o css.o chp.o idset.o isc.o \ 11 - fcx.o itcw.o crw.o ccwreq.o trace.o ioasm.o 11 + fcx.o itcw.o crw.o ccwreq.o trace.o ioasm.o cio_debugfs.o 12 12 ccw_device-objs += device.o device_fsm.o device_ops.o 13 13 ccw_device-objs += device_id.o device_pgid.o device_status.o 14 14 obj-y += ccw_device.o cmf.o
+3
drivers/s390/cio/cio_debug.h
··· 26 26 debug_event(cio_debug_trace_id, level, data, length); 27 27 } 28 28 29 + /* For the CIO debugfs related features */ 30 + extern struct dentry *cio_debugfs_dir; 31 + 29 32 #endif
+23
drivers/s390/cio/cio_debugfs.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * S/390 common I/O debugfs interface 4 + * 5 + * Copyright IBM Corp. 2021 6 + * Author(s): Vineeth Vijayan <vneethv@linux.ibm.com> 7 + */ 8 + 9 + #include <linux/debugfs.h> 10 + #include "cio_debug.h" 11 + 12 + struct dentry *cio_debugfs_dir; 13 + 14 + /* Create the debugfs directory for CIO under the arch_debugfs_dir 15 + * i.e /sys/kernel/debug/s390/cio 16 + */ 17 + static int __init cio_debugfs_init(void) 18 + { 19 + cio_debugfs_dir = debugfs_create_dir("cio", arch_debugfs_dir); 20 + 21 + return 0; 22 + } 23 + subsys_initcall(cio_debugfs_init);