Message ID | 7619136.niuXthzi6R@wuerfel (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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. Perhaps you can use 0xdeadbeef instead of 0, and add #if DEBUG_UART_PHYS == 0xdeadbeed #warning Broken value of DEBUG_UART_PHYS. #endif somewhere? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Jan 29, 2016 at 12:07:21AM +0100, Arnd Bergmann wrote: > This doesn't sound too hard. I've picked the defaults out of the > git history in the patch below. The only tricky part was davinci, > which has two different addresses and requires a little rework > to avoid circular dependencies. I think there's a much better way to solve this. How about we have an architecture-defined way to provide all*config with a set of settings to be used with Kconfig to define these integer settings, rather than papering over the problem making up random addresses (like you're doing for the debug stuff.) Eg, a default architecture-provided setting for KCONFIG_ALLCONFIG that defines things such as the physical offset and the debug addresses to be used for all*config targets? Surely that's better than hacking around with the Kconfig files trying to frig something into working, which can potentially confuse people.
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2217ec9726c9..1d2b5e6cab14 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -273,15 +273,29 @@ config PHYS_OFFSET depends on !ARM_PATCH_PHYS_VIRT default DRAM_BASE if !MMU default 0x00000000 if ARCH_EBSA110 || \ + ARCH_DOVE || \ ARCH_FOOTBRIDGE || \ + (ARCH_GEMINI && GEMINI_MEM_SWAP) || \ ARCH_INTEGRATOR || \ + ARCH_IOP33X || \ ARCH_IOP13XX || \ + ARCH_IXP4XX || \ ARCH_KS8695 || \ - (ARCH_REALVIEW && !REALVIEW_HIGH_PHYS_OFFSET) - default 0x10000000 if ARCH_OMAP1 || ARCH_RPC + (ARCH_REALVIEW && !REALVIEW_HIGH_PHYS_OFFSET) || \ + ARCH_W90X900 + default 0x10000000 if (ARCH_GEMINI && !GEMINI_MEM_SWAP) || \ + ARCH_OMAP1 || \ + ARCH_RPC default 0x20000000 if ARCH_S5PV210 + default 0x30000000 if ARCH_S3C24XX default 0x70000000 if REALVIEW_HIGH_PHYS_OFFSET - default 0xc0000000 if ARCH_SA1100 + default 0x80000000 if (ARCH_DAVINCI_DMx && !ARCH_DAVINCI_DA8XX) || \ + ARCH_NETX || \ + ARCH_LPC32XX + default 0xa0000000 if ARCH_IOP32X || ARCH_PXA + default 0xc0000000 if (ARCH_DAVINCI_DA8XX && !ARCH_DAVINCI_DMx) || \ + ARCH_CLPS711X || \ + ARCH_SA1100 help Please provide the physical address corresponding to the location of main memory in your system. @@ -627,6 +641,7 @@ config ARCH_DAVINCI select ARCH_HAS_HOLES_MEMORYMODEL select ARCH_REQUIRE_GPIOLIB select CLKDEV_LOOKUP + select CPU_ARM926T select GENERIC_ALLOCATOR select GENERIC_CLOCKEVENTS select GENERIC_IRQ_CHIP diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 7a9f2b8c0a42..36c8f5324e43 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -9,7 +9,6 @@ config CP_INTC config ARCH_DAVINCI_DMx bool - select CPU_ARM926T menu "TI DaVinci Implementations" @@ -32,7 +31,7 @@ config ARCH_DAVINCI_DM646x config ARCH_DAVINCI_DA830 bool "DA830/OMAP-L137/AM17x based system" - depends on !ARCH_DAVINCI_DMx || AUTO_ZRELADDR + depends on !ARCH_DAVINCI_DMx || (AUTO_ZRELADDR && ARM_PATCH_PHYS_VIRT) select ARCH_DAVINCI_DA8XX # needed on silicon revs 1.0, 1.1: select CPU_DCACHE_WRITETHROUGH if !CPU_DCACHE_DISABLE @@ -40,13 +39,12 @@ config ARCH_DAVINCI_DA830 config ARCH_DAVINCI_DA850 bool "DA850/OMAP-L138/AM18x based system" - depends on !ARCH_DAVINCI_DMx || AUTO_ZRELADDR + depends on !ARCH_DAVINCI_DMx || (AUTO_ZRELADDR && ARM_PATCH_PHYS_VIRT) select ARCH_DAVINCI_DA8XX select CP_INTC config ARCH_DAVINCI_DA8XX bool - select CPU_ARM926T config ARCH_DAVINCI_DM365 bool "DaVinci 365 based system"