On Tue, 2025-04-29 at 18:42 +0200, Greg Kroah-Hartman wrote:
6.1-stable review patch. If anyone has any objections, please let me know.
From: Niklas Schnelle schnelle@linux.ibm.com
[ Upstream commit 4ec6054e7321dc24ebccaa08b3af0d590f5666e6 ]
Add a mechanism with which the status of PCI error recovery runs is reported to the platform. Together with the status supply additional information that may aid in problem determination.
Reviewed-by: Halil Pasic pasic@linux.ibm.com Signed-off-by: Niklas Schnelle schnelle@linux.ibm.com Signed-off-by: Alexander Gordeev agordeev@linux.ibm.com Stable-dep-of: aa9f168d55dc ("s390/pci: Support mmap() of PCI resources except for ISM devices") Signed-off-by: Sasha Levin sashal@kernel.org
arch/s390/include/asm/sclp.h | 33 +++++++++++ arch/s390/pci/Makefile | 2 +- arch/s390/pci/pci_event.c | 21 +++++-- arch/s390/pci/pci_report.c | 111 +++++++++++++++++++++++++++++++++++ arch/s390/pci/pci_report.h | 16 +++++ drivers/s390/char/sclp.h | 14 ----- drivers/s390/char/sclp_pci.c | 19 ------ 7 files changed, 178 insertions(+), 38 deletions(-) create mode 100644 arch/s390/pci/pci_report.c create mode 100644 arch/s390/pci/pci_report.h
diff --git a/arch/s390/include/asm/sclp.h b/arch/s390/include/asm/sclp.h index 9d4c7f71e070f..e64dac00e7bf7 100644 --- a/arch/s390/include/asm/sclp.h +++ b/arch/s390/include/asm/sclp.h
--- snip ---
diff --git a/arch/s390/pci/pci_report.c b/arch/s390/pci/pci_report.c new file mode 100644 index 0000000000000..2754c9c161f5b --- /dev/null +++ b/arch/s390/pci/pci_report.c @@ -0,0 +1,111 @@ +// SPDX-License-Identifier: GPL-2.0 +/*
- Copyright IBM Corp. 2024
- Author(s):
- Niklas Schnelle schnelle@linux.ibm.com
- */
+#define KMSG_COMPONENT "zpci" +#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+#include <linux/kernel.h> +#include <linux/sprintf.h>
This seems to cause a compile error due to missing linux/sprintf.h, not sure if that is a good target for a backport? I also don't remember running into this during my backports for the enterprise distributions so maybe they have that backported.
Also, this was pulled in as a dependency for commit aa9f168d55dc ("s390/pci: Support mmap() of PCI resources except for ISM devices") but I'm not sure why that would depend on this? The only thing I can think of is the Makefile change to add pci_fixup.c also having pci_report.c in it.
For context I did backports for this for RHEL 10.0, and RHEL 9.6 and it was also backported for Ubuntu 25.04 and SLES 16 SP 0. That was for a larger series of improving debug information gathering though not as dependencies. There I included the following upstream commits:
897614f90f7c ("s390/debug: Pass in and enforce output buffer size for format handlers") 4c41a48f5f3e ("s390/pci: Add pci_msg debug view to PCI report") dc18c81a57e7 ("s390/debug: Add a reverse mode for debug_dump()") 5f952dae48d0 ("s390/debug: Add debug_dump() to write debug view to a string buffer") 460c52a57f83 ("s390/debug: Split private data alloc/free out of file operations") 7832b3047d10 ("s390/debug: Simplify and document debug_next_entry() logic") 4ec6054e7321 ("s390/pci: Report PCI error recovery results via SCLP")
Not sure what the stable policy is on such stuff and if staying in sync with the above mentioned distributions for s390 is desirable and/or worth the effort.
Thanks, Niklas