linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>,
	linux-pm@vger.kernel.org, Andy Gross <agross@kernel.org>,
	linux-arm-msm@vger.kernel.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Stephan Gerhold <stephan@gerhold.net>,
	Lina Iyer <ilina@codeaurora.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	John Stultz <john.stultz@linaro.org>
Subject: Re: [PATCH] cpuidle: arm: qcom: fix Kconfig problems
Date: Mon, 23 Nov 2020 22:33:52 -0800	[thread overview]
Message-ID: <af448740-c7ba-f14e-2193-fea6acafa9fb@infradead.org> (raw)
In-Reply-To: <20201124045110.GH95182@builder.lan>

On 11/23/20 8:51 PM, Bjorn Andersson wrote:
> On Mon 23 Nov 19:30 CST 2020, Randy Dunlap wrote:
> 
>> The Kconfig symbol ARM_QCOM_SPM_CPUIDLE wildly selects other
>> Kconfig symbols when it should not.
>> This causes kconfig warnings and subsequent build errors,
>> as listed below, so modify this symbol's Kconfig entry to
>> constrain and tame it.
>>
>> WARNING: unmet direct dependencies detected for QCOM_SCM
>>   Depends on [n]: ARM [=y] && HAVE_ARM_SMCCC [=n] || ARM64
>>   Selected by [y]:
>>   - ARM_QCOM_SPM_CPUIDLE [=y] && CPU_IDLE [=y] && (ARM [=y] || ARM64) && (ARCH_QCOM [=n] || COMPILE_TEST [=y]) && !ARM64
>>
>> WARNING: unmet direct dependencies detected for ARM_CPU_SUSPEND
>>   Depends on [n]: ARCH_SUSPEND_POSSIBLE [=n]
>>   Selected by [y]:
>>   - ARM_QCOM_SPM_CPUIDLE [=y] && CPU_IDLE [=y] && (ARM [=y] || ARM64) && (ARCH_QCOM [=n] || COMPILE_TEST [=y]) && !ARM64
>>
>> and
>>
>> arm-linux-gnueabi-ld: arch/arm/kernel/sleep.o: in function `__cpu_suspend':
>> (.text+0x68): undefined reference to `cpu_sa110_suspend_size'
>> arm-linux-gnueabi-ld: arch/arm/kernel/suspend.o: in function `__cpu_suspend_save':
>> suspend.c:(.text+0x138): undefined reference to `cpu_sa110_do_suspend'
>> arm-linux-gnueabi-ld: suspend.c:(.text+0x170): undefined reference to `cpu_sa110_do_resume'
>> arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-smc.o: in function `__scm_smc_do_quirk':
>> qcom_scm-smc.c:(.text+0x54): undefined reference to `__arm_smccc_smc'
>> arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-legacy.o: in function `scm_legacy_call':
>> qcom_scm-legacy.c:(.text+0x168): undefined reference to `__arm_smccc_smc'
>> arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-legacy.o: in function `scm_legacy_call_atomic':
>> qcom_scm-legacy.c:(.text+0x2e0): undefined reference to `__arm_smccc_smc'
>>
>> Fixes: a871be6b8eee ("cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver")
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Cc: linux-pm@vger.kernel.org
>> Cc: Andy Gross <agross@kernel.org>
>> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
>> Cc: linux-arm-msm@vger.kernel.org
>> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
>> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Cc: Stephan Gerhold <stephan@gerhold.net>
>> Cc: Lina Iyer <ilina@codeaurora.org>
>> Cc: Ulf Hansson <ulf.hansson@linaro.org>
>> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
>> ---
>>  drivers/cpuidle/Kconfig.arm |    3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> --- linux-next-20201123.orig/drivers/cpuidle/Kconfig.arm
>> +++ linux-next-20201123/drivers/cpuidle/Kconfig.arm
>> @@ -108,10 +108,11 @@ 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 PM
>>  	select ARM_CPU_SUSPEND
>>  	select CPU_IDLE_MULTIPLE_DRIVERS
>>  	select DT_IDLE_STATES
>> -	select QCOM_SCM
>> +	select QCOM_SCM if HAVE_ARM_SMCCC
> 
> I presume the trigger for this error is that 'd0511b5496c0 ("firmware:
> QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module")'
> made QCOM_SCM user selectable and described the dependency on
> HAVE_ARM_SMCCC..

I don't quite see that as contributing to the problem, but maybe
it's just too late at night for me to see it.

> So given that, and the fact that this driver doesn't do anything without
> QCOM_SCM, can we instead make it "depends on QCOM_SCM"? I believe it
> would inherit the dependency of HAVE_ARM_SMCCC in this case?

Sure, I'll respin it like that.

> Regards,
> Bjorn
> 
>>  	help
>>  	  Select this to enable cpuidle for Qualcomm processors.
>>  	  The Subsystem Power Manager (SPM) controls low power modes for the


thanks.
-- 
~Randy


      reply	other threads:[~2020-11-24  6:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24  1:30 [PATCH] cpuidle: arm: qcom: fix Kconfig problems Randy Dunlap
2020-11-24  4:51 ` Bjorn Andersson
2020-11-24  6:33   ` Randy Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af448740-c7ba-f14e-2193-fea6acafa9fb@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=ilina@codeaurora.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=stephan@gerhold.net \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).