Skip to contentSkip to conversation

soc: r9a06g032: don't build SMP fiiles for non-SMP config

PATCH In review Arnd Bergmann 3 participants 4 messages Jul 6, 2018 – Jul 9, 2018 Arm/RISC-V/Renesas architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: r9a06g032: don't build SMP fiiles for non-SMP config

Without CONFIG_SMP, we get a build failure:

In file included from include/linux/byteorder/little_endian.h:5,

                 from arch/arm/include/uapi/asm/byteorder.h:22,
                 from include/asm-generic/bitops/le.h:6,
                 from arch/arm/include/asm/bitops.h:342,
                 from include/linux/bitops.h:18,
                 from include/linux/kernel.h:11,
                 from include/asm-generic/bug.h:18,
                 from arch/arm/include/asm/bug.h:60,
                 from include/linux/bug.h:5,
                 from include/linux/io.h:23,
                 from drivers/soc/renesas/r9a06g032-smp.c:11:
drivers/soc/renesas/r9a06g032-smp.c: In function 'r9a06g032_smp_boot_secondary':
drivers/soc/renesas/r9a06g032-smp.c:43:21: error: 'secondary_startup' undeclared (first use in this function)
  writel(__pa_symbol(secondary_startup), cpu_bootaddr);
                     ^~~~~~~~~~~~~~~~~

This makes the compilation of that file conditional on SMP support. It would probably be better for consistency to leave that file in arch/arm/mach-shmobile/, matching what we do for all other smp operations.

Fixes cde4f86f9249 ("arm: shmobile: Add the R9A06G032 SMP enabler driver")
---
 drivers/soc/renesas/Makefile | 2 ++
 1 file changed, 2 insertions(+)
drivers/soc/renesas/Makefile +2 -0
index 44a0d6b10192..c37b0803c1b6 100644
@@ -18,7 +18,9 @@ obj-$(CONFIG_SYSC_R8A77970)	+= r8a77970-sysc.o
 obj-$(CONFIG_SYSC_R8A77980)	+= r8a77980-sysc.o
 obj-$(CONFIG_SYSC_R8A77990)	+= r8a77990-sysc.o
 obj-$(CONFIG_SYSC_R8A77995)	+= r8a77995-sysc.o
+ifdef CONFIG_SMP
 obj-$(CONFIG_ARCH_R9A06G032)	+= r9a06g032-smp.o
+endif
 
 # Family
 obj-$(CONFIG_RST_RCAR)		+= rcar-rst.o
Signature · 1 line
2.9.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Arnd,

Quoted 18 lines · Arnd Bergmann

Without CONFIG_SMP, we get a build failure:

In file included from include/linux/byteorder/little_endian.h:5,

                 from arch/arm/include/uapi/asm/byteorder.h:22,
                 from include/asm-generic/bitops/le.h:6,
                 from arch/arm/include/asm/bitops.h:342,
                 from include/linux/bitops.h:18,
                 from include/linux/kernel.h:11,
                 from include/asm-generic/bug.h:18,
                 from arch/arm/include/asm/bug.h:60,
                 from include/linux/bug.h:5,
                 from include/linux/io.h:23,
                 from drivers/soc/renesas/r9a06g032-smp.c:11:
drivers/soc/renesas/r9a06g032-smp.c: In function 'r9a06g032_smp_boot_secondary':
drivers/soc/renesas/r9a06g032-smp.c:43:21: error: 'secondary_startup' undeclared (first use in this function)
  writel(__pa_symbol(secondary_startup), cpu_bootaddr);
                     ^~~~~~~~~~~~~~~~~
Quoted 4 lines

This makes the compilation of that file conditional on SMP support. It would probably be better for consistency to leave that file in arch/arm/mach-shmobile/, matching what we do for all other smp operations.

Shouldn't that comment be moved below the "---"? ;-)

I thought the (10Y ;-) plan was to have no more code under arch/arm/mach-*/? Note that the suport for the new RZ/N1D SoC doesn't use any other code in mach-shmobile.

