LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/2] ARM: stm32: Don't select DMA unconditionally on STM32MP157C
@ 2018-05-25 16:10 Arnd Bergmann
2018-05-25 16:10 ` [PATCH 2/2] ARM: shmobile: only call secure_cntvoff_init on SMP builds Arnd Bergmann
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2018-05-25 16:10 UTC (permalink / raw)
To: arm, Maxime Coquelin, Alexandre Torgue
Cc: Arnd Bergmann, Ludovic Barre, Olof Johansson,
Pierre-Yves MORDRET, Patrice Chotard, linux-arm-kernel,
linux-kernel
The patch that enabled these had no useful changelog that explains
why it is done, and it causes a build warning:
WARNING: unmet direct dependencies detected for STM32_DMA
Depends on [n]: DMADEVICES [=n] && (ARCH_STM32 [=y] || COMPILE_TEST [=y])
Selected by [y]:
- MACH_STM32MP157 [=y] && ARCH_STM32 [=y] && ARCH_MULTI_V7 [=y]
Generally, platforms should not select arbitrary drivers, so let's
just revert that change.
Fixes: de6037fa207f ("ARM: stm32: Select DMA, DMAMUX and MDMA support on STM32MP157C")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/mach-stm32/Kconfig | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
index 82a93b8d9ae6..713c068b953f 100644
--- a/arch/arm/mach-stm32/Kconfig
+++ b/arch/arm/mach-stm32/Kconfig
@@ -46,9 +46,6 @@ if ARCH_MULTI_V7
config MACH_STM32MP157
bool "STMicroelectronics STM32MP157"
- select STM32_DMA
- select STM32_DMAMUX
- select STM32_MDMA
default y
endif # ARMv7-A
--
2.9.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] ARM: shmobile: only call secure_cntvoff_init on SMP builds
2018-05-25 16:10 [PATCH 1/2] ARM: stm32: Don't select DMA unconditionally on STM32MP157C Arnd Bergmann
@ 2018-05-25 16:10 ` Arnd Bergmann
2018-05-25 19:12 ` Geert Uytterhoeven
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2018-05-25 16:10 UTC (permalink / raw)
To: arm, Simon Horman, Magnus Damm
Cc: Arnd Bergmann, Geert Uytterhoeven, Mylène Josserand,
Biju Das, linux-arm-kernel, linux-renesas-soc, linux-kernel
The secure_cntvoff_init() function is not available without CONFIG_SMP,
leading to a link error on shmobile:
arch/arm/mach-shmobile/setup-rcar-gen2.o: In function `rcar_gen2_timer_init':
setup-rcar-gen2.c:(.init.text+0x18): undefined reference to `secure_cntvoff_init'
>From the description in commit 3fd45a136ff6 ("ARM: shmobile: rcar-gen2:
Make sure CNTVOFF is initialized on CA7/15"), I understand that we
don't need to call it on non-SMP builds because the boot CPU is always
initialized by common code, so we can simply avoid the reference by
checking for CONFIG_SMP.
Fixes: cad160ed0a94 ("ARM: shmobile: Convert file to use cntvoff")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/mach-shmobile/setup-rcar-gen2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
index 88fdc1801d90..39085d7a8f37 100644
--- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
@@ -71,7 +71,8 @@ void __init rcar_gen2_timer_init(void)
void __iomem *base;
u32 freq;
- secure_cntvoff_init();
+ if (IS_ENABLED(CONFIG_SMP))
+ secure_cntvoff_init();
if (of_machine_is_compatible("renesas,r8a7745") ||
of_machine_is_compatible("renesas,r8a77470") ||
--
2.9.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] ARM: shmobile: only call secure_cntvoff_init on SMP builds
2018-05-25 16:10 ` [PATCH 2/2] ARM: shmobile: only call secure_cntvoff_init on SMP builds Arnd Bergmann
@ 2018-05-25 19:12 ` Geert Uytterhoeven
0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2018-05-25 19:12 UTC (permalink / raw)
To: Arnd Bergmann
Cc: arm, Simon Horman, Magnus Damm, Geert Uytterhoeven,
Mylène Josserand, Biju Das, Linux ARM, Linux-Renesas,
Linux Kernel Mailing List
Hi Arnd,
On Fri, May 25, 2018 at 6:10 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The secure_cntvoff_init() function is not available without CONFIG_SMP,
> leading to a link error on shmobile:
>
> arch/arm/mach-shmobile/setup-rcar-gen2.o: In function `rcar_gen2_timer_init':
> setup-rcar-gen2.c:(.init.text+0x18): undefined reference to `secure_cntvoff_init'
>
> From the description in commit 3fd45a136ff6 ("ARM: shmobile: rcar-gen2:
> Make sure CNTVOFF is initialized on CA7/15"), I understand that we
> don't need to call it on non-SMP builds because the boot CPU is always
> initialized by common code, so we can simply avoid the reference by
> checking for CONFIG_SMP.
>
> Fixes: cad160ed0a94 ("ARM: shmobile: Convert file to use cntvoff")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
NAKed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
> +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
> @@ -71,7 +71,8 @@ void __init rcar_gen2_timer_init(void)
> void __iomem *base;
> u32 freq;
>
> - secure_cntvoff_init();
> + if (IS_ENABLED(CONFIG_SMP))
> + secure_cntvoff_init();
The call here is for the boot CPU, since commit 9ce3fa6816c2fb59 ("ARM:
shmobile: rcar-gen2: Add CA7 arch_timer initialization for r8a7794"), and
modified and consolidated in commit 3fd45a136ff6 mentioned above.
The call for secondary CPUs is in arch/arm/mach-shmobile/headsmp-apmu.S.
>
> if (of_machine_is_compatible("renesas,r8a7745") ||
> of_machine_is_compatible("renesas,r8a77470") ||
So the proper fix is to build arch/arm/common/secure_cntvoff.o
unconditionally.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ARM: stm32: Don't select DMA unconditionally on STM32MP157C
2018-05-25 16:09 [PATCH 1/2] ARM: stm32: Don't select DMA unconditionally on STM32MP157C Arnd Bergmann
@ 2018-05-25 22:26 ` Olof Johansson
0 siblings, 0 replies; 5+ messages in thread
From: Olof Johansson @ 2018-05-25 22:26 UTC (permalink / raw)
To: Arnd Bergmann
Cc: arm, Maxime Coquelin, Alexandre Torgue, Ludovic Barre,
Pierre-Yves MORDRET, Patrice Chotard, linux-arm-kernel,
linux-kernel
On Fri, May 25, 2018 at 06:09:13PM +0200, Arnd Bergmann wrote:
> The patch that enabled these had no useful changelog that explains
> why it is done, and it causes a build warning:
>
> WARNING: unmet direct dependencies detected for STM32_DMA
> Depends on [n]: DMADEVICES [=n] && (ARCH_STM32 [=y] || COMPILE_TEST [=y])
> Selected by [y]:
> - MACH_STM32MP157 [=y] && ARCH_STM32 [=y] && ARCH_MULTI_V7 [=y]
>
> Generally, platforms should not select arbitrary drivers, so let's
> just revert that change.
>
> Fixes: de6037fa207f ("ARM: stm32: Select DMA, DMAMUX and MDMA support on STM32MP157C")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied to next/soc now.
-Olof
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] ARM: stm32: Don't select DMA unconditionally on STM32MP157C
@ 2018-05-25 16:09 Arnd Bergmann
2018-05-25 22:26 ` Olof Johansson
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2018-05-25 16:09 UTC (permalink / raw)
To: arm, Maxime Coquelin, Alexandre Torgue
Cc: Arnd Bergmann, Ludovic Barre, Olof Johansson,
Pierre-Yves MORDRET, Patrice Chotard, linux-arm-kernel,
linux-kernel
The patch that enabled these had no useful changelog that explains
why it is done, and it causes a build warning:
WARNING: unmet direct dependencies detected for STM32_DMA
Depends on [n]: DMADEVICES [=n] && (ARCH_STM32 [=y] || COMPILE_TEST [=y])
Selected by [y]:
- MACH_STM32MP157 [=y] && ARCH_STM32 [=y] && ARCH_MULTI_V7 [=y]
Generally, platforms should not select arbitrary drivers, so let's
just revert that change.
Fixes: de6037fa207f ("ARM: stm32: Select DMA, DMAMUX and MDMA support on STM32MP157C")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/mach-stm32/Kconfig | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
index 82a93b8d9ae6..713c068b953f 100644
--- a/arch/arm/mach-stm32/Kconfig
+++ b/arch/arm/mach-stm32/Kconfig
@@ -46,9 +46,6 @@ if ARCH_MULTI_V7
config MACH_STM32MP157
bool "STMicroelectronics STM32MP157"
- select STM32_DMA
- select STM32_DMAMUX
- select STM32_MDMA
default y
endif # ARMv7-A
--
2.9.0
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-05-25 22:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-25 16:10 [PATCH 1/2] ARM: stm32: Don't select DMA unconditionally on STM32MP157C Arnd Bergmann
2018-05-25 16:10 ` [PATCH 2/2] ARM: shmobile: only call secure_cntvoff_init on SMP builds Arnd Bergmann
2018-05-25 19:12 ` Geert Uytterhoeven
-- strict thread matches above, loose matches on Subject: below --
2018-05-25 16:09 [PATCH 1/2] ARM: stm32: Don't select DMA unconditionally on STM32MP157C Arnd Bergmann
2018-05-25 22:26 ` Olof Johansson
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).