soc: qcom: rpmh: Add completion status to rpmh debug information
Linux kernel lockup case can be either due to RSC interrupt pending at GIC unable to service or due to completion did not get a chance to run and finish. Currently rpmh debug only prints pending IRQ status at GIC. Add completion status as well to rpmh debug information. Change-Id: Iaee639f744be19c2cffb701547623c19bdabfb30 Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
This commit is contained in:
parent
c5d20367bc
commit
6bcbd9920b
@ -1,5 +1,5 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. */
|
||||
/* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */
|
||||
|
||||
#ifndef __RPM_INTERNAL_H__
|
||||
#define __RPM_INTERNAL_H__
|
||||
@ -123,5 +123,5 @@ int rpmh_rsc_write_pdc_data(struct rsc_drv *drv, const struct tcs_request *msg);
|
||||
|
||||
void rpmh_tx_done(const struct tcs_request *msg, int r);
|
||||
|
||||
void rpmh_rsc_debug(struct rsc_drv *drv);
|
||||
void rpmh_rsc_debug(struct rsc_drv *drv, struct completion *compl);
|
||||
#endif /* __RPM_INTERNAL_H__ */
|
||||
|
@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. */
|
||||
/* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */
|
||||
|
||||
#define pr_fmt(fmt) "%s " fmt, KBUILD_MODNAME
|
||||
|
||||
@ -708,7 +708,7 @@ static void print_tcs_info(struct rsc_drv *drv, int tcs_id, unsigned long *accl)
|
||||
}
|
||||
}
|
||||
|
||||
void rpmh_rsc_debug(struct rsc_drv *drv)
|
||||
void rpmh_rsc_debug(struct rsc_drv *drv, struct completion *compl)
|
||||
{
|
||||
struct irq_data *rsc_irq_data = irq_get_irq_data(drv->irq);
|
||||
bool irq_sts;
|
||||
@ -734,6 +734,8 @@ void rpmh_rsc_debug(struct rsc_drv *drv)
|
||||
irq_get_irqchip_state(drv->irq, IRQCHIP_STATE_PENDING, &irq_sts);
|
||||
pr_warn("HW IRQ %lu is %s at GIC\n", rsc_irq_data->hwirq,
|
||||
irq_sts ? "PENDING" : "NOT PENDING");
|
||||
pr_warn("Completion is %s to finish\n",
|
||||
completion_done(compl) ? "PENDING" : "NOT PENDING");
|
||||
|
||||
for_each_set_bit(i, &accl, ARRAY_SIZE(accl_str)) {
|
||||
strlcat(str, accl_str[i], sizeof(str));
|
||||
|
@ -336,7 +336,7 @@ int rpmh_write(const struct device *dev, enum rpmh_state state,
|
||||
|
||||
ret = wait_for_completion_timeout(&compl, RPMH_TIMEOUT_MS);
|
||||
if (!ret) {
|
||||
rpmh_rsc_debug(ctrlr_to_drv(ctrlr));
|
||||
rpmh_rsc_debug(ctrlr_to_drv(ctrlr), &compl);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
@ -480,7 +480,7 @@ int rpmh_write_batch(const struct device *dev, enum rpmh_state state,
|
||||
* the completion that we're going to free once
|
||||
* we've returned from this function.
|
||||
*/
|
||||
rpmh_rsc_debug(ctrlr_to_drv(ctrlr));
|
||||
rpmh_rsc_debug(ctrlr_to_drv(ctrlr), &compls[i]);
|
||||
ret = -ETIMEDOUT;
|
||||
goto exit;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user