Quoted 2 lines
Fixes cde4f86f9249 ("arm: shmobile: Add the R9A06G032 SMP enabler driver")

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
#2 lore raw
Quoted 21 lines · Geert Uytterhoeven

Hi Arnd,

Quoted 18 lines · Arnd Bergmann

Without CONFIG_SMP, we get a build failure:

In file included from include/linux/byteorder/little_endian.h:5,

                 from arch/arm/include/uapi/asm/byteorder.h:22,
                 from include/asm-generic/bitops/le.h:6,
                 from arch/arm/include/asm/bitops.h:342,
                 from include/linux/bitops.h:18,
                 from include/linux/kernel.h:11,
                 from include/asm-generic/bug.h:18,
                 from arch/arm/include/asm/bug.h:60,
                 from include/linux/bug.h:5,
                 from include/linux/io.h:23,
                 from drivers/soc/renesas/r9a06g032-smp.c:11:
drivers/soc/renesas/r9a06g032-smp.c: In function 'r9a06g032_smp_boot_secondary':
drivers/soc/renesas/r9a06g032-smp.c:43:21: error: 'secondary_startup' undeclared (first use in this function)
  writel(__pa_symbol(secondary_startup), cpu_bootaddr);
                     ^~~~~~~~~~~~~~~~~
Quoted 6 lines
Quoted 4 lines

This makes the compilation of that file conditional on SMP support. It would probably be better for consistency to leave that file in arch/arm/mach-shmobile/, matching what we do for all other smp operations.

Shouldn't that comment be moved below the "---"? ;-)

Maybe

Quoted 3 lines

I thought the (10Y ;-) plan was to have no more code under arch/arm/mach-*/? Note that the suport for the new RZ/N1D SoC doesn't use any other code in mach-shmobile.

The SMP code is the main part we never figured out where else to put, so it's typically the only thing we still have for new platforms under arch/arm/.

Quoted 4 lines
Quoted 2 lines
Fixes cde4f86f9249 ("arm: shmobile: Add the R9A06G032 SMP enabler driver")
#3 lore raw
Quoted 31 lines · Arnd Bergmann
Quoted 21 lines · Geert Uytterhoeven

Hi Arnd,

Quoted 18 lines · Arnd Bergmann

Without CONFIG_SMP, we get a build failure:

In file included from include/linux/byteorder/little_endian.h:5,

                 from arch/arm/include/uapi/asm/byteorder.h:22,
                 from include/asm-generic/bitops/le.h:6,
                 from arch/arm/include/asm/bitops.h:342,
                 from include/linux/bitops.h:18,
                 from include/linux/kernel.h:11,
                 from include/asm-generic/bug.h:18,
                 from arch/arm/include/asm/bug.h:60,
                 from include/linux/bug.h:5,
                 from include/linux/io.h:23,
                 from drivers/soc/renesas/r9a06g032-smp.c:11:
drivers/soc/renesas/r9a06g032-smp.c: In function 'r9a06g032_smp_boot_secondary':
drivers/soc/renesas/r9a06g032-smp.c:43:21: error: 'secondary_startup' undeclared (first use in this function)
  writel(__pa_symbol(secondary_startup), cpu_bootaddr);
                     ^~~~~~~~~~~~~~~~~
Quoted 6 lines
Quoted 4 lines

This makes the compilation of that file conditional on SMP support. It would probably be better for consistency to leave that file in arch/arm/mach-shmobile/, matching what we do for all other smp operations.

Shouldn't that comment be moved below the "---"? ;-)

Maybe

Quoted 12 lines
Quoted 3 lines

I thought the (10Y ;-) plan was to have no more code under arch/arm/mach-*/? Note that the suport for the new RZ/N1D SoC doesn't use any other code in mach-shmobile.

The SMP code is the main part we never figured out where else to put, so it's typically the only thing we still have for new platforms under arch/arm/.

Quoted 4 lines
Quoted 2 lines
Fixes cde4f86f9249 ("arm: shmobile: Add the R9A06G032 SMP enabler driver")

Thanks, I've applied this (with the full commit message). Lets work out where the code should live and move it if necessary.