From fb036c7ac79fb4cb86529ccdd0be42cbee54c91a Mon Sep 17 00:00:00 2001 From: Lina Iyer Date: Tue, 29 Sep 2020 16:50:46 -0600 Subject: [PATCH 1/2] drivers: qcom: rpmh: optimize RPMh debug for perf images Let's us not worry about reporting RPM retries in perf builds. This should help speed up the boot process. Change-Id: Ia0d64e7da293bd8e77fd1484a714c8f21121e3fb Signed-off-by: Lina Iyer --- drivers/soc/qcom/Kconfig | 8 ++++++++ drivers/soc/qcom/rpmh-rsc.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index adee1670911c..b9ea12ac9311 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -367,6 +367,14 @@ config QCOM_RPMH of hardware components aggregate requests for these resources and help apply the aggregated state on the resource. +config QCOM_RPMH_QGKI_DEBUG + bool "Enhance RPMh debug for QGKI variants" + depends on QCOM_RPMH + help + Adding debug prints increases latency of handling RPMh requests. This + is specially notable during the boot process. Let's selectively remove + some tracing that are more informative than an actual error. + config QCOM_RPMHPD tristate "Qualcomm RPMh Power domain driver" depends on QCOM_RPMH && QCOM_COMMAND_DB diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c index 1a3a19eab131..be993305546b 100644 --- a/drivers/soc/qcom/rpmh-rsc.c +++ b/drivers/soc/qcom/rpmh-rsc.c @@ -469,6 +469,7 @@ int rpmh_rsc_send_data(struct rsc_drv *drv, const struct tcs_request *msg) do { ret = tcs_write(drv, msg); if (ret == -EBUSY) { +#ifdef QCOM_RPMH_QGKI_DEBUG bool irq_sts; irq_get_irqchip_state(drv->irq, IRQCHIP_STATE_PENDING, @@ -477,6 +478,7 @@ int rpmh_rsc_send_data(struct rsc_drv *drv, const struct tcs_request *msg) drv->name, msg->cmds[0].addr, irq_sts ? "PENDING" : "NOT PENDING"); +#endif /* QCOM_RPMH_QGKI_DEBUG */ udelay(10); } } while (ret == -EBUSY); From 6d1b0cfaeaafaced0dd24447b18d69b33b02e76c Mon Sep 17 00:00:00 2001 From: Lina Iyer Date: Tue, 29 Sep 2020 17:16:15 -0600 Subject: [PATCH 2/2] defconfig: enable rpmh retry debug prints for lahiana Enable printing of rate limited RPMH debug information to indicate transient RPMH communication issues for Lahaina debug. This config item will not be enabled in perf builds. Change-Id: Ic154bf62099b0c5ec52b2c3c5caf7023b0f049e2 Signed-off-by: Lina Iyer --- arch/arm64/configs/vendor/lahaina_debug.config | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/vendor/lahaina_debug.config b/arch/arm64/configs/vendor/lahaina_debug.config index cba791f3d633..db531583aa81 100644 --- a/arch/arm64/configs/vendor/lahaina_debug.config +++ b/arch/arm64/configs/vendor/lahaina_debug.config @@ -18,3 +18,4 @@ CONFIG_DEBUG_RWSEMS=y CONFIG_DEBUG_MUTEXES=y CONFIG_WQ_WATCHDOG=y CONFIG_PSTORE_PMSG=y +CONFIG_QCOM_RPMH_QGKI_DEBUG=y