aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl/native.c
diff options
context:
space:
mode:
authorPhilippe Bergheaud <felix@linux.vnet.ibm.com>2016-07-05 07:08:06 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-07-08 08:22:03 -0400
commit6e0c50f9e814220ada60497c522b60a8e1cc1e92 (patch)
tree8d5b73479501c57446aeadb0a64032d4c024bd64 /drivers/misc/cxl/native.c
parentf5c9df9a442f586b183947627210e167ded81d19 (diff)
cxl: Refine slice error debug messages
The PSL Slice Error Register (PSL_SERR_An) reports implementation dependent AFU errors, in the form of a bitmap. The PSL_SERR_An register content is printed in the form of hex dump debug message. This patch decodes the PSL_ERR_An register contents, and prints a specific error message for each possible error bit. It also dumps the secondary registers AFU_ERR_An and PSL_DSISR_An, that may contain extra debug information. This patch also removes the large WARN message that used to report the cxl slice error interrupt, and replaces it by a short informative message, that draws attention to AFU implementation errors. Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com> Acked-by: Ian Munsie <imunsie@au1.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/misc/cxl/native.c')
-rw-r--r--drivers/misc/cxl/native.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/misc/cxl/native.c b/drivers/misc/cxl/native.c
index 04c27e41b654..3bcdaee11ba1 100644
--- a/drivers/misc/cxl/native.c
+++ b/drivers/misc/cxl/native.c
@@ -862,7 +862,7 @@ void cxl_native_psl_irq_dump_regs(struct cxl_context *ctx)
862 dev_crit(&ctx->afu->dev, "PSL_FIR2: 0x%016llx\n", fir2); 862 dev_crit(&ctx->afu->dev, "PSL_FIR2: 0x%016llx\n", fir2);
863 if (ctx->afu->adapter->native->sl_ops->register_serr_irq) { 863 if (ctx->afu->adapter->native->sl_ops->register_serr_irq) {
864 serr = cxl_p1n_read(ctx->afu, CXL_PSL_SERR_An); 864 serr = cxl_p1n_read(ctx->afu, CXL_PSL_SERR_An);
865 dev_crit(&ctx->afu->dev, "PSL_SERR_An: 0x%016llx\n", serr); 865 cxl_afu_decode_psl_serr(ctx->afu, serr);
866 } 866 }
867 dev_crit(&ctx->afu->dev, "PSL_FIR_SLICE_An: 0x%016llx\n", fir_slice); 867 dev_crit(&ctx->afu->dev, "PSL_FIR_SLICE_An: 0x%016llx\n", fir_slice);
868 dev_crit(&ctx->afu->dev, "CXL_PSL_AFU_DEBUG_An: 0x%016llx\n", afu_debug); 868 dev_crit(&ctx->afu->dev, "CXL_PSL_AFU_DEBUG_An: 0x%016llx\n", afu_debug);
@@ -956,21 +956,23 @@ void native_irq_wait(struct cxl_context *ctx)
956static irqreturn_t native_slice_irq_err(int irq, void *data) 956static irqreturn_t native_slice_irq_err(int irq, void *data)
957{ 957{
958 struct cxl_afu *afu = data; 958 struct cxl_afu *afu = data;
959 u64 fir_slice, errstat, serr, afu_debug; 959 u64 fir_slice, errstat, serr, afu_debug, afu_error, dsisr;
960 960
961 /* 961 /*
962 * slice err interrupt is only used with full PSL (no XSL) 962 * slice err interrupt is only used with full PSL (no XSL)
963 */ 963 */
964 WARN(irq, "CXL SLICE ERROR interrupt %i\n", irq);
965
966 serr = cxl_p1n_read(afu, CXL_PSL_SERR_An); 964 serr = cxl_p1n_read(afu, CXL_PSL_SERR_An);
967 fir_slice = cxl_p1n_read(afu, CXL_PSL_FIR_SLICE_An); 965 fir_slice = cxl_p1n_read(afu, CXL_PSL_FIR_SLICE_An);
968 errstat = cxl_p2n_read(afu, CXL_PSL_ErrStat_An); 966 errstat = cxl_p2n_read(afu, CXL_PSL_ErrStat_An);
969 afu_debug = cxl_p1n_read(afu, CXL_AFU_DEBUG_An); 967 afu_debug = cxl_p1n_read(afu, CXL_AFU_DEBUG_An);
970 dev_crit(&afu->dev, "PSL_SERR_An: 0x%016llx\n", serr); 968 afu_error = cxl_p2n_read(afu, CXL_AFU_ERR_An);
969 dsisr = cxl_p2n_read(afu, CXL_PSL_DSISR_An);
970 cxl_afu_decode_psl_serr(afu, serr);
971 dev_crit(&afu->dev, "PSL_FIR_SLICE_An: 0x%016llx\n", fir_slice); 971 dev_crit(&afu->dev, "PSL_FIR_SLICE_An: 0x%016llx\n", fir_slice);
972 dev_crit(&afu->dev, "CXL_PSL_ErrStat_An: 0x%016llx\n", errstat); 972 dev_crit(&afu->dev, "CXL_PSL_ErrStat_An: 0x%016llx\n", errstat);
973 dev_crit(&afu->dev, "CXL_PSL_AFU_DEBUG_An: 0x%016llx\n", afu_debug); 973 dev_crit(&afu->dev, "CXL_PSL_AFU_DEBUG_An: 0x%016llx\n", afu_debug);
974 dev_crit(&afu->dev, "AFU_ERR_An: 0x%.16llx\n", afu_error);
975 dev_crit(&afu->dev, "PSL_DSISR_An: 0x%.16llx\n", dsisr);
974 976
975 cxl_p1n_write(afu, CXL_PSL_SERR_An, serr); 977 cxl_p1n_write(afu, CXL_PSL_SERR_An, serr);
976 978