cxl: Rework the implementation of cxl_stop_trace_psl9()
commitcbb55eeb49b116bb3880137661ad8ce1ed45d672
authorVaibhav Jain <vaibhav@linux.vnet.ibm.com>
Wed, 11 Oct 2017 12:30:20 +0000 (11 18:00 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 6 Nov 2017 05:48:17 +0000 (6 16:48 +1100)
treeb32d3ed818fe08fd642d02b9df22616ee87a7af5
parentac0761ebcb08830d8f64b9181f6736b1a00bf746
cxl: Rework the implementation of cxl_stop_trace_psl9()

Presently the PSL9 specific cxl_stop_trace_psl9() only stops the RX0
traces on the CXL adapter when a PSL error irq is triggered. The patch
updates the function to stop all the traces arrays and move them to
the FIN state. The implementation issues the mmio to TRACECFG register
to stop the trace array iff it already not in FIN state. This prevents
the issue of trace data being reset in case of multiple stop mmio
issued for a single trace array.

Also the patch does some refactoring of existing cxl_stop_trace_psl9()
and cxl_stop_trace_psl8() functions by moving them to 'pci.c' from
'debugfs.c' file and marking them as static.

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>
drivers/misc/cxl/cxl.h
drivers/misc/cxl/debugfs.c
drivers/misc/cxl/pci.c