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

cxl: Rename register PSL9_FIR2 to PSL9_FIR_MASK

PSL9 doesn't have a FIR2 register as was the case with PSL8. However
currently the register definitions in 'cxl.h' have a definition for
PSL9_FIR2 that actually points to PSL9_FIR_MASK register in the P1
area at offset 0x308.

So this patch renames the def PSL9_FIR2 to PSL9_FIR_MASK and updates
the references in the code to point to the new identifier. It also
removes the code to dump contents of FIR2 (FIR_MASK actually) in
cxl_native_irq_dump_regs_psl9().

Fixes: f24be42aab37 ("cxl: Add psl9 specific code")
Reported-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Vaibhav Jain and committed by
Michael Ellerman
8f6a9042 56328743

+4 -5
+1 -1
drivers/misc/cxl/cxl.h
··· 104 104 static const cxl_p1_reg_t CXL_XSL9_DEF = {0x0140}; 105 105 static const cxl_p1_reg_t CXL_XSL9_DSNCTL = {0x0168}; 106 106 static const cxl_p1_reg_t CXL_PSL9_FIR1 = {0x0300}; 107 - static const cxl_p1_reg_t CXL_PSL9_FIR2 = {0x0308}; 107 + static const cxl_p1_reg_t CXL_PSL9_FIR_MASK = {0x0308}; 108 108 static const cxl_p1_reg_t CXL_PSL9_Timebase = {0x0310}; 109 109 static const cxl_p1_reg_t CXL_PSL9_DEBUG = {0x0320}; 110 110 static const cxl_p1_reg_t CXL_PSL9_FIR_CNTL = {0x0348};
+2 -1
drivers/misc/cxl/debugfs.c
··· 62 62 void cxl_debugfs_add_adapter_regs_psl9(struct cxl *adapter, struct dentry *dir) 63 63 { 64 64 debugfs_create_io_x64("fir1", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_FIR1)); 65 - debugfs_create_io_x64("fir2", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_FIR2)); 65 + debugfs_create_io_x64("fir_mask", 0400, dir, 66 + _cxl_p1_addr(adapter, CXL_PSL9_FIR_MASK)); 66 67 debugfs_create_io_x64("fir_cntl", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_FIR_CNTL)); 67 68 debugfs_create_io_x64("trace", S_IRUSR | S_IWUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_TRACECFG)); 68 69 }
+1 -3
drivers/misc/cxl/native.c
··· 1085 1085 1086 1086 void cxl_native_irq_dump_regs_psl9(struct cxl_context *ctx) 1087 1087 { 1088 - u64 fir1, fir2, serr; 1088 + u64 fir1, serr; 1089 1089 1090 1090 fir1 = cxl_p1_read(ctx->afu->adapter, CXL_PSL9_FIR1); 1091 - fir2 = cxl_p1_read(ctx->afu->adapter, CXL_PSL9_FIR2); 1092 1091 1093 1092 dev_crit(&ctx->afu->dev, "PSL_FIR1: 0x%016llx\n", fir1); 1094 - dev_crit(&ctx->afu->dev, "PSL_FIR2: 0x%016llx\n", fir2); 1095 1093 if (ctx->afu->adapter->native->sl_ops->register_serr_irq) { 1096 1094 serr = cxl_p1n_read(ctx->afu, CXL_PSL_SERR_An); 1097 1095 cxl_afu_decode_psl_serr(ctx->afu, serr);