mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 19:21:28 +02:00
soc: qcom: rpmh-rsc: Add fast-path TCS to debug dump
When we crash the system and display the TCS controller state, let's also dump the fast-path TCS information if there was an active transaction going on at that time. Change-Id: Iabc7b8af22dd148fca617e571f1392ba3d9a93ab Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
This commit is contained in:
parent
106bcadd4a
commit
8ff0d62cc3
|
|
@ -760,14 +760,14 @@ static void print_tcs_info(struct rsc_drv *drv, int tcs_id, unsigned long *accl,
|
|||
bool in_use = test_bit(tcs_id, drv->tcs_in_use);
|
||||
int i;
|
||||
|
||||
if (!tcs_grp || !req)
|
||||
return;
|
||||
|
||||
sts = read_tcs_reg(drv, RSC_DRV_STATUS, tcs_id);
|
||||
cmds_enabled = read_tcs_reg(drv, RSC_DRV_CMD_ENABLE, tcs_id);
|
||||
if (!cmds_enabled)
|
||||
return;
|
||||
|
||||
if (!tcs_grp || !req)
|
||||
goto print_tcs_data;
|
||||
|
||||
data = read_tcs_reg(drv, RSC_DRV_CONTROL, tcs_id);
|
||||
irq_sts = readl_relaxed(drv->tcs_base + RSC_DRV_IRQ_STATUS);
|
||||
pr_warn("Request: tcs-in-use:%s active_tcs=%s(%d) state=%d wait_for_compl=%u]\n",
|
||||
|
|
@ -780,6 +780,7 @@ static void print_tcs_info(struct rsc_drv *drv, int tcs_id, unsigned long *accl,
|
|||
|
||||
*aoss_irq_sts = (irq_sts & BIT(tcs_id)) ? true : false;
|
||||
|
||||
print_tcs_data:
|
||||
for_each_set_bit(i, &cmds_enabled, MAX_CMDS_PER_TCS) {
|
||||
addr = read_tcs_cmd(drv, RSC_DRV_CMD_ADDR, tcs_id, i);
|
||||
data = read_tcs_cmd(drv, RSC_DRV_CMD_DATA, tcs_id, i);
|
||||
|
|
@ -834,6 +835,17 @@ void rpmh_rsc_debug(struct rsc_drv *drv, struct completion *compl)
|
|||
else if (gic_irq_sts)
|
||||
pr_warn("ERROR:Possible lockup in Linux\n");
|
||||
|
||||
/* Show fast path status, if the TCS is busy */
|
||||
if (drv->tcs[FAST_PATH_TCS].num_tcs) {
|
||||
int tcs_id = drv->tcs[FAST_PATH_TCS].offset;
|
||||
bool sts = read_tcs_reg(drv, RSC_DRV_STATUS, tcs_id);
|
||||
|
||||
if (!sts) {
|
||||
pr_err("Fast-path TCS information:\n");
|
||||
print_tcs_info(drv, tcs_id, &accl, &aoss_irq_sts);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* The TCS(s) are busy waiting, we have no way to recover from this.
|
||||
* If this debug function is called, we assume it's because timeout
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user