ARM warning fixes for arm-soc
Subsystems (12)
cover ARM warning fixes for arm-soc
This is a set of bug fixes, most of which I have posted at least one time before. I will add them to the next/fixes-non-critical branch now, unless there are any last-minute objections.
Arnd Bergmann (11):
ARM: disable virt_to_bus/virt_to_bus almost everywhere
ARM: samsung: fix assembly syntax for new gas
ARM: w90x900: fix legacy assembly syntax
ARM: shmobile: fix defconfig warning on CONFIG_USB
ARM: sa1100: don't warn about mach/ide.h
ARM: integrator/versatile: fix NOMMU warnings
ARM: integrator: fix build with INTEGRATOR_AP off
ARM: pick Versatile by default for !MMU
ARM: mvebu: allow selecting mvebu without Armada XP
ARM: s3c: i2c: add platform_device forward declaration scripts/sortextable: silence script output
arch/arm/Kconfig | 7 ++++++- arch/arm/configs/marzen_defconfig | 1 - arch/arm/configs/shark_defconfig | 1 - arch/arm/include/asm/dma.h | 2 +- arch/arm/include/asm/memory.h | 2 ++ arch/arm/mach-integrator/common.h | 5 ----- arch/arm/mach-integrator/core.c | 2 +- arch/arm/mach-integrator/integrator_ap.c | 2 +- arch/arm/mach-integrator/integrator_cp.c | 2 +- arch/arm/mach-mvebu/Makefile | 5 +++-- arch/arm/mach-s3c24xx/include/mach/debug-macro.S | 12 ++++++------ arch/arm/mach-s3c24xx/include/mach/entry-macro.S | 4 ++-- arch/arm/mach-s3c24xx/pm-h1940.S | 2 +- arch/arm/mach-s3c24xx/sleep-s3c2410.S | 12 ++++++------ arch/arm/mach-s3c24xx/sleep-s3c2412.S | 12 ++++++------ arch/arm/mach-sa1100/lart.c | 3 --- arch/arm/mach-versatile/Kconfig | 5 +++++ arch/arm/mach-versatile/core.c | 2 +- arch/arm/mach-w90x900/include/mach/entry-macro.S | 4 ++-- arch/arm/plat-samsung/include/plat/debug-macro.S | 18 +++++++++--------- include/linux/platform_data/i2c-s3c2410.h | 2 ++ scripts/sortextable.h | 2 +- 22 files changed, 56 insertions(+), 51 deletions(-)
Signature · 1 line
1.8.1.2
PATCH 1/11 ARM: disable virt_to_bus/virt_to_bus almost everywhere
We are getting a number of warnings about the use of the deprecated bus_to_virt function in drivers using the ARM ISA DMA API:
drivers/parport/parport_pc.c: In function 'parport_pc_fifo_write_block_dma':drivers/parport/parport_pc.c:622:3: warning: 'bus_to_virt' is deprecated (declared at arch/arm/include/asm/memory.h:253) [-Wdeprecated-declarations]
This is only because that function gets used by the inline set_dma_addr() helper. We know that any driver for the ISA DMA API is correctly using the DMA addresses, so we can change this to use the __bus_to_virt() function instead, which does not warn.
After this, there are no remaining drivers that are used on any defconfigs on ARM using virt_to_bus or bus_to_virt, with the exception of the OSS sound driver. That driver is only used on RiscPC, NetWinder and Shark, so we can set ARCH_NO_VIRT_TO_BUS on all other platforms and hide the deprecated functions, which is far more effective than marking them as deprecated, in order to avoid any new users of that code.
--- arch/arm/Kconfig | 4 ++++ arch/arm/configs/shark_defconfig | 1 - arch/arm/include/asm/dma.h | 2 +- arch/arm/include/asm/memory.h | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-)
arch/arm/Kconfig +4 -0
@@ -1450,6 +1450,10 @@ config ISA_DMA bool select ISA_DMA_API +config ARCH_NO_VIRT_TO_BUS + def_bool y + depends on !ARCH_RPC && !ARCH_NETWINDER && !ARCH_SHARK + # Select ISA DMA interface config ISA_DMA_API bool
arch/arm/configs/shark_defconfig +0 -1
@@ -73,7 +73,6 @@ CONFIG_PARTITION_ADVANCED=y CONFIG_NLS_CODEPAGE_437=m CONFIG_NLS_CODEPAGE_850=m CONFIG_NLS_ISO8859_1=m -# CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_DEBUG_KERNEL=y # CONFIG_SCHED_DEBUG is not set
arch/arm/include/asm/dma.h +1 -1
@@ -105,7 +105,7 @@ extern void set_dma_sg(unsigned int chan, struct scatterlist *sg, int nr_sg);*/ extern void __set_dma_addr (unsigned int chan,void *addr);#define set_dma_addr (chan, addr) \ - __set_dma_addr(chan, bus_to_virt(addr)) + __set_dma_addr(chan, (void *)__bus_to_virt(addr))/* Set the DMA byte count for this channel *
arch/arm/include/asm/memory.h +2 -0
@@ -245,6 +245,7 @@ static inline void *phys_to_virt(phys_addr_t x)#define __bus_to_pfn (x) __phys_to_pfn(x)#endif +#ifdef CONFIG_VIRT_TO_BUS static inline __deprecated unsigned long virt_to_bus (void *x) {return __virt_to_bus ((unsigned long )x);
@@ -254,6 +255,7 @@ static inline __deprecated void *bus_to_virt(unsigned long x) {return (void *)__bus_to_virt (x); } +#endif /* * Conversion between a struct page and a physical address.
Signature · 1 line
1.8.1.2
Re: [PATCH 01/11] ARM: disable virt_to_bus/virt_to_bus almost everywhere
Hello Arnd,
El 14/02/13 10:49, Arnd Bergmann escribi?:
Quoted 20 lines
We are getting a number of warnings about the use of the deprecated
bus_to_virtfunction in drivers using the ARM ISA DMA API:
drivers/parport/parport_pc.c: In function 'parport_pc_fifo_write_block_dma':drivers/parport/parport_pc.c:622:3: warning: 'bus_to_virt' is deprecated (declared atarch/arm/include/asm/memory.h:253) [-Wdeprecated-declarations]This is only because that function gets used by the inline
set_dma_addr()helper. We know that any driver for the ISA DMA API is correctly using the DMA addresses, so we can change this to use the__bus_to_virt()function instead, which does not warn.After this, there are no remaining drivers that are used on any defconfigs on ARM using
virt_to_busorbus_to_virt, with the exception of the OSS sound driver. That driver is only used on RiscPC, NetWinder and Shark, so we can setARCH_NO_VIRT_TO_BUSon all other platforms and hide the deprecated functions, which is far more effective than marking them as deprecated, in order to avoid any new users of that code.
Quoted 2 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc Russell King <[email protected]>
Small nitpick: Please have a look at the patch subject, I suppose you meant something like "virt_to_bus/bus_to_virt" instead of "virt_to_bus/virt_to_bus".
Thanks,
Emilio
Re: [PATCH 01/11] ARM: disable virt_to_bus/virt_to_bus almost everywhere
Quoted 3 lines · Emilio L?pez
Small nitpick: Please have a look at the patch subject, I suppose you meant something like "virt_to_bus/bus_to_virt" instead of "virt_to_bus/virt_to_bus".
Yes, absolutely right, thanks for your attention. The patch is already applied to a stable branch now, so I would prefer not to rebase it though. If there is an important reason to change the applied patches, I will fix this one as well.
Arnd
Re: [PATCH 01/11] ARM: disable virt_to_bus/virt_to_bus almost everywhere
In reply to Arnd BergmannQuoted 34 lines · Arnd Bergmann
We are getting a number of warnings about the use of the deprecated
bus_to_virtfunction in drivers using the ARM ISA DMA API:
drivers/parport/parport_pc.c: In function 'parport_pc_fifo_write_block_dma':drivers/parport/parport_pc.c:622:3: warning: 'bus_to_virt' is deprecated (declared atarch/arm/include/asm/memory.h:253) [-Wdeprecated-declarations]This is only because that function gets used by the inline
set_dma_addr()helper. We know that any driver for the ISA DMA API is correctly using the DMA addresses, so we can change this to use the__bus_to_virt()function instead, which does not warn.After this, there are no remaining drivers that are used on any defconfigs on ARM using
virt_to_busorbus_to_virt, with the exception of the OSS sound driver. That driver is only used on RiscPC, NetWinder and Shark, so we can setARCH_NO_VIRT_TO_BUSon all other platforms and hide the deprecated functions, which is far more effective than marking them as deprecated, in order to avoid any new users of that code.Signed-off-by Arnd Bergmann <[email protected]>Cc Russell King <[email protected]>--- arch/arm/Kconfig | 4 ++++ arch/arm/configs/shark_defconfig | 1 - arch/arm/include/asm/dma.h | 2 +- arch/arm/include/asm/memory.h | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-)arch/arm/Kconfig +0
-0
arch/arm/Kconfig config ISA_DMA · line 1455
Quoted 6 lines
arch/arm/Kconfig +3
-0@@ -1450,6 +1450,10 @@ config ISA_DMA bool select ISA_DMA_API +config ARCH_NO_VIRT_TO_BUS + def_bool y + depends on !ARCH_RPC && !ARCH_NETWINDER && !ARCH_SHARK
Hi Arnd,
There's a patch in linux-next by Stephen Rothwell "Centralise CONFIG_ARCH_NO_VIRT_TO_BUS" that removes this Kconfig symbol, inverting/replacing it with "select HAVE_VIRT_TO_BUS" (including for arch/arm) which will undo the effects of this.
Cheers
James
Re: [PATCH 01/11] ARM: disable virt_to_bus/virt_to_bus almost everywhere
Quoted 4 lines · James Hogan
There's a patch in linux-next by Stephen Rothwell "Centralise
CONFIG_ARCH_NO_VIRT_TO_BUS" that removes thisKconfigsymbol, inverting/replacing it with "selectHAVE_VIRT_TO_BUS" (including forarch/arm) which will undo the effects of this.
Ah, thanks for pointing that out. At least my patch is harmless then although also useless. I'll leave it in for now so I don't have to rebase all the other bug fixes that are queued for 3.9, but I'm making a note that I'll have to replace this with a proper one. I also don't think that anything breaks if we apply both patches for a while, it will just make my patch useless.
I guess you'll have to do something similar for arch/metag, and Vineet will do it for arch/arc.
Stephen's patch is currently in Andrew's tree, and I don't see an easy way to coordinate this. The patch we will need once both are merged is below.
arch/arc/Kconfig +0 -3
@@ -76,9 +76,6 @@ config HAVE_LATENCYTOP_SUPPORT config NO_DMA def_bool n -config ARCH_NO_VIRT_TO_BUS - def_bool y - source "init/Kconfig" source "kernel/Kconfig.freezer"
arch/arm/Kconfig +2 -5
@@ -49,7 +49,6 @@ config ARM select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_SYSCALL_TRACEPOINTS select HAVE_UID16 - select HAVE_VIRT_TO_BUS select KTIME_SCALAR select PERF_USE_VMALLOC select RTC_LIB
@@ -744,6 +743,7 @@ config ARCH_RPC select NEED_MACH_IO_H select NEED_MACH_MEMORY_H select NO_IOPORT + select HAVE_VIRT_TO_BUS help On the Acorn Risc-PC, Linux can support the internal IDE disk and CD-ROM interface, serial and parallel port, and the floppy drive.
@@ -880,6 +880,7 @@ config ARCH_SHARK select NEED_MACH_MEMORY_H select PCI select ZONE_DMA + select HAVE_VIRT_TO_BUS help Support for the StrongARM based Digital DNARD machine, also known as "Shark" (<http://www.shark-linux.de/shark.html>).
@@ -1462,10 +1463,6 @@ config ISA_DMA bool select ISA_DMA_API -config ARCH_NO_VIRT_TO_BUS - def_bool y - depends on !ARCH_RPC && !ARCH_NETWINDER && !ARCH_SHARK - # Select ISA DMA interface config ISA_DMA_API bool
arch/arm/mach-footbridge/Kconfig +1 -0
@@ -67,6 +67,7 @@ config ARCH_NETWINDER select ISA select ISA_DMA select PCI + select HAVE_VIRT_TO_BUS help Say Y here if you intend to run this kernel on the Rebel.COM NetWinder. Information about this machine can be found at:
arch/metag/Kconfig +0 -3
@@ -35,9 +35,6 @@ config METAG select OF_EARLY_FLATTREE select SPARSE_IRQ -config ARCH_NO_VIRT_TO_BUS - def_bool y - config STACKTRACE_SUPPORT def_bool y
James Hogan
Acked-byRe: [PATCH 01/11] ARM: disable virt_to_bus/virt_to_bus almost everywhere
Quoted 6 lines · Arnd Bergmann
Quoted 4 lines · James Hogan
There's a patch in linux-next by Stephen Rothwell "Centralise
CONFIG_ARCH_NO_VIRT_TO_BUS" that removes thisKconfigsymbol, inverting/replacing it with "selectHAVE_VIRT_TO_BUS" (including forarch/arm) which will undo the effects of this.
Quoted 6 lines
Ah, thanks for pointing that out. At least my patch is harmless then although also useless. I'll leave it in for now so I don't have to rebase all the other bug fixes that are queued for 3.9, but I'm making a note that I'll have to replace this with a proper one. I also don't think that anything breaks if we apply both patches for a while, it will just make my patch useless.
Agreed.
Quoted 2 lines
I guess you'll have to do something similar for
arch/metag, and Vineet will do it forarch/arc.
Yes, I have a little series of patches to fix this sort of harmless thing in arch/metag, removing GENERIC_SIGALTSTACK, HAVE_IRQ_WORK, ARCH_NO_VIRT_TO_BUS, and CONFIG_EXPERIMENTAL from defconfigs. I wasn't sure how it's normally handled though, so I was just going to wait until the other things go in before requesting a second pull.
Quoted 6 lines
Stephen's patch is currently in Andrew's tree, and I don't see an easy way to coordinate this. The patch we will need once both are merged is below.
Signed-off-by Arnd Bergmann <[email protected]>
FWIW:
Cheers
James
Quoted 81 lines
arch/arc/Kconfig +0
-3@@ -76,9 +76,6 @@ config HAVE_LATENCYTOP_SUPPORT config NO_DMA def_bool n -config ARCH_NO_VIRT_TO_BUS - def_bool y - source "init/Kconfig" source "kernel/Kconfig.freezer"arch/arm/Kconfig +2
-5@@ -49,7 +49,6 @@ config ARM select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_SYSCALL_TRACEPOINTS select HAVE_UID16 - select HAVE_VIRT_TO_BUS select KTIME_SCALAR select PERF_USE_VMALLOC select RTC_LIB@@ -744,6 +743,7 @@ config ARCH_RPC select NEED_MACH_IO_H select NEED_MACH_MEMORY_H select NO_IOPORT + select HAVE_VIRT_TO_BUS help On the Acorn Risc-PC, Linux can support the internal IDE disk and CD-ROM interface, serial and parallel port, and the floppy drive.@@ -880,6 +880,7 @@ config ARCH_SHARK select NEED_MACH_MEMORY_H select PCI select ZONE_DMA + select HAVE_VIRT_TO_BUS help Support for the StrongARM based Digital DNARD machine, also known as "Shark" (<http://www.shark-linux.de/shark.html>).@@ -1462,10 +1463,6 @@ config ISA_DMA bool select ISA_DMA_API -config ARCH_NO_VIRT_TO_BUS - def_bool y - depends on !ARCH_RPC && !ARCH_NETWINDER && !ARCH_SHARK - # Select ISA DMA interface config ISA_DMA_API boolarch/arm/mach-footbridge/Kconfig +1
-0@@ -67,6 +67,7 @@ config ARCH_NETWINDER select ISA select ISA_DMA select PCI + select HAVE_VIRT_TO_BUS help Say Y here if you intend to run this kernel on the Rebel.COM NetWinder. Information about this machine can be found at:arch/metag/Kconfig +0
-3@@ -35,9 +35,6 @@ config METAG select OF_EARLY_FLATTREE select SPARSE_IRQ -config ARCH_NO_VIRT_TO_BUS - def_bool y - config STACKTRACE_SUPPORT def_bool y
Vineet Gupta
Acked-byRe: [PATCH 01/11] ARM: disable virt_to_bus/virt_to_bus almost everywhere
Quoted 2 lines
Quoted 2 lines
I guess you'll have to do something similar for
arch/metag, and Vineet will do it forarch/arc.
After getting the tip-bot msg about Stephen's patch for -mm, I never saw it in -next and thus was not sure how when it will start showing up in -next.
Quoted 6 lines
Yes, I have a little series of patches to fix this sort of harmless thing in
arch/metag, removingGENERIC_SIGALTSTACK,HAVE_IRQ_WORK,ARCH_NO_VIRT_TO_BUS, andCONFIG_EXPERIMENTALfrom defconfigs. I wasn't sure how it's normally handled though, so I was just going to wait until the other things go in before requesting a second pull.
Yes I also have a TODO list which certainly had most of those - but thanks for the complete list James :-)
Quoted 11 lines
Quoted 5 lines
Stephen's patch is currently in Andrew's tree, and I don't see an easy way to coordinate this. The patch we will need once both are merged is below.
Signed-off-by Arnd Bergmann <[email protected]>FWIW:
Cheers
James
So this means Stephen's patch - once merged will take care of existing in-tree arches and your's will take care of metag/arc.
Thx,
-Vineet
Re: [PATCH 01/11] ARM: disable virt_to_bus/virt_to_bus almost everywhere
Hi,
Quoted 6 lines · On Thu, 21 Feb 2013 13:07:56 +0530 Vineet Gupta <[email protected]>…
Quoted 3 lines
Quoted 3 lines
I guess you'll have to do something similar for
arch/metag, and Vineet will do it forarch/arc.After getting the tip-bot msg about Stephen's patch for -mm, I never saw it in -next and thus was not sure how when it will start showing up in -next.
It arrived in next-21030220.
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Stephen's patch is currently in Andrew's tree, and I don't see an easy way to coordinate this. The patch we will need once both are merged is below.
Signed-off-by Arnd Bergmann <[email protected]>
Quoted 7 lines
Quoted 3 lines
FWIW:
So this means Stephen's patch - once merged will take care of existing in-tree arches and your's will take care of metag/arc.
The easiest way would be to put the follow up patches in Andrew's patch set (since it is still based on top of linux-next). It usually is merged pretty late, so I would get your own trees merged ASAP and this can be taken care of when Andrew sends his patch set to Linus.
Signature · 9 lines
Cheers, Stephen Rothwell sfr at canb.auug.org.au -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130222/bd744617/attachment-0001.sig>
Re: [PATCH 01/11] ARM: disable virt_to_bus/virt_to_bus almost everywhere
Hi Arnd,
Quoted 23 lines · Stephen Rothwell
Hi,
Quoted 6 lines · On Thu, 21 Feb 2013 13:07:56 +0530 Vineet Gupta <[email protected]>…
Quoted 3 lines
Quoted 3 lines
I guess you'll have to do something similar for
arch/metag, and Vineet will do it forarch/arc.After getting the tip-bot msg about Stephen's patch for -mm, I never saw it in -next and thus was not sure how when it will start showing up in -next.
It arrived in next-21030220.
Quoted 11 lines
Quoted 9 lines
Quoted 5 lines
Stephen's patch is currently in Andrew's tree, and I don't see an easy way to coordinate this. The patch we will need once both are merged is below.
Signed-off-by Arnd Bergmann <[email protected]>FWIW:
Quoted 8 lines
Quoted 2 lines
So this means Stephen's patch - once merged will take care of existing in-tree arches and your's will take care of metag/arc.
The easiest way would be to put the follow up patches in Andrew's patch set (since it is still based on top of linux-next). It usually is merged pretty late, so I would get your own trees merged ASAP and this can be taken care of when Andrew sends his patch set to Linus.
Have you queued up this change via one of your trees already for 3.9-rcX ? If not, I can fold it in with a bunch of Kconfig cleanups for ARC (GENERIC_SIGALTSTACK, HAVE_IRQ_WORK), given that those bits are already in linus' tree.
Thx,
-Vineet
Re: [PATCH 01/11] ARM: disable virt_to_bus/virt_to_bus almost everywhere
Quoted 5 lines · Vineet Gupta
Have you queued up this change via one of your trees already for 3.9-rcX ? If not, I can fold it in with a bunch of
Kconfigcleanups for ARC (GENERIC_SIGALTSTACK,HAVE_IRQ_WORK), given that those bits are already in linus' tree.
I haven't put it in my tree yet, not. Please put it in yours.
Arnd
PATCH 2/11 ARM: samsung: fix assembly syntax for new gas
In reply to Arnd BergmannRecent assembler versions complain about extraneous whitespace inside [] brackets. This fixes all of these instances for the samsung platforms. We should backport this to all kernels that might need to be built with new binutils.
arch/arm/kernel/entry-armv.S: Assembler messages:arch/arm/kernel/entry-armv.S:214: Error: ARM register expected -- `ldr r2,[ r6,#(0x10)]'arch/arm/kernel/entry-armv.S:214: Error: ARM register expected -- `ldr r0,[ r6,#(0x14)]'arch/arm/kernel/entry-armv.S:430: Error: ARM register expected -- `ldr r2,[ r6,#(0x10)]'arch/arm/kernel/entry-armv.S:430: Error: ARM register expected -- `ldr r0,[ r6,#(0x14)]'arch/arm/mach-s3c24xx/sleep-s3c2410.S: Assembler messages:arch/arm/mach-s3c24xx/sleep-s3c2410.S:48: Error: ARM register expected -- `ldr r7,[ r4 ]'arch/arm/mach-s3c24xx/sleep-s3c2410.S:49: Error: ARM register expected -- `ldr r8,[ r5 ]'arch/arm/mach-s3c24xx/sleep-s3c2410.S:50: Error: ARM register expected -- `ldr r9,[ r6 ]'arch/arm/mach-s3c24xx/sleep-s3c2410.S:64: Error: ARM register expected -- `streq r7,[ r4 ]'arch/arm/mach-s3c24xx/sleep-s3c2410.S:65: Error: ARM register expected -- `streq r8,[ r5 ]'arch/arm/mach-s3c24xx/sleep-s3c2410.S:66: Error: ARM register expected -- `streq r9,[ r6 ]'arch/arm/kernel/debug.S: Assembler messages:arch/arm/kernel/debug.S:83: Error: ARM register expected -- `ldr r2,[ r2,#((0x0B0)+(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000))))-((0)+(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000))))]' arch/arm/kernel/debug.S:83: Error: ARM register expected -- `ldr r2,[ r3,#(0x18)]'arch/arm/kernel/debug.S:85: Error: ARM register expected -- `ldr r2,[ r2,#((0x0B0)+(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000))))-((0)+(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000))))]' arch/arm/kernel/debug.S:85: Error: ARM register expected -- `ldr r2,[ r3,#(0x18)]'arch/arm/mach-s3c24xx/pm-h1940.S: Assembler messages:arch/arm/mach-s3c24xx/pm-h1940.S:33: Error: ARM register expected -- `ldr pc,[ r0,#((0x0B8)+(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000))))-(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000)))]' arch/arm/mach-s3c24xx/sleep-s3c2412.S: Assembler messages:arch/arm/mach-s3c24xx/sleep-s3c2412.S:60: Error: ARM register expected -- `ldrne r9,[ r1 ]'arch/arm/mach-s3c24xx/sleep-s3c2412.S:61: Error: ARM register expected -- `strne r9,[ r1 ]'arch/arm/mach-s3c24xx/sleep-s3c2412.S:62: Error: ARM register expected -- `ldrne r9,[ r2 ]'arch/arm/mach-s3c24xx/sleep-s3c2412.S:63: Error: ARM register expected -- `strne r9,[ r2 ]'arch/arm/mach-s3c24xx/sleep-s3c2412.S:64: Error: ARM register expected -- `ldrne r9,[ r3 ]'arch/arm/mach-s3c24xx/sleep-s3c2412.S:65: Error: ARM register expected -- `strne r9,[ r3 ]'arch/arm/kernel/debug.S:83: Error: ARM register expected -- `ldr r2,[ r3,#(0x08)]'arch/arm/kernel/debug.S:83: Error: ARM register expected -- `ldr r2,[ r3,#(0x18)]'arch/arm/kernel/debug.S:83: Error: ARM register expected -- `ldr r2,[ r3,#(0x10)]'arch/arm/kernel/debug.S:85: Error: ARM register expected -- `ldr r2,[ r3,#(0x08)]'arch/arm/kernel/debug.S:85: Error: ARM register expected -- `ldr r2,[ r3,#(0x18)]'arch/arm/kernel/debug.S:85: Error: ARM register expected -- `ldr r2,[ r3,#(0x10)]'
--- arch/arm/mach-s3c24xx/include/mach/debug-macro.S | 12 ++++++------ arch/arm/mach-s3c24xx/include/mach/entry-macro.S | 4 ++-- arch/arm/mach-s3c24xx/pm-h1940.S | 2 +- arch/arm/mach-s3c24xx/sleep-s3c2410.S | 12 ++++++------ arch/arm/mach-s3c24xx/sleep-s3c2412.S | 12 ++++++------ arch/arm/plat-samsung/include/plat/debug-macro.S | 18 +++++++++--------- 6 files changed, 30 insertions(+), 30 deletions(-)
arch/arm/mach-s3c24xx/include/mach/debug-macro.S +6 -6
@@ -40,17 +40,17 @@ addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) bic \rd, \rd, #0xff000 - ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] + ldr \rd, [\rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0)] and \rd, \rd, #0x00ff0000 teq \rd, #0x00440000 @ is it 2440? 1004: - ldr \rd, [ \rx, # S3C2410_UFSTAT ] + ldr \rd, [\rx, # S3C2410_UFSTAT] moveq \rd, \rd, lsr #SHIFT_2440TXF tst \rd, #S3C2410_UFSTAT_TXFULL .endm .macro fifo_full_s3c2410 rd, rx - ldr \rd, [ \rx, # S3C2410_UFSTAT ] + ldr \rd, [\rx, # S3C2410_UFSTAT] tst \rd, #S3C2410_UFSTAT_TXFULL .endm
@@ -68,18 +68,18 @@ addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) bic \rd, \rd, #0xff000 - ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] + ldr \rd, [\rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0)] and \rd, \rd, #0x00ff0000 teq \rd, #0x00440000 @ is it 2440? 10000: - ldr \rd, [ \rx, # S3C2410_UFSTAT ] + ldr \rd, [\rx, # S3C2410_UFSTAT] andne \rd, \rd, #S3C2410_UFSTAT_TXMASK andeq \rd, \rd, #S3C2440_UFSTAT_TXMASK .endm .macro fifo_level_s3c2410 rd, rx - ldr \rd, [ \rx, # S3C2410_UFSTAT ] + ldr \rd, [\rx, # S3C2410_UFSTAT] and \rd, \rd, #S3C2410_UFSTAT_TXMASK .endm
arch/arm/mach-s3c24xx/include/mach/entry-macro.S +2 -2
@@ -31,10 +31,10 @@ @@ try the interrupt offset register, since it is there - ldr \irqstat, [ \base, #INTPND ] + ldr \irqstat, [\base, #INTPND ] teq \irqstat, #0 beq 1002f - ldr \irqnr, [ \base, #INTOFFSET ] + ldr \irqnr, [\base, #INTOFFSET ] mov \tmp, #1 tst \irqstat, \tmp, lsl \irqnr bne 1001f
arch/arm/mach-s3c24xx/pm-h1940.S +1 -1
@@ -30,4 +30,4 @@ h1940_pm_return: mov r0, #S3C2410_PA_GPIO - ldr pc, [ r0, #S3C2410_GSTATUS3 - S3C24XX_VA_GPIO ] + ldr pc, [r0, #S3C2410_GSTATUS3 - S3C24XX_VA_GPIO]
arch/arm/mach-s3c24xx/sleep-s3c2410.S +6 -6
@@ -45,9 +45,9 @@ ENTRY(s3c2410_cpu_suspend) ldr r4, =S3C2410_REFRESH ldr r5, =S3C24XX_MISCCR ldr r6, =S3C2410_CLKCON - ldr r7, [ r4 ] @ get REFRESH (and ensure in TLB) - ldr r8, [ r5 ] @ get MISCCR (and ensure in TLB) - ldr r9, [ r6 ] @ get CLKCON (and ensure in TLB) + ldr r7, [r4] @ get REFRESH (and ensure in TLB) + ldr r8, [r5] @ get MISCCR (and ensure in TLB) + ldr r9, [r6] @ get CLKCON (and ensure in TLB) orr r7, r7, #S3C2410_REFRESH_SELF @ SDRAM sleep command orr r8, r8, #S3C2410_MISCCR_SDSLEEP @ SDRAM power-down signals
@@ -61,8 +61,8 @@ ENTRY(s3c2410_cpu_suspend) @@ align next bit of code to cache line .align 5 s3c2410_do_sleep: - streq r7, [ r4 ] @ SDRAM sleep command - streq r8, [ r5 ] @ SDRAM power-down config - streq r9, [ r6 ] @ CPU sleep + streq r7, [r4] @ SDRAM sleep command + streq r8, [r5] @ SDRAM power-down config + streq r9, [r6] @ CPU sleep 1: beq 1b mov pc, r14
arch/arm/mach-s3c24xx/sleep-s3c2412.S +6 -6
@@ -57,12 +57,12 @@ s3c2412_sleep_enter1: * retry, as simply returning causes the system to lock. */ - ldrne r9, [ r1 ] - strne r9, [ r1 ] - ldrne r9, [ r2 ] - strne r9, [ r2 ] - ldrne r9, [ r3 ] - strne r9, [ r3 ] + ldrne r9, [r1] + strne r9, [r1] + ldrne r9, [r2] + strne r9, [r2] + ldrne r9, [r3] + strne r9, [r3] bne s3c2412_sleep_enter1 mov pc, r14
arch/arm/plat-samsung/include/plat/debug-macro.S +9 -9
@@ -14,12 +14,12 @@ /* The S5PV210/S5PC110 implementations are as belows. */ .macro fifo_level_s5pv210 rd, rx - ldr \rd, [ \rx, # S3C2410_UFSTAT ] + ldr \rd, [\rx, # S3C2410_UFSTAT] and \rd, \rd, #S5PV210_UFSTAT_TXMASK .endm .macro fifo_full_s5pv210 rd, rx - ldr \rd, [ \rx, # S3C2410_UFSTAT ] + ldr \rd, [\rx, # S3C2410_UFSTAT] tst \rd, #S5PV210_UFSTAT_TXFULL .endm
@@ -27,7 +27,7 @@ * most widely re-used */ .macro fifo_level_s3c2440 rd, rx - ldr \rd, [ \rx, # S3C2410_UFSTAT ] + ldr \rd, [\rx, # S3C2410_UFSTAT] and \rd, \rd, #S3C2440_UFSTAT_TXMASK .endm
@@ -36,7 +36,7 @@ #endif .macro fifo_full_s3c2440 rd, rx - ldr \rd, [ \rx, # S3C2410_UFSTAT ] + ldr \rd, [\rx, # S3C2410_UFSTAT] tst \rd, #S3C2440_UFSTAT_TXFULL .endm
@@ -45,11 +45,11 @@ #endif .macro senduart,rd,rx - strb \rd, [\rx, # S3C2410_UTXH ] + strb \rd, [\rx, # S3C2410_UTXH] .endm .macro busyuart, rd, rx - ldr \rd, [ \rx, # S3C2410_UFCON ] + ldr \rd, [\rx, # S3C2410_UFCON] tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? beq 1001f @ @ FIFO enabled...
@@ -60,7 +60,7 @@ 1001: @ busy waiting for non fifo - ldr \rd, [ \rx, # S3C2410_UTRSTAT ] + ldr \rd, [\rx, # S3C2410_UTRSTAT] tst \rd, #S3C2410_UTRSTAT_TXFE beq 1001b
@@ -68,7 +68,7 @@ .endm .macro waituart,rd,rx - ldr \rd, [ \rx, # S3C2410_UFCON ] + ldr \rd, [\rx, # S3C2410_UFCON] tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? beq 1001f @ @ FIFO enabled...
@@ -79,7 +79,7 @@ b 1002f 1001: @ idle waiting for non fifo - ldr \rd, [ \rx, # S3C2410_UTRSTAT ] + ldr \rd, [\rx, # S3C2410_UTRSTAT] tst \rd, #S3C2410_UTRSTAT_TXFE beq 1001b
Signature · 1 line
1.8.1.2
Re: [PATCH 02/11] ARM: samsung: fix assembly syntax for new gas
Quoted 5 lines · Arnd Bergmann
Recent assembler versions complain about extraneous whitespace inside [] brackets. This fixes all of these instances for the samsung platforms. We should backport this to all kernels that might need to be built with new binutils.
I hope that's also been reported as a bug to the binutils people.
Re: [PATCH 02/11] ARM: samsung: fix assembly syntax for new gas
Quoted 8 lines · Russell King - ARM Linux
Quoted 5 lines · Arnd Bergmann
Recent assembler versions complain about extraneous whitespace inside [] brackets. This fixes all of these instances for the samsung platforms. We should backport this to all kernels that might need to be built with new binutils.
I hope that's also been reported as a bug to the binutils people.
No, I did not think of that. There were a lot of bug reports for similar issues and I assumed that there was a good reason for the change, but I agree that it sounds like a regression, especially since the code that triggers the error should not be ambiguous and there was never a warning about it.
Arnd
Re: [PATCH 02/11] ARM: samsung: fix assembly syntax for new gas
In reply to Russell King - ARM LinuxQuoted 8 lines · Russell King - ARM Linux
Quoted 5 lines · Arnd Bergmann
Recent assembler versions complain about extraneous whitespace inside [] brackets. This fixes all of these instances for the samsung platforms. We should backport this to all kernels that might need to be built with new binutils.
I hope that's also been reported as a bug to the binutils people.
See PR gas/14887, a post binutils-2.23.1 regression which seems to be fixed on trunk but not on 2.23 branch.
Re: [PATCH 02/11] ARM: samsung: fix assembly syntax for new gas
Quoted 8 lines · Mikael Pettersson
Quoted 7 lines · Russell King - ARM Linux
Quoted 5 lines · Arnd Bergmann
Recent assembler versions complain about extraneous whitespace inside [] brackets. This fixes all of these instances for the samsung platforms. We should backport this to all kernels that might need to be built with new binutils.
Quoted 4 lines
Quoted 1 line
I hope that's also been reported as a bug to the binutils people.
See PR gas/14887, a post binutils-2.23.1 regression which seems to be fixed on trunk but not on 2.23 branch.
Ok, thanks for the info, I just came to the same conclusion a few minutes before your reply.
Since I have some binutils people listening now, maybe someone can comment on the issue I tried working around in
https://patchwork.kernel.org/patch/2013211/
Arnd
Re: [PATCH 02/11] ARM: samsung: fix assembly syntax for new gas
In reply to Arnd BergmannHi,
Quoted 5 lines · Arnd Bergmann
Recent assembler versions complain about extraneous whitespace inside [] brackets. This fixes all of these instances for the samsung platforms. We should backport this to all kernels that might need to be built with new binutils.
Which binutils version is this?
A.
Re: [PATCH 02/11] ARM: samsung: fix assembly syntax for new gas
Quoted 10 lines · Aaro Koskinen
Hi,
Quoted 5 lines · Arnd Bergmann
Recent assembler versions complain about extraneous whitespace inside [] brackets. This fixes all of these instances for the samsung platforms. We should backport this to all kernels that might need to be built with new binutils.
Which binutils version is this?
I saw it first on the ubuntu binutils-arm-linux-gnueabihf-2.23.1- 0ubuntu6cross1.89 binaries but have now successfully bisected it to the below commit that introduced the kernel build breakage in the upstream binutils-2_23-branch.
The changelog comment is rather unhelpful for determining whether it was intentional or not, and I can't make any sense out of the source code.
Arnd
8<--------
commit 65faec7cb829c58b20a5f26ee2908ac35165fc58
Author: Roland McGrath <[email protected]> Date: Tue Nov 20 17:58:28 2012 +0000
gas/
* config/tc-arm.c (arm_symbol_chars): New variable.
* config/tc-arm.h (tc_symbol_chars): New macro, defined to that.
gas/testsuite/
* gas/arm/macro-pld.s: New file.
* gas/arm/macro-pld.d: New file.
gas/ChangeLog +5 -0
@@ -9,6 +9,11 @@ * config/tc-aarch64.c (first_error_fmt): Add ATTRIBUTE_UNUSED to the local variable "ret". +2012-11-20 Roland McGrath <[email protected]> + + * config/tc-arm.c (arm_symbol_chars): New variable. + * config/tc-arm.h (tc_symbol_chars): New macro, defined to that. + 2012-11-07 James Murray <[email protected]> * config/tc-m68hc11.c: Fix R_M68HC12_16B relocation for movb/w
gas/config/tc-arm.c +10 -5
@@ -321,6 +321,11 @@ static int implicit_it_mode = IMPLICIT_IT_MODE_ARM;static bfd_boolean unified_syntax = FALSE; +/* An immediate operand can start with #, and ld*, st*, pld operands +can contain [ and ]. We need to tell APP not to elide whitespace +before a [, which can appear as the first operand for pld. */ +const char arm_symbol_chars[] ="#[]" ; +enum neon_el_type { NT_invtype,
@@ -10225,7 +10230,7 @@ do_t_branch (void) }/* Actually do the work for Thumb state bkpt and hlt. The only difference -between the two is the maximum immediate allowed - which is passed in +between the two is the maximum immediate allowed - which is passed in RANGE. */ static void do_t_bkpt_hlt1 (int range)
@@ -14660,7 +14665,7 @@ do_vfp_nsyn_cvtz (void) }static void -do_vfp_nsyn_cvt_fpv8 (enum neon_cvt_flavour flavour, +do_vfp_nsyn_cvt_fpv8 (enum neon_cvt_flavour flavour,enum neon_cvt_mode mode) {int sz, op;
@@ -14720,9 +14725,9 @@ do_neon_cvt_1 (enum neon_cvt_mode mode)/* PR11109: Handle round-to-zero for VCVT conversions. */ if (mode == neon_cvt_mode_z &&ARM_CPU_HAS_FEATURE (cpu_variant, fpu_arch_vfp_v2) - && (flavour == neon_cvt_flavour_s32_f32 - || flavour == neon_cvt_flavour_u32_f32 - || flavour == neon_cvt_flavour_s32_f64 + && (flavour == neon_cvt_flavour_s32_f32 + || flavour == neon_cvt_flavour_u32_f32 + || flavour == neon_cvt_flavour_s32_f64 || flavour == neon_cvt_flavour_u32_f64) && (rs ==NS_FD || rs ==NS_FF )) {
gas/config/tc-arm.h +3 -0
@@ -82,6 +82,9 @@ struct fix;/* We support double slash line-comments for compatibility with the ARM AArch64 Assembler. */ #define DOUBLESLASH_LINE_COMMENTS +#define tc_symbol_chars arm_symbol_chars +extern const char arm_symbol_chars[]; +#define TC_FORCE_RELOCATION (FIX ) arm_force_relocation (FIX)extern unsigned int arm_frag_max_var (struct frag *);
gas/testsuite/ChangeLog +5 -0
@@ -1,3 +1,8 @@ +2012-11-20 Roland McGrath <[email protected]> + + * gas/arm/macro-pld.s: New file. + * gas/arm/macro-pld.d: New file. + 2012-10-09 Nagajyothi Eggone <[email protected]> * gas/i386/i386.exp: Run bdver3 test cases.
gas/testsuite/gas/arm/macro-pld.d new file +8 -0
@@ -0,0 +1,8 @@ +#objdump: -dr + +.*: file format .* + +Disassembly of section \.text: + +0+ <.*>: +\s*0:\s+f5d0f000\s+pld\s+\[r0\]
gas/testsuite/gas/arm/macro-pld.s new file +4 -0
@@ -0,0 +1,4 @@ +.macro foo arg, rest:vararg + \rest +.endm + foo r0, pld [r0]
PATCH 3/11 ARM: w90x900: fix legacy assembly syntax
In reply to Arnd BergmannNew ARM binutils don't allow extraneous whitespace inside of brackets, which causes this error on all mach-w90x900 defconfigs:
arch/arm/kernel/entry-armv.S: Assembler messages:arch/arm/kernel/entry-armv.S:214: Error: ARM register expected -- ldr r0,[ r6,#(0x10C)]' arch/arm/kernel/entry-armv.S:214: Error: ARM register expected -- ldr r0,[ r6,#(0x110)]' arch/arm/kernel/entry-armv.S:430: Error: ARM register expected -- ldr r0,[ r6,#(0x10C)]' arch/arm/kernel/entry-armv.S:430: Error: ARM register expected -- ldr r0,[ r6,#(0x110)]'
This removes the whitespace in order to build the kernel again.
--- arch/arm/mach-w90x900/include/mach/entry-macro.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-w90x900/include/mach/entry-macro.S +2 -2
@@ -19,8 +19,8 @@ mov \base, #AIC_BA - ldr \irqnr, [ \base, #AIC_IPER] - ldr \irqnr, [ \base, #AIC_ISNR] + ldr \irqnr, [\base, #AIC_IPER] + ldr \irqnr, [\base, #AIC_ISNR] cmp \irqnr, #0 .endm
Signature · 1 line
1.8.1.2
PATCH 4/11 ARM: shmobile: fix defconfig warning on CONFIG_USB
In reply to Arnd BergmannA recent update to the marzen_defconfig introduced a duplicate CONFIG_USB=y line. This removes one of the two.
arch/arm/configs/marzen_defconfig:86:warning: override: reassigning to symbol USB
--- arch/arm/configs/marzen_defconfig | 1 - 1 file changed, 1 deletion(-)
arch/arm/configs/marzen_defconfig +0 -1
@@ -83,7 +83,6 @@ CONFIG_USB=y CONFIG_USB_RCAR_PHY=y CONFIG_MMC=y CONFIG_MMC_SDHI=y -CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_HCD_PLATFORM=y
Signature · 1 line
1.8.1.2
PATCH 5/11 ARM: sa1100: don't warn about mach/ide.h
In reply to Arnd BergmannThis warning has existed since before the start of (git) history. Apparently nobody has bothered to fix it in a long time, and this is unlikely to change. Note that the file that the warning refers to has moved to a different location and was subsequently deleted in 2008.
--- arch/arm/mach-sa1100/lart.c | 3 --- 1 file changed, 3 deletions(-)
arch/arm/mach-sa1100/lart.c +0 -3
@@ -24,9 +24,6 @@#include "generic.h" - -#warning "include/asm/arch-sa1100/ide.h needs fixing for lart" -static struct mcp_plat_data lart_mcp_data = { .mccr0 =MCCR0_ADM , .sclk_rate =11981000 ,
Signature · 1 line
1.8.1.2
PATCH 6/11 ARM: integrator/versatile: fix NOMMU warnings
In reply to Arnd BergmannOn NOMMU kernels, the io_desc variables are unused because we don't use the MMU to remap the MMIO areas.
Marking these variables as __maybe_unused easily avoids the otherwise harmless warnings like
warning: 'versatile_io_desc' defined but not used
--- arch/arm/mach-integrator/integrator_ap.c | 2 +- arch/arm/mach-integrator/integrator_cp.c | 2 +- arch/arm/mach-versatile/core.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-integrator/integrator_ap.c +1 -1
@@ -94,7 +94,7 @@ void __iomem *ap_syscon_base;* f1b00000 1b000000 GPIO */ -static struct map_desc ap_io_desc[]__initdata = { +static struct map_desc ap_io_desc[]__initdata __maybe_unused = { { .virtual =IO_ADDRESS (INTEGRATOR_HDR_BASE ), .pfn =__phys_to_pfn (INTEGRATOR_HDR_BASE ),
arch/arm/mach-integrator/integrator_cp.c +1 -1
@@ -78,7 +78,7 @@ static void __iomem *intcp_con_base;* fcb00000 cb000000 CP system control */ -static struct map_desc intcp_io_desc[]__initdata = { +static struct map_desc intcp_io_desc[]__initdata __maybe_unused = { { .virtual =IO_ADDRESS (INTEGRATOR_HDR_BASE ), .pfn =__phys_to_pfn (INTEGRATOR_HDR_BASE ),
arch/arm/mach-versatile/core.c +1 -1
@@ -114,7 +114,7 @@ void __init versatile_init_irq(void)writel (PIC_MASK ,VA_SIC_BASE +SIC_INT_PIC_ENABLE ); } -static struct map_desc versatile_io_desc[]__initdata = { +static struct map_desc versatile_io_desc[]__initdata __maybe_unused = { { .virtual =IO_ADDRESS (VERSATILE_SYS_BASE ), .pfn =__phys_to_pfn (VERSATILE_SYS_BASE ),
Signature · 1 line
1.8.1.2
Re: [PATCH 06/11] ARM: integrator/versatile: fix NOMMU warnings
Quoted 4 lines · Arnd Bergmann
On NOMMU kernels, the
io_descvariables are unused because we don't use the MMU to remap the MMIO areas.
Quoted 8 lines
Marking these variables as
__maybe_unusedeasily avoids the otherwise harmless warnings likewarning: '
versatile_io_desc' defined but not usedSigned-off-by Arnd Bergmann <[email protected]>Cc Linus Walleij <[email protected]>Cc Russell King <[email protected]>
Yours,
Linus Walleij
PATCH 7/11 ARM: integrator: fix build with INTEGRATOR_AP off
In reply to Arnd BergmannThe conditional declaration of ap_uart_data is broken and causes this build error:
In file included from arch/arm/mach-integrator/core.c:35:0:arch/arm/mach-integrator/common.h:6:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
Turning the check into an constant-expression if(IS_ENABLED()) statement creates more readable code and solves this problem as well.
--- arch/arm/mach-integrator/common.h | 5 ----- arch/arm/mach-integrator/core.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-)
arch/arm/mach-integrator/common.h +0 -5
@@ -1,10 +1,5 @@#include <linux/amba/serial.h> -#ifdef CONFIG_ARCH_INTEGRATOR_AP extern struct amba_pl010_data ap_uart_data; -#else -/* Not used without Integrator/AP support anyway */ -struct amba_pl010_data ap_uart_data {}; -#endif void integrator_init_early (void );int integrator_init (bool is_cp);void integrator_reserve (void );
arch/arm/mach-integrator/core.c +1 -1
@@ -71,7 +71,7 @@ int __init integrator_init(bool is_cp)* hard-code them. The Integator/CP and forward have proper cell IDs. * Else we leave them undefined to the bus driver can autoprobe them. */ -if (!is_cp) { +if (!is_cp &&IS_ENABLED (CONFIG_ARCH_INTEGRATOR_AP )) { rtc_device.periphid =0x00041030 ; uart0_device.periphid =0x00041010 ; uart1_device.periphid =0x00041010 ;
Signature · 1 line
1.8.1.2
Re: [PATCH 07/11] ARM: integrator: fix build with INTEGRATOR_AP off
Quoted 11 lines · Arnd Bergmann
The conditional declaration of
ap_uart_datais broken and causes this build error:In file included from
arch/arm/mach-integrator/core.c:35:0:arch/arm/mach-integrator/common.h:6:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' tokenTurning the check into an constant-expression if(IS_ENABLED()) statement creates more readable code and solves this problem as well.
Cc Linus Walleij <[email protected]>Cc Russell King <[email protected]>
Brilliant Arnd, thanks for fixing this!
Yours,
Linus Walleij
PATCH 8/11 ARM: pick Versatile by default for !MMU
In reply to Arnd BergmannThe introduction of ARCH_MULTIPLATFORM changed the default for nommu kernels from Versatile to Integrator, which is less common, and does not currently build for allnoconfig because that does not select any of the CPUs.
This also ensures that at least one of the three board files in versatile are enabled, which lets us successfully build an allnoconfig kernel.
--- arch/arm/Kconfig | 3 ++- arch/arm/mach-versatile/Kconfig | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-)
arch/arm/Kconfig +2 -1
@@ -261,7 +261,8 @@ config MMU # choice prompt "ARM system type" - default ARCH_MULTIPLATFORM + default ARCH_VERSATILE if !MMU + default ARCH_MULTIPLATFORM if MMU config ARCH_MULTIPLATFORM bool "Allow multiple platforms to be selected"
arch/arm/mach-versatile/Kconfig +5 -0
@@ -25,4 +25,9 @@ config MACH_VERSATILE_DT Include support for the ARM(R) Versatile/PB platform, using the device tree for discovery +config MACH_VERSATILE_AUTO + def_bool y + depends on !ARCH_VERSATILE_PB && !MACH_VERSATILE_AB + select MACH_VERSATILE_DT + endmenu
Signature · 1 line
1.8.1.2
PATCH 9/11 ARM: mvebu: allow selecting mvebu without Armada XP
In reply to Arnd BergmannSelecting only CONFIG_ARCH_MVEBU but not the respective options for Armada 370 or Armada XP results in these link errors:
arch/arm/mach-mvebu/built-in.o: In function `armada_xp_smp_init_cpus':arch/arm/mach-mvebu/platsmp.c:91: undefined reference to coherency_get_cpu_count' arch/arm/mach-mvebu/platsmp.c:104: undefined reference to armada_mpic_send_doorbell' arch/arm/mach-mvebu/built-in.o: In function `armada_xp_smp_prepare_cpus':arch/arm/mach-mvebu/platsmp.c:111: undefined reference to set_cpu_coherent' arch/arm/mach-mvebu/built-in.o: In function armada_xp_boot_secondary':arch/arm/mach-mvebu/platsmp.c:83: undefined reference to armada_xp_boot_cpu' arch/arm/mach-mvebu/built-in.o: In function armada_xp_secondary_init':arch/arm/mach-mvebu/platsmp.c:75: undefined reference to armada_xp_mpic_smp_cpu_init' arch/arm/mach-mvebu/built-in.o: In function armada_xp_secondary_startup':arch/arm/mach-mvebu/headsmp.S:46: undefined reference to `ll_set_cpu_coherent'
We can solve this by enabling all common MVEBU files that are referenced by the SMP files. This means we enable code that is not going to be used without a machine descriptor referencing it, but only if the kernel is configured specifically for this case.
--- arch/arm/mach-mvebu/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/mach-mvebu/Makefile +3 -2
@@ -3,7 +3,8 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ AFLAGS_coherency_ll.o := -Wa,-march=armv7-a -obj-y += system-controller.o -obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o addr-map.o coherency.o coherency_ll.o pmsu.o +obj-y += system-controller.o +obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o +obj-$(CONFIG_ARCH_MVEBU) += addr-map.o coherency.o coherency_ll.o pmsu.o irq-armada-370-xp.o obj-$(CONFIG_SMP) += platsmp.o headsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
Signature · 1 line
1.8.1.2
PATCH 10/11 ARM: s3c: i2c: add platform_device forward declaration
In reply to Arnd BergmannA recent cleanup to the mach-osiris.c file is causing build errors because the i2c-s3c2410.h header file is included before we see the definition for platform_device. The fix is to make the header file more robust against inclusion from other places. While this should normally go through the i2c tree, the bug only exists in arm-soc at the moment, so it's easier to fix it there before it goes upstream.
Without this patch, building s3c2410_defconfig results in:
arch/arm/mach-s3c24xx/mach-osiris.c:34:0:include/linux/platform_data/i2c-s3c2410.h:37:26: warning: 'struct platform_device' declared inside parameter list [enabled by default]
--- include/linux/platform_data/i2c-s3c2410.h | 2 ++ 1 file changed, 2 insertions(+)
include/linux/platform_data/i2c-s3c2410.h +2 -0
@@ -15,6 +15,8 @@#define S3C_IICFLG_FILTER (1<<0)/* enable s3c2440 filter */ +struct platform_device ; +/** * struct s3c2410_platform_i2c - Platform data for s3c I2C. * @bus_num: The bus number to use (if possible).
Signature · 1 line
1.8.1.2
Re: [PATCH 10/11] ARM: s3c: i2c: add platform_device forward declaration
Quoted 7 lines · Arnd Bergmann
A recent cleanup to the
mach-osiris.cfile is causing build errors because thei2c-s3c2410.hheader file is included before we see the definition forplatform_device. The fix is to make the header file more robust against inclusion from other places. While this should normally go through the i2c tree, the bug only exists in arm-soc at the moment, so it's easier to fix it there before it goes upstream.
Quoted 6 lines
Without this patch, building
s3c2410_defconfigresults in:
arch/arm/mach-s3c24xx/mach-osiris.c:34:0:include/linux/platform_data/i2c-s3c2410.h:37:26: warning: 'structplatform_device' declared inside parameter list [enabled by default]Signed-off-by Arnd Bergmann <[email protected]>
Fine with me:
PATCH 11/11 scripts/sortextable: silence script output
In reply to Arnd BergmannThe exception table sorter outputs one line every time it gets called, e.g. 'sort done marker at 66dc00', which is slightly annoying when doing 'make -s' which is otherwise completely silent. Since that output is not helpful to most people building the kernel, turn it off by default.
--- scripts/sortextable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/sortextable.h +1 -1
@@ -182,7 +182,7 @@ do_func(Elf_Ehdr *ehdr, char const *const fname, table_sort_t custom_sort)_r (&sort_needed_sym->st_value) -_r (&sort_needed_sec->sh_addr); -#if 1 +#if 0 printf ("sort done marker at %lx\n" , (unsigned long )((char *)sort_done_location - (char *)ehdr));#endif
Signature · 1 line
1.8.1.2
Re: [PATCH 11/11] scripts/sortextable: silence script output
Quoted 19 lines · Arnd Bergmann
The exception table sorter outputs one line every time it gets called, e.g. 'sort done marker at 66dc00', which is slightly annoying when doing 'make -s' which is otherwise completely silent. Since that output is not helpful to most people building the kernel, turn it off by default.
Signed-off-by Arnd Bergmann <[email protected]>Acked-by David Daney <[email protected]>Cc "H. Peter Anvin" <[email protected]>--- scripts/sortextable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/sortextable.h +0
-0
scripts/sortextable.h do_func(Elf_Ehdr *ehdr, char const *const fname, table_sort_t custom_sort) · line 188
Quoted 8 lines
scripts/sortextable.h +1
-1@@ -182,7 +182,7 @@ do_func(Elf_Ehdr *ehdr, char const *const fname, table_sort_t custom_sort)_r (&sort_needed_sym->st_value) -_r (&sort_needed_sec->sh_addr); -#if 1 +#if 0 printf ("sort done marker at %lx\n" , (unsigned long )((char *)sort_done_location - (char *)ehdr));#endif
... or just kill the printf entirely.
-hpa
Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.