From fb1cb85c77f3aeccb9dc49d8827aa4fac9c3a120 Mon Sep 17 00:00:00 2001 From: Raghavendra Rao Ananta Date: Sun, 1 Mar 2020 22:06:30 -0800 Subject: [PATCH 1/4] qcom_scm: Add entry for minidump download mode Add QCOM_DOWNLOAD_MINIDUMP as an entry into the download mode options for the qcom_scm driver. Change-Id: Ied3dcd5831a4a6068e891e36dd5ee34a2102f353 Signed-off-by: Raghavendra Rao Ananta --- include/linux/qcom_scm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/qcom_scm.h b/include/linux/qcom_scm.h index bf0e2bbc40e6..49e8600e1f88 100644 --- a/include/linux/qcom_scm.h +++ b/include/linux/qcom_scm.h @@ -18,6 +18,7 @@ enum qcom_download_mode { QCOM_DOWNLOAD_NODUMP = 0x00, QCOM_DOWNLOAD_EDL = 0x01, QCOM_DOWNLOAD_FULLDUMP = 0x10, + QCOM_DOWNLOAD_MINIDUMP = 0x20, }; struct qcom_scm_hdcp_req { From ed76e9fcbcba880122d733f8c7a736a2e9d188d6 Mon Sep 17 00:00:00 2001 From: Raghavendra Rao Ananta Date: Sun, 1 Mar 2020 22:09:32 -0800 Subject: [PATCH 2/4] msm-poweroff: Correct the SCM_DLOAD_BOTHDUMPS definition Correct the definition of SCM_DLOAD_BOTHDUMPS in the msm-poweroff driver to be an OR of the minidump and the full dumps. Change-Id: I22ca23df281d09f36fa112719ea6a6ddadd5562e Signed-off-by: Raghavendra Rao Ananta --- drivers/power/reset/msm-poweroff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/reset/msm-poweroff.c b/drivers/power/reset/msm-poweroff.c index fdf099b5b89b..4922b787bf43 100644 --- a/drivers/power/reset/msm-poweroff.c +++ b/drivers/power/reset/msm-poweroff.c @@ -36,7 +36,7 @@ #define SCM_DLOAD_FULLDUMP QCOM_DOWNLOAD_FULLDUMP #define SCM_EDLOAD_MODE QCOM_DOWNLOAD_EDL #define SCM_DLOAD_MINIDUMP QCOM_DOWNLOAD_MINIDUMP -#define SCM_DLOAD_BOTHDUMPS QCOM_DOWNLOAD_BOTHDUMP +#define SCM_DLOAD_BOTHDUMPS (SCM_DLOAD_FULLDUMP | SCM_DLOAD_MINIDUMP) #define DL_MODE_PROP "qcom,msm-imem-download_mode" #define EDL_MODE_PROP "qcom,msm-imem-emergency_download_mode" From 063d344e0de766678a8573225b4d6c2554b93cb0 Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Mon, 2 Mar 2020 17:04:07 -0800 Subject: [PATCH 3/4] defconfig: lahaina-qgki: Move minidump to QGKI Minidump is not yet appropriate for GKI due to missing exported symbols. Enable statically in Lahaina QGKI for now. Change-Id: I6bd0db37a8e1c3281249891a432cd0b4b75fe991 Signed-off-by: Elliot Berman --- arch/arm64/configs/vendor/lahaina_GKI.config | 1 - arch/arm64/configs/vendor/lahaina_QGKI.config | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/configs/vendor/lahaina_GKI.config b/arch/arm64/configs/vendor/lahaina_GKI.config index e1c553e29114..260b6394fc91 100644 --- a/arch/arm64/configs/vendor/lahaina_GKI.config +++ b/arch/arm64/configs/vendor/lahaina_GKI.config @@ -108,7 +108,6 @@ CONFIG_MSM_BT_POWER=m CONFIG_ARM_SMMU=m CONFIG_MSM_CLK_AOP_QMP=m CONFIG_MSM_SPSS_UTILS=m -CONFIG_QCOM_MINIDUMP=m CONFIG_IPA3=m CONFIG_IPA_WDI_UNIFIED_API=y CONFIG_CNSS2=m diff --git a/arch/arm64/configs/vendor/lahaina_QGKI.config b/arch/arm64/configs/vendor/lahaina_QGKI.config index 4e353385a64e..564cebe819f7 100644 --- a/arch/arm64/configs/vendor/lahaina_QGKI.config +++ b/arch/arm64/configs/vendor/lahaina_QGKI.config @@ -34,6 +34,7 @@ CONFIG_MSM_QBT_HANDLER=y CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y CONFIG_MEMORY_HOTPLUG_MOVABLE_NODE=y CONFIG_MEMORY_HOTREMOVE=y +CONFIG_QCOM_MINIDUMP=y CONFIG_QCOM_MEM_OFFLINE=y CONFIG_OVERRIDE_MEMORY_LIMIT=y CONFIG_QCOM_MEM_BUF=y From 7025db0622af3fe4b448a8333e308f839b6974e9 Mon Sep 17 00:00:00 2001 From: Raghavendra Rao Ananta Date: Sun, 1 Mar 2020 18:29:21 -0800 Subject: [PATCH 4/4] soc: qcom: Kconfig: Fix the dependencies for minidump The minidump driver's Kconfig dependency was incorrectly set to POWER_RESET_QCOM, instead of POWER_RESET_MSM. The build system sees this as an unknown Kconfig option and as a result, the minidump driver never gets a chance to be enabled. Hence, reassign the dependency to the correct Kconfig. Change-Id: I7ef9f059954b1b6fe2972257435a4eee3bd8ef74 Signed-off-by: Raghavendra Rao Ananta --- drivers/soc/qcom/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index c918dfcdec9a..3906c604fe93 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -449,7 +449,7 @@ config QCOM_DCC_V2 config QCOM_MINIDUMP tristate "QCOM Minidump Support" - depends on QCOM_SMEM && POWER_RESET_QCOM + depends on QCOM_SMEM && POWER_RESET_MSM help This enables minidump feature. It allows various clients to register to dump their state at system bad state (panic/WDT,etc.,).