linux/drivers/s390/cio
Peter Oberparleiter 32ae4a2992 s390/cio: Fix CHPID "configure" attribute caching
In some environments, the SCLP firmware interface used to query a
CHPID's configured state is not supported. On these environments,
rapidly reading the corresponding sysfs attribute produces inconsistent
results:

  $ cat /sys/devices/css0/chp0.00/configure
  cat: /sys/devices/css0/chp0.00/configure: Operation not supported
  $ cat /sys/devices/css0/chp0.00/configure
  3

This occurs for example when Linux is run as a KVM guest. The
inconsistency is a result of CIO using cached results for generating
the value of the "configure" attribute while failing to handle the
situation where no data was returned by SCLP.

Fix this by not updating the cache-expiration timestamp when SCLP
returns no data. With the fix applied, the system response is
consistent:

  $ cat /sys/devices/css0/chp0.00/configure
  cat: /sys/devices/css0/chp0.00/configure: Operation not supported
  $ cat /sys/devices/css0/chp0.00/configure
  cat: /sys/devices/css0/chp0.00/configure: Operation not supported

Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Tested-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2025-02-11 19:35:08 +01:00
..
Makefile s390/cio: add CRW inject functionality 2021-03-22 11:36:04 +01:00
airq.c s390/irq: Set CIF_NOHZ_DELAY in do_io_irq() 2024-05-14 20:19:46 +02:00
blacklist.c s390/cio: avoid excessive path-verification requests 2021-09-27 13:54:38 +02:00
blacklist.h
ccwgroup.c s390/cio/ccwgroup: Switch over to sysfs_emit() 2024-10-25 16:03:25 +02:00
ccwreq.c
chp.c s390/cio: Fix CHPID "configure" attribute caching 2025-02-11 19:35:08 +01:00
chp.h s390/cio: Externalize full CMG characteristics 2024-11-13 14:31:31 +01:00
chsc.c s390/cio: Externalize full CMG characteristics 2024-11-13 14:31:31 +01:00
chsc.h s390/cio: Externalize full CMG characteristics 2024-11-13 14:31:31 +01:00
chsc_sch.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
chsc_sch.h
cio.c s390/cio: Do not unregister the subchannel based on DNV 2024-10-25 16:03:23 +02:00
cio.h s390/cio: Correct some typos in comments 2024-10-10 15:32:44 +02:00
cio_debug.h s390/cio: introduce CIO debugfs directory 2021-03-22 11:36:04 +01:00
cio_debugfs.c s390/cio: introduce CIO debugfs directory 2021-03-22 11:36:04 +01:00
cio_inject.c s390/cio: Ensure the copied buf is NUL terminated 2024-04-29 19:21:34 +02:00
cio_inject.h s390/cio: add CRW inject functionality 2021-03-22 11:36:04 +01:00
cmf.c s390/cio/cmf: Switch over to sysfs_emit() 2024-10-25 16:03:25 +02:00
crw.c s390: use control register bit defines 2023-09-19 13:26:57 +02:00
css.c s390/cio/css: Switch over to sysfs_emit() 2024-10-25 16:03:25 +02:00
css.h driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
device.c s390/cio/device: Switch over to sysfs_emit() 2024-10-25 16:03:25 +02:00
device.h s390/cio: remove pm support from ccw bus driver 2020-12-02 18:19:25 +01:00
device_fsm.c s390/cio: log fake IRB events 2024-04-12 16:13:03 +02:00
device_id.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
device_ops.c s390/cio: Use array indices instead of pointer arithmetic 2025-01-03 11:00:53 +01:00
device_pgid.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
device_status.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
eadm_sch.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
eadm_sch.h
fcx.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
idset.c bitmap: introduce generic optimized bitmap_size() 2024-04-01 10:49:28 +01:00
idset.h
io_sch.h s390/cio: remove pm support from ccw bus driver 2020-12-02 18:19:25 +01:00
ioasm.c s390/cio/ioasm: Convert to use flag output macros 2024-11-13 14:31:34 +01:00
ioasm.h
isc.c s390/ctlreg: add local and system prefix to some functions 2023-09-19 13:26:56 +02:00
itcw.c s390/cio: sort out physical vs virtual pointers usage 2022-12-01 10:58:04 +01:00
orb.h s390/cio: use bitwise types to allow for type checking 2024-03-13 09:23:46 +01:00
qdio.h s390/qdio: Move memory alloc/pointer arithmetic for slib and sl into one place 2025-01-03 11:00:53 +01:00
qdio_debug.c s390: move from strlcpy with unused retval to strscpy 2022-08-30 22:00:33 +02:00
qdio_debug.h s390/qdio: cleanly split alloc and establish 2020-04-06 13:13:50 +02:00
qdio_main.c s390/cio/qdio: Convert to use flag output macros 2024-11-13 14:31:34 +01:00
qdio_setup.c s390/qdio: Move memory alloc/pointer arithmetic for slib and sl into one place 2025-01-03 11:00:53 +01:00
qdio_thinint.c s390/drivers: Replace S390_lowcore by get_lowcore() 2024-06-18 17:01:33 +02:00
scm.c s390/cio/scm: Switch over to sysfs_emit() 2024-10-25 16:03:25 +02:00
trace.c
trace.h s390/drivers: Replace S390_lowcore by get_lowcore() 2024-06-18 17:01:33 +02:00
vfio_ccw_async.c vfio/ccw: Remove private->mdev 2022-07-07 14:06:12 -06:00
vfio_ccw_chp.c eventfd: simplify eventfd_signal() 2023-11-28 14:08:38 +01:00
vfio_ccw_cp.c s390/vfio_ccw: Fix target addresses of TIC CCWs 2024-07-03 12:05:32 +02:00
vfio_ccw_cp.h vfio/ccw: simplify the cp_get_orb interface 2023-01-09 14:34:07 +01:00
vfio_ccw_drv.c s390/cio: Add missing MODULE_DESCRIPTION() macros 2024-07-31 16:30:20 +02:00
vfio_ccw_fsm.c s390/vfio_ccw: fix virtual vs physical address confusion 2024-03-13 09:23:45 +01:00
vfio_ccw_ops.c eventfd: simplify eventfd_signal() 2023-11-28 14:08:38 +01:00
vfio_ccw_private.h vfio/ccw: replace one-element array with flexible-array member 2023-06-01 17:07:55 +02:00
vfio_ccw_trace.c vfio-ccw: Add trace for CRW event 2020-06-03 11:28:19 +02:00
vfio_ccw_trace.h vfio-ccw: Add trace for CRW event 2020-06-03 11:28:19 +02:00