summaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl/hcalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/cxl/hcalls.c')
-rw-r--r--drivers/misc/cxl/hcalls.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/misc/cxl/hcalls.c b/drivers/misc/cxl/hcalls.c
index 24131e2537c5..d6d11f4056d7 100644
--- a/drivers/misc/cxl/hcalls.c
+++ b/drivers/misc/cxl/hcalls.c
@@ -13,6 +13,7 @@
#include <linux/delay.h>
#include <asm/byteorder.h>
#include "hcalls.h"
+#include "trace.h"
#define CXL_HCALL_TIMEOUT 60000
#define CXL_HCALL_TIMEOUT_DOWNLOAD 120000
@@ -141,6 +142,7 @@ long cxl_h_attach_process(u64 unit_address,
CXL_H_WAIT_UNTIL_DONE(rc, retbuf, H_ATTACH_CA_PROCESS, unit_address, virt_to_phys(element));
_PRINT_MSG(rc, "cxl_h_attach_process(%#.16llx, %#.16lx): %li\n",
unit_address, virt_to_phys(element), rc);
+ trace_cxl_hcall_attach(unit_address, virt_to_phys(element), retbuf[0], retbuf[1], retbuf[2], rc);
pr_devel("token: 0x%.8lx mmio_addr: 0x%lx mmio_size: 0x%lx\nProcess Element Structure:\n",
retbuf[0], retbuf[1], retbuf[2]);
@@ -180,6 +182,7 @@ long cxl_h_detach_process(u64 unit_address, u64 process_token)
CXL_H_WAIT_UNTIL_DONE(rc, retbuf, H_DETACH_CA_PROCESS, unit_address, process_token);
_PRINT_MSG(rc, "cxl_h_detach_process(%#.16llx, 0x%.8llx): %li\n", unit_address, process_token, rc);
+ trace_cxl_hcall_detach(unit_address, process_token, rc);
switch (rc) {
case H_SUCCESS: /* The process was detached from the coherent platform function */
@@ -212,6 +215,7 @@ static long cxl_h_control_function(u64 unit_address, u64 op,
CXL_H9_WAIT_UNTIL_DONE(rc, retbuf, H_CONTROL_CA_FUNCTION, unit_address, op, p1, p2, p3, p4);
_PRINT_MSG(rc, "cxl_h_control_function(%#.16llx, %s(%#llx, %#llx, %#llx, %#llx, R4: %#lx)): %li\n",
unit_address, OP_STR_AFU(op), p1, p2, p3, p4, retbuf[0], rc);
+ trace_cxl_hcall_control_function(unit_address, OP_STR_AFU(op), p1, p2, p3, p4, retbuf[0], rc);
switch (rc) {
case H_SUCCESS: /* The operation is completed for the coherent platform function */
@@ -405,6 +409,7 @@ long cxl_h_collect_int_info(u64 unit_address, u64 process_token,
unit_address, process_token);
_PRINT_MSG(rc, "cxl_h_collect_int_info(%#.16llx, 0x%llx): %li\n",
unit_address, process_token, rc);
+ trace_cxl_hcall_collect_int_info(unit_address, process_token, rc);
switch (rc) {
case H_SUCCESS: /* The interrupt info is returned in return registers. */
@@ -448,6 +453,8 @@ long cxl_h_control_faults(u64 unit_address, u64 process_token,
_PRINT_MSG(rc, "cxl_h_control_faults(%#.16llx, 0x%llx, %#llx, %#llx): %li (%#lx)\n",
unit_address, process_token, control_mask, reset_mask,
rc, retbuf[0]);
+ trace_cxl_hcall_control_faults(unit_address, process_token,
+ control_mask, reset_mask, retbuf[0], rc);
switch (rc) {
case H_SUCCESS: /* Faults were successfully controlled for the function. */
@@ -481,6 +488,7 @@ static long cxl_h_control_facility(u64 unit_address, u64 op,
CXL_H9_WAIT_UNTIL_DONE(rc, retbuf, H_CONTROL_CA_FACILITY, unit_address, op, p1, p2, p3, p4);
_PRINT_MSG(rc, "cxl_h_control_facility(%#.16llx, %s(%#llx, %#llx, %#llx, %#llx, R4: %#lx)): %li\n",
unit_address, OP_STR_CONTROL_ADAPTER(op), p1, p2, p3, p4, retbuf[0], rc);
+ trace_cxl_hcall_control_facility(unit_address, OP_STR_CONTROL_ADAPTER(op), p1, p2, p3, p4, retbuf[0], rc);
switch (rc) {
case H_SUCCESS: /* The operation is completed for the coherent platform facility */
@@ -587,6 +595,7 @@ static long cxl_h_download_facility(u64 unit_address, u64 op,
}
_PRINT_MSG(rc, "cxl_h_download_facility(%#.16llx, %s(%#llx, %#llx), %#lx): %li\n",
unit_address, OP_STR_DOWNLOAD_ADAPTER(op), list_address, num, retbuf[0], rc);
+ trace_cxl_hcall_download_facility(unit_address, OP_STR_DOWNLOAD_ADAPTER(op), list_address, num, retbuf[0], rc);
switch (rc) {
case H_SUCCESS: /* The operation is completed for the coherent platform facility */