From a5d533ee07690b9f904ca7b3732eed3d1134d4bc Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 12 Nov 2012 22:16:12 +0000 Subject: 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. Signed-off-by: Arnd Bergmann Cc: Russell King --- 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(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 67874b82a4ed..91d4aeaa772b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -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 diff --git a/arch/arm/configs/shark_defconfig b/arch/arm/configs/shark_defconfig index caa07db90cf5..e319b2c56f11 100644 --- a/arch/arm/configs/shark_defconfig +++ b/arch/arm/configs/shark_defconfig @@ -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 diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h index 5694a0d6576b..58b8c6a0ab1f 100644 --- a/arch/arm/include/asm/dma.h +++ b/arch/arm/include/asm/dma.h @@ -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 * diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 73cf03aa981e..b11105c8599a 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -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. -- cgit v1.2.3 From 2815774bb38445006074e16251b9ef5123bdc616 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 8 Jan 2013 21:58:31 +0000 Subject: ARM: samsung: fix assembly syntax for new gas 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. 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)]' Signed-off-by: Arnd Bergmann Acked-by: Kukjin Kim Cc: Ben Dooks Cc: stable@vger.kernel.org --- 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(-) diff --git a/arch/arm/mach-s3c24xx/include/mach/debug-macro.S b/arch/arm/mach-s3c24xx/include/mach/debug-macro.S index 4135de87d1f7..13ed33c69113 100644 --- a/arch/arm/mach-s3c24xx/include/mach/debug-macro.S +++ b/arch/arm/mach-s3c24xx/include/mach/debug-macro.S @@ -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 diff --git a/arch/arm/mach-s3c24xx/include/mach/entry-macro.S b/arch/arm/mach-s3c24xx/include/mach/entry-macro.S index 7615a14773fa..6a21beeba1da 100644 --- a/arch/arm/mach-s3c24xx/include/mach/entry-macro.S +++ b/arch/arm/mach-s3c24xx/include/mach/entry-macro.S @@ -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 diff --git a/arch/arm/mach-s3c24xx/pm-h1940.S b/arch/arm/mach-s3c24xx/pm-h1940.S index c93bf2db9f4d..6183a688012b 100644 --- a/arch/arm/mach-s3c24xx/pm-h1940.S +++ b/arch/arm/mach-s3c24xx/pm-h1940.S @@ -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] diff --git a/arch/arm/mach-s3c24xx/sleep-s3c2410.S b/arch/arm/mach-s3c24xx/sleep-s3c2410.S index dd5b6388a5a5..65200ae72c90 100644 --- a/arch/arm/mach-s3c24xx/sleep-s3c2410.S +++ b/arch/arm/mach-s3c24xx/sleep-s3c2410.S @@ -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 diff --git a/arch/arm/mach-s3c24xx/sleep-s3c2412.S b/arch/arm/mach-s3c24xx/sleep-s3c2412.S index c82418ed714d..5adaceb7da13 100644 --- a/arch/arm/mach-s3c24xx/sleep-s3c2412.S +++ b/arch/arm/mach-s3c24xx/sleep-s3c2412.S @@ -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 diff --git a/arch/arm/plat-samsung/include/plat/debug-macro.S b/arch/arm/plat-samsung/include/plat/debug-macro.S index 207e275362a8..f3a9cff6d5d4 100644 --- a/arch/arm/plat-samsung/include/plat/debug-macro.S +++ b/arch/arm/plat-samsung/include/plat/debug-macro.S @@ -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 -- cgit v1.2.3 From fa5ce5f94c0f2bfa41ba68d2d2524298e1fc405e Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 14 Jan 2013 12:49:02 +0000 Subject: ARM: w90x900: fix legacy assembly syntax New 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. Signed-off-by: Arnd Bergmann Cc: Wan ZongShun --- arch/arm/mach-w90x900/include/mach/entry-macro.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-w90x900/include/mach/entry-macro.S b/arch/arm/mach-w90x900/include/mach/entry-macro.S index e286daca6827..0ff612ac95ba 100644 --- a/arch/arm/mach-w90x900/include/mach/entry-macro.S +++ b/arch/arm/mach-w90x900/include/mach/entry-macro.S @@ -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 -- cgit v1.2.3 From bb57d4e3220544feee1e4bc02c62dd4f78c444c8 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 24 Jan 2013 16:50:32 +0000 Subject: ARM: shmobile: fix defconfig warning on CONFIG_USB A 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 Signed-off-by: Arnd Bergmann Acked-by: Simon Horman Cc: linux-sh@vger.kernel.org --- arch/arm/configs/marzen_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig index 728a43c446f8..afb17d630d44 100644 --- a/arch/arm/configs/marzen_defconfig +++ b/arch/arm/configs/marzen_defconfig @@ -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 -- cgit v1.2.3 From 29408ed963cc9839c742ed61b8e8e69bff431eb0 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 25 Jan 2013 22:20:40 +0000 Subject: ARM: sa1100: don't warn about mach/ide.h This 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. Signed-off-by: Arnd Bergmann Cc: Russell King --- arch/arm/mach-sa1100/lart.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c index f69f78fc3ddd..bca7e60b24d3 100644 --- a/arch/arm/mach-sa1100/lart.c +++ b/arch/arm/mach-sa1100/lart.c @@ -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, -- cgit v1.2.3 From 060fd1be0c720166091470ffb7846512b82c1a87 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 14 Feb 2013 13:50:57 +0100 Subject: ARM: integrator/versatile: fix NOMMU warnings On 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 Signed-off-by: Arnd Bergmann Cc: Linus Walleij Cc: Russell King --- 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(-) diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 11e2a4145807..11b1d21f3c77 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c @@ -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), diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 7322838c0447..01a888d7b0b8 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c @@ -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), diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 5d5929450366..60c092cfdae3 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c @@ -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), -- cgit v1.2.3 From a02e0a831fc43ed580b8161a2ca5c29c3ae813d9 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 14 Feb 2013 13:43:29 +0100 Subject: ARM: integrator: fix build with INTEGRATOR_AP off The 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. Cc: Linus Walleij Cc: Russell King --- arch/arm/mach-integrator/common.h | 5 ----- arch/arm/mach-integrator/core.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm/mach-integrator/common.h b/arch/arm/mach-integrator/common.h index 79197d8b34aa..72516658be1e 100644 --- a/arch/arm/mach-integrator/common.h +++ b/arch/arm/mach-integrator/common.h @@ -1,10 +1,5 @@ #include -#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); diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index 39c060f75e47..81461d218717 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c @@ -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; -- cgit v1.2.3 From 1420b22b0beb98011d35ba414cdb861e518e13ed Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 14 Feb 2013 13:33:36 +0100 Subject: ARM: pick Versatile by default for !MMU The 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. Signed-off-by: Arnd Bergmann Cc: Russell King --- arch/arm/Kconfig | 3 ++- arch/arm/mach-versatile/Kconfig | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 91d4aeaa772b..b934d90a61e4 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -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" diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig index 63d8e9f81b99..1dba3688275f 100644 --- a/arch/arm/mach-versatile/Kconfig +++ b/arch/arm/mach-versatile/Kconfig @@ -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 -- cgit v1.2.3 From 81c724abb92c2c083b5558f1fdfeb8d9be1767b1 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 14 Feb 2013 13:14:53 +0100 Subject: ARM: mvebu: allow selecting mvebu without Armada XP Selecting 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. Signed-off-by: Arnd Bergmann Cc: Gregory Clement Cc: Ezequiel Garcia --- arch/arm/mach-mvebu/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index 99df4df680fd..da93bcbc74c1 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile @@ -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 -- cgit v1.2.3 From b2dc0c2b7a84864fdbad2e264ce9b5c7068a0a0f Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Wed, 13 Feb 2013 23:08:18 +0100 Subject: ARM: s3c: i2c: add platform_device forward declaration A 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] Signed-off-by: Arnd Bergmann Cc: linux-i2c@vger.kernel.org Cc: Wolfram Sang Cc: Ben Dooks Cc: Kukjin Kim --- include/linux/platform_data/i2c-s3c2410.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/platform_data/i2c-s3c2410.h b/include/linux/platform_data/i2c-s3c2410.h index 51d52e767a19..2a50048c1c44 100644 --- a/include/linux/platform_data/i2c-s3c2410.h +++ b/include/linux/platform_data/i2c-s3c2410.h @@ -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). -- cgit v1.2.3 From 8c0c774dd7b4aa0e0b69f483a70c7f41995139ef Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 27 Nov 2012 09:18:00 +0000 Subject: scripts/sortextable: silence script output 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 Acked-by: David Daney Cc: "H. Peter Anvin" --- scripts/sortextable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sortextable.h b/scripts/sortextable.h index e4fd45b7e456..f5eb43d42926 100644 --- a/scripts/sortextable.h +++ b/scripts/sortextable.h @@ -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 -- cgit v1.2.3