From: Arnd Bergmann <arnd@arndb.de> To: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>, Fengguang Wu <fengguang.wu@intel.com>, Linux-Arch <linux-arch@vger.kernel.org>, Linux MIPS Mailing List <linux-mips@linux-mips.org>, James Hogan <james.hogan@imgtec.com>, Paul Burton <paul.burton@imgtec.com>, linux-kbuild <linux-kbuild@vger.kernel.org>, Heinrich Schuchardt <xypron.glpk@gmx.de>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Ralf Baechle <ralf@linux-mips.org>, Florian Fainelli <f.fainelli@gmail.com>, Michal Marek <mmarek@suse.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org> Subject: Re: [linux-review:James-Hogan/kbuild-Remove-stale-asm-generic-wrappers/20160119-183642] d979f99e9cc14e2667e9b6e268db695977e4197a BUILD DONE Date: Fri, 29 Jan 2016 21:44:13 +0100 [thread overview] Message-ID: <19656457.qoKNGRmV4Q@wuerfel> (raw) In-Reply-To: <CAMuHMdX33SQe8n7SRda0TjQV05yP1zbuw129Jqjknt8=CY=LjA@mail.gmail.com> On Friday 29 January 2016 09:01:31 Geert Uytterhoeven wrote: > Hi Arnd, > > On Fri, Jan 29, 2016 at 12:07 AM, Arnd Bergmann <arnd@arndb.de> wrote: > > The other related issue is the DEBUG_UART_{VIRT,PHYS} setting, > > where there is no safe platform-specific default. I have two > > ideas for working around that, maybe one of them sounds ok to > > you: > > > > a) find a way to warn and/or disable DEBUG_LL when no address > > is set, rather than failing the build > > > > b) add 'default 0 if COMPILE_TEST' to make it harder to get this > > wrong by accident (hopefully nobody tries to run a COMPILE_TEST > > kernel). Also maybe add a #warning if DEBUG_UART_VIRT is > > Make sure to add it at the end of the list, so enabling COMPILE_TEST in a > working .config should give another working .config. Sure, I've just done a largish series of patches in 4.5 to fix that bug where we had it already. > Perhaps you can use 0xdeadbeef instead of 0, and add > > #if DEBUG_UART_PHYS == 0xdeadbeed > #warning Broken value of DEBUG_UART_PHYS. > #endif > > somewhere? I can do that, though I don't see much of an advantage, as zero is no more likely to be a real address than 0xdeadbeed. How about the version below? Arnd diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index c6b6175d0203..6cc09cf8618f 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1526,6 +1526,7 @@ config DEBUG_UART_PHYS default 0xfffb9800 if DEBUG_OMAP1UART3 || DEBUG_OMAP7XXUART3 default 0xfffe8600 if DEBUG_BCM63XX_UART default 0xfffff700 if ARCH_IOP33X + default 0xdeadbeef if DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || DEBUG_LL_UART_EFM32 depends on ARCH_EP93XX || \ DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_LL_UART_EFM32 || \ @@ -1628,6 +1629,7 @@ config DEBUG_UART_VIRT default 0xff003000 if DEBUG_U300_UART default 0xffd01000 if DEBUG_HIP01_UART default DEBUG_UART_PHYS if !MMU + default 0xdeadbeef if DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || DEBUG_LL_UART_EFM32 depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \ DEBUG_NETX_UART || \ diff --git a/arch/arm/include/debug/8250.S b/arch/arm/include/debug/8250.S index 7f7446f6f806..1191b1458586 100644 --- a/arch/arm/include/debug/8250.S +++ b/arch/arm/include/debug/8250.S @@ -9,6 +9,9 @@ */ #include <linux/serial_reg.h> +#if CONFIG_DEBUG_UART_PHYS == 0xdeadbeef || CONFIG_DEBUG_UART_VIRT < 0xe0000000 +#include "none.S" +#else .macro addruart, rp, rv, tmp ldr \rp, =CONFIG_DEBUG_UART_PHYS ldr \rv, =CONFIG_DEBUG_UART_VIRT @@ -55,3 +58,5 @@ beq 1001b #endif .endm + +#endif diff --git a/arch/arm/include/debug/efm32.S b/arch/arm/include/debug/efm32.S index 660fa1e4b77b..537021761e4a 100644 --- a/arch/arm/include/debug/efm32.S +++ b/arch/arm/include/debug/efm32.S @@ -6,6 +6,9 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#if CONFIG_DEBUG_UART_PHYS == 0xdeadbeef || CONFIG_DEBUG_UART_VIRT < 0xf0000000 +#include "none.S" +#else #define UARTn_CMD 0x000c #define UARTn_CMD_TXEN 0x0004 @@ -43,3 +46,5 @@ tst \rd, #UARTn_STATUS_TXC bne 1001b .endm + +#endif diff --git a/arch/arm/include/debug/none.S b/arch/arm/include/debug/none.S new file mode 100644 index 000000000000..75cd1bbee5c4 --- /dev/null +++ b/arch/arm/include/debug/none.S @@ -0,0 +1,16 @@ + +#warning DEBUG_LL not configured, disabling + + .macro addruart, rp, rv, tmp + ldr \rp, =0 + ldr \rv, =0 + .endm + + .macro senduart,rd,rx + .endm + + .macro busyuart,rd,rx + .endm + + .macro waituart,rd,rx + .endm diff --git a/arch/arm/include/debug/pl01x.S b/arch/arm/include/debug/pl01x.S index f7d8323cefcc..fbe0cad32be0 100644 --- a/arch/arm/include/debug/pl01x.S +++ b/arch/arm/include/debug/pl01x.S @@ -10,6 +10,9 @@ * published by the Free Software Foundation. * */ +#if CONFIG_DEBUG_UART_PHYS == 0xdeadbeef || CONFIG_DEBUG_UART_VIRT < 0xf0000000 +#include "none.S" +#else #include <linux/amba/serial.h> #ifdef CONFIG_DEBUG_ZTE_ZX @@ -43,3 +46,4 @@ tst \rd, #UART01x_FR_BUSY bne 1001b .endm +#endif
WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann) To: linux-arm-kernel@lists.infradead.org Subject: [linux-review:James-Hogan/kbuild-Remove-stale-asm-generic-wrappers/20160119-183642] d979f99e9cc14e2667e9b6e268db695977e4197a BUILD DONE Date: Fri, 29 Jan 2016 21:44:13 +0100 [thread overview] Message-ID: <19656457.qoKNGRmV4Q@wuerfel> (raw) In-Reply-To: <CAMuHMdX33SQe8n7SRda0TjQV05yP1zbuw129Jqjknt8=CY=LjA@mail.gmail.com> On Friday 29 January 2016 09:01:31 Geert Uytterhoeven wrote: > Hi Arnd, > > On Fri, Jan 29, 2016 at 12:07 AM, Arnd Bergmann <arnd@arndb.de> wrote: > > The other related issue is the DEBUG_UART_{VIRT,PHYS} setting, > > where there is no safe platform-specific default. I have two > > ideas for working around that, maybe one of them sounds ok to > > you: > > > > a) find a way to warn and/or disable DEBUG_LL when no address > > is set, rather than failing the build > > > > b) add 'default 0 if COMPILE_TEST' to make it harder to get this > > wrong by accident (hopefully nobody tries to run a COMPILE_TEST > > kernel). Also maybe add a #warning if DEBUG_UART_VIRT is > > Make sure to add it at the end of the list, so enabling COMPILE_TEST in a > working .config should give another working .config. Sure, I've just done a largish series of patches in 4.5 to fix that bug where we had it already. > Perhaps you can use 0xdeadbeef instead of 0, and add > > #if DEBUG_UART_PHYS == 0xdeadbeed > #warning Broken value of DEBUG_UART_PHYS. > #endif > > somewhere? I can do that, though I don't see much of an advantage, as zero is no more likely to be a real address than 0xdeadbeed. How about the version below? Arnd diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index c6b6175d0203..6cc09cf8618f 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1526,6 +1526,7 @@ config DEBUG_UART_PHYS default 0xfffb9800 if DEBUG_OMAP1UART3 || DEBUG_OMAP7XXUART3 default 0xfffe8600 if DEBUG_BCM63XX_UART default 0xfffff700 if ARCH_IOP33X + default 0xdeadbeef if DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || DEBUG_LL_UART_EFM32 depends on ARCH_EP93XX || \ DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_LL_UART_EFM32 || \ @@ -1628,6 +1629,7 @@ config DEBUG_UART_VIRT default 0xff003000 if DEBUG_U300_UART default 0xffd01000 if DEBUG_HIP01_UART default DEBUG_UART_PHYS if !MMU + default 0xdeadbeef if DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || DEBUG_LL_UART_EFM32 depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \ DEBUG_NETX_UART || \ diff --git a/arch/arm/include/debug/8250.S b/arch/arm/include/debug/8250.S index 7f7446f6f806..1191b1458586 100644 --- a/arch/arm/include/debug/8250.S +++ b/arch/arm/include/debug/8250.S @@ -9,6 +9,9 @@ */ #include <linux/serial_reg.h> +#if CONFIG_DEBUG_UART_PHYS == 0xdeadbeef || CONFIG_DEBUG_UART_VIRT < 0xe0000000 +#include "none.S" +#else .macro addruart, rp, rv, tmp ldr \rp, =CONFIG_DEBUG_UART_PHYS ldr \rv, =CONFIG_DEBUG_UART_VIRT @@ -55,3 +58,5 @@ beq 1001b #endif .endm + +#endif diff --git a/arch/arm/include/debug/efm32.S b/arch/arm/include/debug/efm32.S index 660fa1e4b77b..537021761e4a 100644 --- a/arch/arm/include/debug/efm32.S +++ b/arch/arm/include/debug/efm32.S @@ -6,6 +6,9 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#if CONFIG_DEBUG_UART_PHYS == 0xdeadbeef || CONFIG_DEBUG_UART_VIRT < 0xf0000000 +#include "none.S" +#else #define UARTn_CMD 0x000c #define UARTn_CMD_TXEN 0x0004 @@ -43,3 +46,5 @@ tst \rd, #UARTn_STATUS_TXC bne 1001b .endm + +#endif diff --git a/arch/arm/include/debug/none.S b/arch/arm/include/debug/none.S new file mode 100644 index 000000000000..75cd1bbee5c4 --- /dev/null +++ b/arch/arm/include/debug/none.S @@ -0,0 +1,16 @@ + +#warning DEBUG_LL not configured, disabling + + .macro addruart, rp, rv, tmp + ldr \rp, =0 + ldr \rv, =0 + .endm + + .macro senduart,rd,rx + .endm + + .macro busyuart,rd,rx + .endm + + .macro waituart,rd,rx + .endm diff --git a/arch/arm/include/debug/pl01x.S b/arch/arm/include/debug/pl01x.S index f7d8323cefcc..fbe0cad32be0 100644 --- a/arch/arm/include/debug/pl01x.S +++ b/arch/arm/include/debug/pl01x.S @@ -10,6 +10,9 @@ * published by the Free Software Foundation. * */ +#if CONFIG_DEBUG_UART_PHYS == 0xdeadbeef || CONFIG_DEBUG_UART_VIRT < 0xf0000000 +#include "none.S" +#else #include <linux/amba/serial.h> #ifdef CONFIG_DEBUG_ZTE_ZX @@ -43,3 +46,4 @@ tst \rd, #UART01x_FR_BUSY bne 1001b .endm +#endif
next prev parent reply other threads:[~2016-01-29 20:45 UTC|newest] Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-01-19 11:27 [linux-review:James-Hogan/kbuild-Remove-stale-asm-generic-wrappers/20160119-183642] d979f99e9cc14e2667e9b6e268db695977e4197a BUILD DONE kbuild test robot 2016-01-19 11:27 ` kbuild test robot 2016-01-19 11:27 ` kbuild test robot 2016-01-19 14:26 ` Arnd Bergmann 2016-01-26 5:30 ` Fengguang Wu 2016-01-26 5:35 ` Fengguang Wu 2016-01-26 16:27 ` Arnd Bergmann 2016-01-27 8:37 ` Fengguang Wu 2016-01-27 9:11 ` Arnd Bergmann 2016-01-27 9:30 ` Fengguang Wu 2016-01-27 9:44 ` Arnd Bergmann 2016-01-27 9:44 ` Arnd Bergmann 2016-01-28 3:14 ` Fengguang Wu 2016-01-28 3:14 ` Fengguang Wu 2016-01-28 12:07 ` Arnd Bergmann 2016-01-28 12:07 ` Arnd Bergmann 2016-01-28 17:42 ` Russell King - ARM Linux 2016-01-28 17:42 ` Russell King - ARM Linux 2016-01-28 23:07 ` Arnd Bergmann 2016-01-28 23:07 ` Arnd Bergmann 2016-01-29 8:01 ` Geert Uytterhoeven 2016-01-29 8:01 ` Geert Uytterhoeven 2016-01-29 8:01 ` Geert Uytterhoeven 2016-01-29 20:44 ` Arnd Bergmann [this message] 2016-01-29 20:44 ` Arnd Bergmann 2016-01-29 20:44 ` Arnd Bergmann 2016-01-29 21:24 ` Geert Uytterhoeven 2016-01-29 21:24 ` Geert Uytterhoeven 2016-01-29 21:24 ` Geert Uytterhoeven 2016-01-29 21:24 ` Geert Uytterhoeven 2016-01-29 21:54 ` Arnd Bergmann 2016-01-29 21:54 ` Arnd Bergmann 2016-01-29 21:54 ` Arnd Bergmann 2016-01-29 23:15 ` Russell King - ARM Linux 2016-01-29 23:15 ` Russell King - ARM Linux 2016-01-29 23:15 ` Russell King - ARM Linux 2016-01-29 21:46 ` Russell King - ARM Linux 2016-01-29 21:46 ` Russell King - ARM Linux 2016-01-28 18:00 ` Geert Uytterhoeven 2016-01-28 18:00 ` Geert Uytterhoeven 2016-01-28 18:00 ` Geert Uytterhoeven
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=19656457.qoKNGRmV4Q@wuerfel \ --to=arnd@arndb.de \ --cc=f.fainelli@gmail.com \ --cc=fengguang.wu@intel.com \ --cc=geert@linux-m68k.org \ --cc=james.hogan@imgtec.com \ --cc=linux-arch@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kbuild@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mips@linux-mips.org \ --cc=linux@arm.linux.org.uk \ --cc=mmarek@suse.com \ --cc=paul.burton@imgtec.com \ --cc=ralf@linux-mips.org \ --cc=xypron.glpk@gmx.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.