cxl: Enable NORST bit in PSL_DEBUG register for PSL9
PATCH 1/1 cxl: Enable NORST bit in PSL_DEBUG register for PSL9
We enable the NORST bit by default for debug afu images to prevent reset of AFU trace-data on a PCI link drop. For production AFU images this bit is always ignored and PSL gets reconfigured anyways thereby resetting the trace data. So setting this bit for non-debug images doesn't have any impact.
--- drivers/misc/cxl/pci.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/misc/cxl/pci.c +6 -2
@@ -503,8 +503,12 @@ static int init_implementation_adapter_regs_psl9(struct cxl *adapter,if (cxl_is_power9_dd1 ()) {/* Disabling deadlock counter CAR */ cxl_p1_write (adapter,CXL_PSL9_GP_CT ,0x0020000000000001ULL ); - }else -cxl_p1_write (adapter,CXL_PSL9_DEBUG ,0x4000000000000000ULL ); +/* Enable NORST */ +cxl_p1_write (adapter,CXL_PSL9_DEBUG ,0x8000000000000000ULL ); + }else { +/* Enable NORST and DD2 features */ +cxl_p1_write (adapter,CXL_PSL9_DEBUG ,0xC000000000000000ULL ); + }return 0 ; }
Signature · 1 line
2.14.3
Le 09/02/2018 à 05:09, Vaibhav Jain a écrit :
Quoted 21 lines
We enable the NORST bit by default for debug afu images to prevent reset of AFU trace-data on a PCI link drop. For production AFU images this bit is always ignored and PSL gets reconfigured anyways thereby resetting the trace data. So setting this bit for non-debug images doesn't have any impact.
Signed-off-by Vaibhav Jain <[email protected]>--- drivers/misc/cxl/pci.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/misc/cxl/pci.c +0
-1@@ -503,8 +503,12 @@ static int init_implementation_adapter_regs_psl9(struct cxl *adapter,if (cxl_is_power9_dd1 ()) {/* Disabling deadlock counter CAR */ cxl_p1_write (adapter,CXL_PSL9_GP_CT ,0x0020000000000001ULL ); - }else
drivers/misc/cxl/pci.c static int init_implementation_adapter_regs_psl9(struct cxl *adapter, · line 514
Quoted 10 lines
drivers/misc/cxl/pci.c +6
-1-cxl_p1_write (adapter,CXL_PSL9_DEBUG ,0x4000000000000000ULL ); +/* Enable NORST */ +cxl_p1_write (adapter,CXL_PSL9_DEBUG ,0x8000000000000000ULL ); + }else { +/* Enable NORST and DD2 features */ +cxl_p1_write (adapter,CXL_PSL9_DEBUG ,0xC000000000000000ULL ); + }return 0 ; }
Le 09/02/2018 à 05:09, Vaibhav Jain a écrit :
Quoted 8 lines
We enable the NORST bit by default for debug afu images to prevent reset of AFU trace-data on a PCI link drop. For production AFU images this bit is always ignored and PSL gets reconfigured anyways thereby resetting the trace data. So setting this bit for non-debug images doesn't have any impact.
Signed-off-by Vaibhav Jain <[email protected]>---
btw, we should start removing dd1 code, it's not like anybody is going to try that now.
Fred
Quoted 23 lines
drivers/misc/cxl/pci.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/misc/cxl/pci.c +6
-2@@ -503,8 +503,12 @@ static int init_implementation_adapter_regs_psl9(struct cxl *adapter,if (cxl_is_power9_dd1 ()) {/* Disabling deadlock counter CAR */ cxl_p1_write (adapter,CXL_PSL9_GP_CT ,0x0020000000000001ULL ); - }else -cxl_p1_write (adapter,CXL_PSL9_DEBUG ,0x4000000000000000ULL ); +/* Enable NORST */ +cxl_p1_write (adapter,CXL_PSL9_DEBUG ,0x8000000000000000ULL ); + }else { +/* Enable NORST and DD2 features */ +cxl_p1_write (adapter,CXL_PSL9_DEBUG ,0xC000000000000000ULL ); + }return 0 ; }
Quoted 7 lines · Vaibhav Jain
We enable the NORST bit by default for debug afu images to prevent reset of AFU trace-data on a PCI link drop. For production AFU images this bit is always ignored and PSL gets reconfigured anyways thereby resetting the trace data. So setting this bit for non-debug images doesn't have any impact.
Signed-off-by Vaibhav Jain <[email protected]>
Signature · 2 lines
Andrew Donnellan OzLabs, ADL Canberra [email protected] IBM Australia Limited
Michael Ellerman
AppliedQuoted 10 lines · Vaibhav Jain
We enable the NORST bit by default for debug afu images to prevent reset of AFU trace-data on a PCI link drop. For production AFU images this bit is always ignored and PSL gets reconfigured anyways thereby resetting the trace data. So setting this bit for non-debug images doesn't have any impact.
Signed-off-by Vaibhav Jain <[email protected]>Reviewed-by Christophe Lombard <[email protected]>Acked-by Frederic Barrat <[email protected]>Acked-by Andrew Donnellan <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/03ebb419b896e0fb2da3f34b57d45e
cheers