aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Kumar Neelakantam <aneela@codeaurora.org>2017-11-17 16:31:50 +0530
committerSalmax Chang <salmaxchang@google.com>2019-07-15 03:40:05 +0000
commit83bee1dc48e8e99337ae85ca2c5c92d48c25da59 (patch)
treea4557a647a054b871bdf8e452a014cafa0ae5078
parent36c093ec2ff78eac0ef23b1f99bf5d24bca61676 (diff)
soc: qcom: smem: Add secure device check for smem dumpandroid-q-preview-6_r0.2android-10.0.0_r0.2
In peripheral SSR case SMEM dump is collected and stored which is not expected on secure devices. Add a check and avoid dumping SMEM on secure device. Bug: 135588290 CRs-Fixed: 2264360 Change-Id: I2895aeb86d97b45dcb3ea293aa79a06174b8ac0b Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
-rw-r--r--drivers/soc/qcom/msm_smem.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/soc/qcom/msm_smem.c b/drivers/soc/qcom/msm_smem.c
index c6e563445219..d06b87294958 100644
--- a/drivers/soc/qcom/msm_smem.c
+++ b/drivers/soc/qcom/msm_smem.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -26,6 +26,7 @@
#include <soc/qcom/subsystem_notif.h>
#include <soc/qcom/subsystem_restart.h>
#include <soc/qcom/ramdump.h>
+#include <soc/qcom/scm.h>
#include <soc/qcom/smem.h>
@@ -1085,12 +1086,15 @@ static __init int modem_restart_late_init(void)
void *handle;
struct restart_notifier_block *nb;
- if (smem_dev)
- smem_ramdump_dev = create_ramdump_device("smem", smem_dev);
- if (IS_ERR_OR_NULL(smem_ramdump_dev)) {
- LOG_ERR("%s: Unable to create smem ramdump device.\n",
- __func__);
- smem_ramdump_dev = NULL;
+ if (scm_is_secure_device()) {
+ if (smem_dev)
+ smem_ramdump_dev = create_ramdump_device("smem",
+ smem_dev);
+ if (IS_ERR_OR_NULL(smem_ramdump_dev)) {
+ LOG_ERR("%s: Unable to create smem ramdump device.\n",
+ __func__);
+ smem_ramdump_dev = NULL;
+ }
}
for (i = 0; i < ARRAY_SIZE(restart_notifiers); i++) {