lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200529200531.31738-1-arnd@arndb.de>
Date:   Fri, 29 May 2020 22:04:53 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Stephan Gerhold <stephan@...hold.net>,
        Lina Iyer <ilina@...eaurora.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Dmitry Osipenko <digetx@...il.com>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] cpuidle/firmware: qcom: fix smcc dependencies

Selecting QCOM_SCM for compile-tests is broken when the smcc firmware
is not provided:

drivers/firmware/qcom_scm-smc.o: in function `scm_smc_call':
qcom_scm-smc.c:(.text+0x110): undefined reference to `__arm_smccc_smc'
drivers/firmware/qcom_scm-legacy.o: in function `scm_legacy_call':
qcom_scm-smc.c:(.text+0x1bc): undefined reference to `__arm_smccc_smc'

Add a Kconfig dependency for the QCOM_SCM to make it easier to catch
this, and fix the dependency for the newly added ARM_QCOM_SPM_CPUIDLE
symbol that triggered it this time.

Fixes: a871be6b8eee ("cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
As the bug is currently only present in the cpuidle tree, can we
merge it through that?
---
 drivers/cpuidle/Kconfig.arm | 3 ++-
 drivers/firmware/Kconfig    | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm
index 51a7e89085c0..6cdcf5698c4c 100644
--- a/drivers/cpuidle/Kconfig.arm
+++ b/drivers/cpuidle/Kconfig.arm
@@ -97,7 +97,8 @@ config ARM_TEGRA_CPUIDLE
 
 config ARM_QCOM_SPM_CPUIDLE
 	bool "CPU Idle Driver for Qualcomm Subsystem Power Manager (SPM)"
-	depends on (ARCH_QCOM || COMPILE_TEST) && !ARM64
+	depends on ARCH_QCOM || (COMPILE_TEST && HAVE_ARM_SMCCC)
+	depends on ARM
 	select ARM_CPU_SUSPEND
 	select CPU_IDLE_MULTIPLE_DRIVERS
 	select DT_IDLE_STATES
diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
index fbd785dd0513..297bed30a632 100644
--- a/drivers/firmware/Kconfig
+++ b/drivers/firmware/Kconfig
@@ -238,6 +238,7 @@ config INTEL_STRATIX10_RSU
 config QCOM_SCM
 	bool
 	depends on ARM || ARM64
+	depends on HAVE_ARM_SMCCC
 	select RESET_CONTROLLER
 
 config QCOM_SCM_DOWNLOAD_MODE_DEFAULT
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