All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [v2] soc: bcm: brcmstb: fix ARM build errors
@ 2017-09-11 20:13 ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2017-09-11 20:13 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Arnd Bergmann, Brian Norris, Gregory Fong,
	bcm-kernel-feedback-list, Justin Chen, Markus Mayer, Doug Berger,
	Gareth Powell, linux-arm-kernel, 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>
---
v2: change Makefile as well
---
 drivers/soc/bcm/brcmstb/Kconfig  | 3 ++-
 drivers/soc/bcm/brcmstb/Makefile | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

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
diff --git a/drivers/soc/bcm/brcmstb/Makefile b/drivers/soc/bcm/brcmstb/Makefile
index ee5b4de741b8..01687c26535b 100644
--- 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/
-- 
2.9.0

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

* [PATCH] [v2] soc: bcm: brcmstb: fix ARM build errors
@ 2017-09-11 20:13 ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2017-09-11 20:13 UTC (permalink / raw)
  To: linux-arm-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>
---
v2: change Makefile as well
---
 drivers/soc/bcm/brcmstb/Kconfig  | 3 ++-
 drivers/soc/bcm/brcmstb/Makefile | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

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
diff --git a/drivers/soc/bcm/brcmstb/Makefile b/drivers/soc/bcm/brcmstb/Makefile
index ee5b4de741b8..01687c26535b 100644
--- 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/
-- 
2.9.0

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

* Re: [PATCH] [v2] soc: bcm: brcmstb: fix ARM build errors
  2017-09-11 20:13 ` Arnd Bergmann
@ 2017-09-12 17:56   ` Florian Fainelli
  -1 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2017-09-12 17:56 UTC (permalink / raw)
  To: Arnd Bergmann, Florian Fainelli
  Cc: Brian Norris, Gregory Fong, bcm-kernel-feedback-list,
	Justin Chen, Markus Mayer, Doug Berger, Gareth Powell,
	linux-arm-kernel, linux-kernel

On 09/11/2017 01:13 PM, Arnd Bergmann 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.

Thanks, can you pick that change directly and/or fold it in:

6274ca43eba1b2ebcac96f3c9b41fbc4945c0af0 ("soc: bcm: brcmstb: Add
support for S2/S3/S5 suspend states (ARM)")?

Thanks!

> 
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2: change Makefile as well
> ---
>  drivers/soc/bcm/brcmstb/Kconfig  | 3 ++-
>  drivers/soc/bcm/brcmstb/Makefile | 2 +-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> 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
> diff --git a/drivers/soc/bcm/brcmstb/Makefile b/drivers/soc/bcm/brcmstb/Makefile
> index ee5b4de741b8..01687c26535b 100644
> --- 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/
> 


-- 
Florian

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

* [PATCH] [v2] soc: bcm: brcmstb: fix ARM build errors
@ 2017-09-12 17:56   ` Florian Fainelli
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2017-09-12 17:56 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/11/2017 01:13 PM, Arnd Bergmann 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.

Thanks, can you pick that change directly and/or fold it in:

6274ca43eba1b2ebcac96f3c9b41fbc4945c0af0 ("soc: bcm: brcmstb: Add
support for S2/S3/S5 suspend states (ARM)")?

Thanks!

> 
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2: change Makefile as well
> ---
>  drivers/soc/bcm/brcmstb/Kconfig  | 3 ++-
>  drivers/soc/bcm/brcmstb/Makefile | 2 +-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> 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
> diff --git a/drivers/soc/bcm/brcmstb/Makefile b/drivers/soc/bcm/brcmstb/Makefile
> index ee5b4de741b8..01687c26535b 100644
> --- 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/
> 


-- 
Florian

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

* Re: [PATCH] [v2] soc: bcm: brcmstb: fix ARM build errors
  2017-09-12 17:56   ` Florian Fainelli
@ 2017-09-25 18:48     ` Florian Fainelli
  -1 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2017-09-25 18:48 UTC (permalink / raw)
  To: Florian Fainelli, Arnd Bergmann
  Cc: Brian Norris, Gregory Fong, bcm-kernel-feedback-list,
	Justin Chen, Markus Mayer, Doug Berger, linux-arm-kernel,
	linux-kernel

On 09/12/2017 10:56 AM, Florian Fainelli wrote:
> On 09/11/2017 01:13 PM, Arnd Bergmann 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.
> 
> Thanks, can you pick that change directly and/or fold it in:
> 
> 6274ca43eba1b2ebcac96f3c9b41fbc4945c0af0 ("soc: bcm: brcmstb: Add
> support for S2/S3/S5 suspend states (ARM)")?

Picked this up in drivers/next, and squashed this change into the
original commit, this is what it looks like now:

https://github.com/Broadcom/stblinux/commit/6274ca43eba1b2ebcac96f3c9b41fbc4945c0af0

Thanks Arnd!
-- 
-- 
Florian

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

* [PATCH] [v2] soc: bcm: brcmstb: fix ARM build errors
@ 2017-09-25 18:48     ` Florian Fainelli
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2017-09-25 18:48 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/12/2017 10:56 AM, Florian Fainelli wrote:
> On 09/11/2017 01:13 PM, Arnd Bergmann 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.
> 
> Thanks, can you pick that change directly and/or fold it in:
> 
> 6274ca43eba1b2ebcac96f3c9b41fbc4945c0af0 ("soc: bcm: brcmstb: Add
> support for S2/S3/S5 suspend states (ARM)")?

Picked this up in drivers/next, and squashed this change into the
original commit, this is what it looks like now:

https://github.com/Broadcom/stblinux/commit/6274ca43eba1b2ebcac96f3c9b41fbc4945c0af0

Thanks Arnd!
-- 
-- 
Florian

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

end of thread, other threads:[~2017-09-25 18:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-11 20:13 [PATCH] [v2] soc: bcm: brcmstb: fix ARM build errors Arnd Bergmann
2017-09-11 20:13 ` Arnd Bergmann
2017-09-12 17:56 ` Florian Fainelli
2017-09-12 17:56   ` Florian Fainelli
2017-09-25 18:48   ` Florian Fainelli
2017-09-25 18:48     ` Florian Fainelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.