linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc: bcm: brcmstb: fix ARM build errors
@ 2017-09-07 13:50 Arnd Bergmann
  2017-09-07 14:24 ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2017-09-07 13:50 UTC (permalink / raw)
  To: arm, Brian Norris, Gregory Fong, Florian Fainelli,
	bcm-kernel-feedback-list
  Cc: linux-arm-kernel, Arnd Bergmann, Justin Chen, Gareth Powell,
	Doug Berger, linux-kernel

When building the new PM driver on older ARM architectures, we can
run into one of two build errors:

drivers/soc/bcm/brcmstb/pm/pm-arm.c: In function 'brcmstb_do_pmsm_power_down':
drivers/soc/bcm/brcmstb/pm/pm-arm.c:334:2: error: implicit declaration of function 'wfi' [-Werror=implicit-function-declaration]

drivers/soc/bcm/brcmstb/pm/pm-arm.o: In function `brcmstb_pm_s3_finish':
pm-arm.c:(.text+0x860): undefined reference to `cpu_resume'

The first one requires at least ARMv6K, the second one requires the CPU
suspend/resume logic which is not available on some of the older CPUs,
and needs to be selected explicitly.

This adds the extra Kconfig statements to enforce this, limiting
compilation on ARM to the STB platform that is guaranteed to be
ARMv7. We could enable compile-testing for other ARMv7 platforms,
but there seems to be little value as an allmodconfig kernel
already includes it.

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/soc/bcm/brcmstb/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/bcm/brcmstb/Kconfig b/drivers/soc/bcm/brcmstb/Kconfig
index d05bfce82e71..d36f6e03c1a6 100644
--- a/drivers/soc/bcm/brcmstb/Kconfig
+++ b/drivers/soc/bcm/brcmstb/Kconfig
@@ -4,6 +4,7 @@ config BRCMSTB_PM
 	bool "Support suspend/resume for STB platforms"
 	default y
 	depends on PM
-	depends on ARM || BMIPS_GENERIC
+	depends on ARCH_BRCMSTB || BMIPS_GENERIC
+	select ARM_CPU_SUSPEND if ARM
 
 endif # SOC_BRCMSTB
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] soc: bcm: brcmstb: fix ARM build errors
  2017-09-07 13:50 [PATCH] soc: bcm: brcmstb: fix ARM build errors Arnd Bergmann
@ 2017-09-07 14:24 ` Arnd Bergmann
  2017-09-07 15:34   ` Florian Fainelli
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2017-09-07 14:24 UTC (permalink / raw)
  To: arm-soc, Brian Norris, Gregory Fong, Florian Fainelli,
	bcm-kernel-feedback-list
  Cc: Linux ARM, Arnd Bergmann, Justin Chen, Gareth Powell,
	Doug Berger, Linux Kernel Mailing List

On Thu, Sep 7, 2017 at 3:50 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> When building the new PM driver on older ARM architectures, we can
> run into one of two build errors:
>
> drivers/soc/bcm/brcmstb/pm/pm-arm.c: In function 'brcmstb_do_pmsm_power_down':
> drivers/soc/bcm/brcmstb/pm/pm-arm.c:334:2: error: implicit declaration of function 'wfi' [-Werror=implicit-function-declaration]
>
> drivers/soc/bcm/brcmstb/pm/pm-arm.o: In function `brcmstb_pm_s3_finish':
> pm-arm.c:(.text+0x860): undefined reference to `cpu_resume'
>
> The first one requires at least ARMv6K, the second one requires the CPU
> suspend/resume logic which is not available on some of the older CPUs,
> and needs to be selected explicitly.
>
> This adds the extra Kconfig statements to enforce this, limiting
> compilation on ARM to the STB platform that is guaranteed to be
> ARMv7. We could enable compile-testing for other ARMv7 platforms,
> but there seems to be little value as an allmodconfig kernel
> already includes it.
>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

It seems we always compile the pm/ subdirectory regardless of CONFIG_BRCMSTB_PM,
so we also needs this change:

--- a/drivers/soc/bcm/brcmstb/Makefile
+++ b/drivers/soc/bcm/brcmstb/Makefile
@@ -1,2 +1,2 @@
 obj-y                          += common.o biuctrl.o
-obj-y                          += pm/
+obj-$(CONFIG_BRCMSTB_PM)       += pm/

I'll resubmit the combined patch after some more testing.

        Arnd

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] soc: bcm: brcmstb: fix ARM build errors
  2017-09-07 14:24 ` Arnd Bergmann
@ 2017-09-07 15:34   ` Florian Fainelli
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2017-09-07 15:34 UTC (permalink / raw)
  To: Arnd Bergmann, arm-soc, Brian Norris, Gregory Fong,
	bcm-kernel-feedback-list
  Cc: Linux ARM, Justin Chen, Gareth Powell, Doug Berger,
	Linux Kernel Mailing List

On 09/07/2017 07:24 AM, Arnd Bergmann wrote:
> On Thu, Sep 7, 2017 at 3:50 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> When building the new PM driver on older ARM architectures, we can
>> run into one of two build errors:
>>
>> drivers/soc/bcm/brcmstb/pm/pm-arm.c: In function 'brcmstb_do_pmsm_power_down':
>> drivers/soc/bcm/brcmstb/pm/pm-arm.c:334:2: error: implicit declaration of function 'wfi' [-Werror=implicit-function-declaration]
>>
>> drivers/soc/bcm/brcmstb/pm/pm-arm.o: In function `brcmstb_pm_s3_finish':
>> pm-arm.c:(.text+0x860): undefined reference to `cpu_resume'
>>
>> The first one requires at least ARMv6K, the second one requires the CPU
>> suspend/resume logic which is not available on some of the older CPUs,
>> and needs to be selected explicitly.
>>
>> This adds the extra Kconfig statements to enforce this, limiting
>> compilation on ARM to the STB platform that is guaranteed to be
>> ARMv7. We could enable compile-testing for other ARMv7 platforms,
>> but there seems to be little value as an allmodconfig kernel
>> already includes it.
>>
>> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> It seems we always compile the pm/ subdirectory regardless of CONFIG_BRCMSTB_PM,
> so we also needs this change:
> 
> --- a/drivers/soc/bcm/brcmstb/Makefile
> +++ b/drivers/soc/bcm/brcmstb/Makefile
> @@ -1,2 +1,2 @@
>  obj-y                          += common.o biuctrl.o
> -obj-y                          += pm/
> +obj-$(CONFIG_BRCMSTB_PM)       += pm/
> 
> I'll resubmit the combined patch after some more testing.

Ah yes, that was correct in the original pull request, but I messed up
the conflict resolution once dpfe.c was moved out of this directory into
drivers/memory/ sorry about that. Do you want to fold these two patches
into 6274ca43eba1b2ebcac96f3c9b41fbc4945c0af0?
-- 
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-07 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-07 13:50 [PATCH] soc: bcm: brcmstb: fix ARM build errors Arnd Bergmann
2017-09-07 14:24 ` Arnd Bergmann
2017-09-07 15:34   ` Florian Fainelli

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).