* [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement @ 2012-09-25 22:46 ` Stephen Warren 0 siblings, 0 replies; 36+ messages in thread From: Stephen Warren @ 2012-09-25 22:46 UTC (permalink / raw) To: Arnd Bergmann, Olof Johansson, Russell King, Rob Herring Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Tegra's uncompress and debug-macro.S communicate to each-other. Hence, we can't be left without uncompress.h in a multi-platform enabled kernel, or we'll lose features. This series allows uncompress.h to be used in a multi-platform kernel, restores the mvebu uncompress.h, and finally moves the Tegra debug macros into the common location. The series as mainly an RFC due to the outstanding question of where to put Tegra's <mach/iomap.h> in the final patch. Stephen Warren (3): ARM: move ICEDCC uncompress.h to common location ARM: mvebu: restore uncompress.h ARM: tegra: move debug macros to include/debug arch/arm/Kconfig.debug | 20 ++++++ arch/arm/boot/compressed/misc.c | 64 +------------------- arch/arm/include/debug/icedcc-uncompress.h | 61 +++++++++++++++++++ arch/arm/include/debug/mvebu-uncompress.h | 43 +++++++++++++ arch/arm/include/debug/none-uncompress.h | 3 + .../debug/tegra-uncompress.h} | 6 +- .../mach/debug-macro.S => include/debug/tegra.S} | 6 +- 7 files changed, 132 insertions(+), 71 deletions(-) create mode 100644 arch/arm/include/debug/icedcc-uncompress.h create mode 100644 arch/arm/include/debug/mvebu-uncompress.h create mode 100644 arch/arm/include/debug/none-uncompress.h rename arch/arm/{mach-tegra/include/mach/uncompress.h => include/debug/tegra-uncompress.h} (98%) rename arch/arm/{mach-tegra/include/mach/debug-macro.S => include/debug/tegra.S} (96%) ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement @ 2012-09-25 22:46 ` Stephen Warren 0 siblings, 0 replies; 36+ messages in thread From: Stephen Warren @ 2012-09-25 22:46 UTC (permalink / raw) To: linux-arm-kernel From: Stephen Warren <swarren@nvidia.com> Tegra's uncompress and debug-macro.S communicate to each-other. Hence, we can't be left without uncompress.h in a multi-platform enabled kernel, or we'll lose features. This series allows uncompress.h to be used in a multi-platform kernel, restores the mvebu uncompress.h, and finally moves the Tegra debug macros into the common location. The series as mainly an RFC due to the outstanding question of where to put Tegra's <mach/iomap.h> in the final patch. Stephen Warren (3): ARM: move ICEDCC uncompress.h to common location ARM: mvebu: restore uncompress.h ARM: tegra: move debug macros to include/debug arch/arm/Kconfig.debug | 20 ++++++ arch/arm/boot/compressed/misc.c | 64 +------------------- arch/arm/include/debug/icedcc-uncompress.h | 61 +++++++++++++++++++ arch/arm/include/debug/mvebu-uncompress.h | 43 +++++++++++++ arch/arm/include/debug/none-uncompress.h | 3 + .../debug/tegra-uncompress.h} | 6 +- .../mach/debug-macro.S => include/debug/tegra.S} | 6 +- 7 files changed, 132 insertions(+), 71 deletions(-) create mode 100644 arch/arm/include/debug/icedcc-uncompress.h create mode 100644 arch/arm/include/debug/mvebu-uncompress.h create mode 100644 arch/arm/include/debug/none-uncompress.h rename arch/arm/{mach-tegra/include/mach/uncompress.h => include/debug/tegra-uncompress.h} (98%) rename arch/arm/{mach-tegra/include/mach/debug-macro.S => include/debug/tegra.S} (96%) ^ permalink raw reply [flat|nested] 36+ messages in thread
[parent not found: <1348613212-21897-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* [RFC PATCH 1/3] ARM: move ICEDCC uncompress.h to common location 2012-09-25 22:46 ` Stephen Warren @ 2012-09-25 22:46 ` Stephen Warren -1 siblings, 0 replies; 36+ messages in thread From: Stephen Warren @ 2012-09-25 22:46 UTC (permalink / raw) To: Arnd Bergmann, Olof Johansson Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren, Rob Herring, Russell King From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Create a common location for uncompress.h, and select the included debug macro file using config option. This does the same for uncompress.h as a recent patch for debug-macro.S, which was based on a suggestion by Russell King and implemented by Rob Herring. Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org> Cc: Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> --- arch/arm/Kconfig.debug | 10 ++++ arch/arm/boot/compressed/misc.c | 64 +--------------------------- arch/arm/include/debug/icedcc-uncompress.h | 61 ++++++++++++++++++++++++++ arch/arm/include/debug/none-uncompress.h | 3 + 4 files changed, 75 insertions(+), 63 deletions(-) create mode 100644 arch/arm/include/debug/icedcc-uncompress.h create mode 100644 arch/arm/include/debug/none-uncompress.h diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index b0f3857..0daec3d 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -420,6 +420,16 @@ config DEBUG_LL_INCLUDE DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 default "mach/debug-macro.S" +config UNCOMPRESS_INCLUDE + string + default "debug/icedcc-uncompress.h" if DEBUG_ICEDCC + default "debug/none-uncompress.h" if ARCH_MULTIPLATFORM || \ + DEBUG_HIGHBANK_UART || DEBUG_MVEBU_UART || \ + DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ + DEBUG_VEXPRESS_UART0_DETECT || DEBUG_VEXPRESS_UART0_CA9 || \ + DEBUG_VEXPRESS_UART0_RS1 + default "mach/uncompress.h" + config EARLY_PRINTK bool "Early printk" depends on DEBUG_LL diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index df89983..afbdb3f 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c @@ -25,69 +25,7 @@ unsigned int __machine_arch_type; static void putstr(const char *ptr); extern void error(char *x); -#ifdef CONFIG_ARCH_MULTIPLATFORM -static inline void putc(int c) {} -static inline void flush(void) {} -static inline void arch_decomp_setup(void) {} -#else -#include <mach/uncompress.h> -#endif - -#ifdef CONFIG_DEBUG_ICEDCC - -#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) - -static void icedcc_putc(int ch) -{ - int status, i = 0x4000000; - - do { - if (--i < 0) - return; - - asm volatile ("mrc p14, 0, %0, c0, c1, 0" : "=r" (status)); - } while (status & (1 << 29)); - - asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch)); -} - - -#elif defined(CONFIG_CPU_XSCALE) - -static void icedcc_putc(int ch) -{ - int status, i = 0x4000000; - - do { - if (--i < 0) - return; - - asm volatile ("mrc p14, 0, %0, c14, c0, 0" : "=r" (status)); - } while (status & (1 << 28)); - - asm("mcr p14, 0, %0, c8, c0, 0" : : "r" (ch)); -} - -#else - -static void icedcc_putc(int ch) -{ - int status, i = 0x4000000; - - do { - if (--i < 0) - return; - - asm volatile ("mrc p14, 0, %0, c0, c0, 0" : "=r" (status)); - } while (status & 2); - - asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch)); -} - -#endif - -#define putc(ch) icedcc_putc(ch) -#endif +#include CONFIG_UNCOMPRESS_INCLUDE static void putstr(const char *ptr) { diff --git a/arch/arm/include/debug/icedcc-uncompress.h b/arch/arm/include/debug/icedcc-uncompress.h new file mode 100644 index 0000000..b505241 --- /dev/null +++ b/arch/arm/include/debug/icedcc-uncompress.h @@ -0,0 +1,61 @@ +/* + * Decompressor debug output routines for ICEDCC + * + * Extracted from misc.c, which is by: + * Modified for ARM Linux by Russell King + * Nicolas Pitre <nico-KS63fTaiJB5Wk0Htik3J/w@public.gmane.org> + */ + +#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) + +static void putc(int ch) +{ + int status, i = 0x4000000; + + do { + if (--i < 0) + return; + + asm volatile ("mrc p14, 0, %0, c0, c1, 0" : "=r" (status)); + } while (status & (1 << 29)); + + asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch)); +} + + +#elif defined(CONFIG_CPU_XSCALE) + +static void putc(int ch) +{ + int status, i = 0x4000000; + + do { + if (--i < 0) + return; + + asm volatile ("mrc p14, 0, %0, c14, c0, 0" : "=r" (status)); + } while (status & (1 << 28)); + + asm("mcr p14, 0, %0, c8, c0, 0" : : "r" (ch)); +} + +#else + +static void putc(int ch) +{ + int status, i = 0x4000000; + + do { + if (--i < 0) + return; + + asm volatile ("mrc p14, 0, %0, c0, c0, 0" : "=r" (status)); + } while (status & 2); + + asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch)); +} + +#endif + +static inline void flush(void) {} +static inline void arch_decomp_setup(void) {} diff --git a/arch/arm/include/debug/none-uncompress.h b/arch/arm/include/debug/none-uncompress.h new file mode 100644 index 0000000..e19955d --- /dev/null +++ b/arch/arm/include/debug/none-uncompress.h @@ -0,0 +1,3 @@ +static inline void putc(int c) {} +static inline void flush(void) {} +static inline void arch_decomp_setup(void) {} -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 36+ messages in thread
* [RFC PATCH 1/3] ARM: move ICEDCC uncompress.h to common location @ 2012-09-25 22:46 ` Stephen Warren 0 siblings, 0 replies; 36+ messages in thread From: Stephen Warren @ 2012-09-25 22:46 UTC (permalink / raw) To: linux-arm-kernel From: Stephen Warren <swarren@nvidia.com> Create a common location for uncompress.h, and select the included debug macro file using config option. This does the same for uncompress.h as a recent patch for debug-macro.S, which was based on a suggestion by Russell King and implemented by Rob Herring. Cc: Rob Herring <rob.herring@calxeda.com> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Stephen Warren <swarren@nvidia.com> --- arch/arm/Kconfig.debug | 10 ++++ arch/arm/boot/compressed/misc.c | 64 +--------------------------- arch/arm/include/debug/icedcc-uncompress.h | 61 ++++++++++++++++++++++++++ arch/arm/include/debug/none-uncompress.h | 3 + 4 files changed, 75 insertions(+), 63 deletions(-) create mode 100644 arch/arm/include/debug/icedcc-uncompress.h create mode 100644 arch/arm/include/debug/none-uncompress.h diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index b0f3857..0daec3d 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -420,6 +420,16 @@ config DEBUG_LL_INCLUDE DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 default "mach/debug-macro.S" +config UNCOMPRESS_INCLUDE + string + default "debug/icedcc-uncompress.h" if DEBUG_ICEDCC + default "debug/none-uncompress.h" if ARCH_MULTIPLATFORM || \ + DEBUG_HIGHBANK_UART || DEBUG_MVEBU_UART || \ + DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ + DEBUG_VEXPRESS_UART0_DETECT || DEBUG_VEXPRESS_UART0_CA9 || \ + DEBUG_VEXPRESS_UART0_RS1 + default "mach/uncompress.h" + config EARLY_PRINTK bool "Early printk" depends on DEBUG_LL diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index df89983..afbdb3f 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c @@ -25,69 +25,7 @@ unsigned int __machine_arch_type; static void putstr(const char *ptr); extern void error(char *x); -#ifdef CONFIG_ARCH_MULTIPLATFORM -static inline void putc(int c) {} -static inline void flush(void) {} -static inline void arch_decomp_setup(void) {} -#else -#include <mach/uncompress.h> -#endif - -#ifdef CONFIG_DEBUG_ICEDCC - -#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) - -static void icedcc_putc(int ch) -{ - int status, i = 0x4000000; - - do { - if (--i < 0) - return; - - asm volatile ("mrc p14, 0, %0, c0, c1, 0" : "=r" (status)); - } while (status & (1 << 29)); - - asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch)); -} - - -#elif defined(CONFIG_CPU_XSCALE) - -static void icedcc_putc(int ch) -{ - int status, i = 0x4000000; - - do { - if (--i < 0) - return; - - asm volatile ("mrc p14, 0, %0, c14, c0, 0" : "=r" (status)); - } while (status & (1 << 28)); - - asm("mcr p14, 0, %0, c8, c0, 0" : : "r" (ch)); -} - -#else - -static void icedcc_putc(int ch) -{ - int status, i = 0x4000000; - - do { - if (--i < 0) - return; - - asm volatile ("mrc p14, 0, %0, c0, c0, 0" : "=r" (status)); - } while (status & 2); - - asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch)); -} - -#endif - -#define putc(ch) icedcc_putc(ch) -#endif +#include CONFIG_UNCOMPRESS_INCLUDE static void putstr(const char *ptr) { diff --git a/arch/arm/include/debug/icedcc-uncompress.h b/arch/arm/include/debug/icedcc-uncompress.h new file mode 100644 index 0000000..b505241 --- /dev/null +++ b/arch/arm/include/debug/icedcc-uncompress.h @@ -0,0 +1,61 @@ +/* + * Decompressor debug output routines for ICEDCC + * + * Extracted from misc.c, which is by: + * Modified for ARM Linux by Russell King + * Nicolas Pitre <nico@visuaide.com> + */ + +#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) + +static void putc(int ch) +{ + int status, i = 0x4000000; + + do { + if (--i < 0) + return; + + asm volatile ("mrc p14, 0, %0, c0, c1, 0" : "=r" (status)); + } while (status & (1 << 29)); + + asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch)); +} + + +#elif defined(CONFIG_CPU_XSCALE) + +static void putc(int ch) +{ + int status, i = 0x4000000; + + do { + if (--i < 0) + return; + + asm volatile ("mrc p14, 0, %0, c14, c0, 0" : "=r" (status)); + } while (status & (1 << 28)); + + asm("mcr p14, 0, %0, c8, c0, 0" : : "r" (ch)); +} + +#else + +static void putc(int ch) +{ + int status, i = 0x4000000; + + do { + if (--i < 0) + return; + + asm volatile ("mrc p14, 0, %0, c0, c0, 0" : "=r" (status)); + } while (status & 2); + + asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch)); +} + +#endif + +static inline void flush(void) {} +static inline void arch_decomp_setup(void) {} diff --git a/arch/arm/include/debug/none-uncompress.h b/arch/arm/include/debug/none-uncompress.h new file mode 100644 index 0000000..e19955d --- /dev/null +++ b/arch/arm/include/debug/none-uncompress.h @@ -0,0 +1,3 @@ +static inline void putc(int c) {} +static inline void flush(void) {} +static inline void arch_decomp_setup(void) {} -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 36+ messages in thread
[parent not found: <1348613212-21897-2-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* Re: [RFC PATCH 1/3] ARM: move ICEDCC uncompress.h to common location 2012-09-25 22:46 ` Stephen Warren @ 2012-09-26 21:56 ` Domenico Andreoli -1 siblings, 0 replies; 36+ messages in thread From: Domenico Andreoli @ 2012-09-26 21:56 UTC (permalink / raw) To: Stephen Warren Cc: Arnd Bergmann, Olof Johansson, Russell King, Rob Herring, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On Tue, Sep 25, 2012 at 04:46:50PM -0600, Stephen Warren wrote: > From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > > Create a common location for uncompress.h, and select the included debug > macro file using config option. > > This does the same for uncompress.h as a recent patch for debug-macro.S, > which was based on a suggestion by Russell King and implemented by Rob > Herring. > > Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org> > Cc: Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org> > Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > --- > arch/arm/Kconfig.debug | 10 ++++ > arch/arm/boot/compressed/misc.c | 64 +--------------------------- > arch/arm/include/debug/icedcc-uncompress.h | 61 ++++++++++++++++++++++++++ > arch/arm/include/debug/none-uncompress.h | 3 + > 4 files changed, 75 insertions(+), 63 deletions(-) > create mode 100644 arch/arm/include/debug/icedcc-uncompress.h > create mode 100644 arch/arm/include/debug/none-uncompress.h > > diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug > index b0f3857..0daec3d 100644 > --- a/arch/arm/Kconfig.debug > +++ b/arch/arm/Kconfig.debug > @@ -420,6 +420,16 @@ config DEBUG_LL_INCLUDE > DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 > default "mach/debug-macro.S" > > +config UNCOMPRESS_INCLUDE > + string > + default "debug/icedcc-uncompress.h" if DEBUG_ICEDCC > + default "debug/none-uncompress.h" if ARCH_MULTIPLATFORM || \ > + DEBUG_HIGHBANK_UART || DEBUG_MVEBU_UART || \ > + DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ > + DEBUG_VEXPRESS_UART0_DETECT || DEBUG_VEXPRESS_UART0_CA9 || \ > + DEBUG_VEXPRESS_UART0_RS1 I would ask to add DEBUG_LL_UART_NONE to the or-ed list, which fixes the build of platforms without mach/uncompress.h and mach/debug-macro.S in case NONE is selected, but I'm not sure. If I got the point of Russel right, uncompress.h is not a debug trace and maybe should not depend on any DEBUG_LL* option? Regards, Domenico ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 1/3] ARM: move ICEDCC uncompress.h to common location @ 2012-09-26 21:56 ` Domenico Andreoli 0 siblings, 0 replies; 36+ messages in thread From: Domenico Andreoli @ 2012-09-26 21:56 UTC (permalink / raw) To: linux-arm-kernel On Tue, Sep 25, 2012 at 04:46:50PM -0600, Stephen Warren wrote: > From: Stephen Warren <swarren@nvidia.com> > > Create a common location for uncompress.h, and select the included debug > macro file using config option. > > This does the same for uncompress.h as a recent patch for debug-macro.S, > which was based on a suggestion by Russell King and implemented by Rob > Herring. > > Cc: Rob Herring <rob.herring@calxeda.com> > Cc: Russell King <linux@arm.linux.org.uk> > Signed-off-by: Stephen Warren <swarren@nvidia.com> > --- > arch/arm/Kconfig.debug | 10 ++++ > arch/arm/boot/compressed/misc.c | 64 +--------------------------- > arch/arm/include/debug/icedcc-uncompress.h | 61 ++++++++++++++++++++++++++ > arch/arm/include/debug/none-uncompress.h | 3 + > 4 files changed, 75 insertions(+), 63 deletions(-) > create mode 100644 arch/arm/include/debug/icedcc-uncompress.h > create mode 100644 arch/arm/include/debug/none-uncompress.h > > diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug > index b0f3857..0daec3d 100644 > --- a/arch/arm/Kconfig.debug > +++ b/arch/arm/Kconfig.debug > @@ -420,6 +420,16 @@ config DEBUG_LL_INCLUDE > DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 > default "mach/debug-macro.S" > > +config UNCOMPRESS_INCLUDE > + string > + default "debug/icedcc-uncompress.h" if DEBUG_ICEDCC > + default "debug/none-uncompress.h" if ARCH_MULTIPLATFORM || \ > + DEBUG_HIGHBANK_UART || DEBUG_MVEBU_UART || \ > + DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ > + DEBUG_VEXPRESS_UART0_DETECT || DEBUG_VEXPRESS_UART0_CA9 || \ > + DEBUG_VEXPRESS_UART0_RS1 I would ask to add DEBUG_LL_UART_NONE to the or-ed list, which fixes the build of platforms without mach/uncompress.h and mach/debug-macro.S in case NONE is selected, but I'm not sure. If I got the point of Russel right, uncompress.h is not a debug trace and maybe should not depend on any DEBUG_LL* option? Regards, Domenico ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [RFC PATCH 1/3] ARM: move ICEDCC uncompress.h to common location 2012-09-26 21:56 ` Domenico Andreoli @ 2012-09-27 5:19 ` Stephen Warren -1 siblings, 0 replies; 36+ messages in thread From: Stephen Warren @ 2012-09-27 5:19 UTC (permalink / raw) To: Arnd Bergmann, Olof Johansson, Russell King, Rob Herring, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On 09/26/2012 03:56 PM, Domenico Andreoli wrote: > On Tue, Sep 25, 2012 at 04:46:50PM -0600, Stephen Warren wrote: >> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> >> >> Create a common location for uncompress.h, and select the included debug >> macro file using config option. >> >> This does the same for uncompress.h as a recent patch for debug-macro.S, >> which was based on a suggestion by Russell King and implemented by Rob >> Herring. >> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug >> +config UNCOMPRESS_INCLUDE >> + string >> + default "debug/icedcc-uncompress.h" if DEBUG_ICEDCC >> + default "debug/none-uncompress.h" if ARCH_MULTIPLATFORM || \ >> + DEBUG_HIGHBANK_UART || DEBUG_MVEBU_UART || \ >> + DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ >> + DEBUG_VEXPRESS_UART0_DETECT || DEBUG_VEXPRESS_UART0_CA9 || \ >> + DEBUG_VEXPRESS_UART0_RS1 > > I would ask to add DEBUG_LL_UART_NONE to the or-ed list, which fixes the > build of platforms without mach/uncompress.h and mach/debug-macro.S in > case NONE is selected, but I'm not sure. Yes, I just noticed that it (UART_NONE) depends on !MULTIPLATFORM, and with this patch it probably shouldn't any more; it should be the default uncompress type for MULTIPLATFORM. > If I got the point of Russel right, uncompress.h is not a debug trace and > maybe should not depend on any DEBUG_LL* option? The only way a multi-platform zImage can work (at the moment anyway) is to have no serial/debug/... output from the uncompressor, nor earlyprintk. Once the DT is parsed and the real platform-specific console driver is registered, console output can commence. If the kernel experiences problems before that point, you might want to turn on earlyprintk or even output from the uncompressor. Once you've done that, you've tied the kernel image to a single platform. This is likely only something you'd do when debugging a problem, otherwise it would defeat the point of single zImage. Hence, classifying this as a debug option seems reasonable. ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 1/3] ARM: move ICEDCC uncompress.h to common location @ 2012-09-27 5:19 ` Stephen Warren 0 siblings, 0 replies; 36+ messages in thread From: Stephen Warren @ 2012-09-27 5:19 UTC (permalink / raw) To: linux-arm-kernel On 09/26/2012 03:56 PM, Domenico Andreoli wrote: > On Tue, Sep 25, 2012 at 04:46:50PM -0600, Stephen Warren wrote: >> From: Stephen Warren <swarren@nvidia.com> >> >> Create a common location for uncompress.h, and select the included debug >> macro file using config option. >> >> This does the same for uncompress.h as a recent patch for debug-macro.S, >> which was based on a suggestion by Russell King and implemented by Rob >> Herring. >> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug >> +config UNCOMPRESS_INCLUDE >> + string >> + default "debug/icedcc-uncompress.h" if DEBUG_ICEDCC >> + default "debug/none-uncompress.h" if ARCH_MULTIPLATFORM || \ >> + DEBUG_HIGHBANK_UART || DEBUG_MVEBU_UART || \ >> + DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ >> + DEBUG_VEXPRESS_UART0_DETECT || DEBUG_VEXPRESS_UART0_CA9 || \ >> + DEBUG_VEXPRESS_UART0_RS1 > > I would ask to add DEBUG_LL_UART_NONE to the or-ed list, which fixes the > build of platforms without mach/uncompress.h and mach/debug-macro.S in > case NONE is selected, but I'm not sure. Yes, I just noticed that it (UART_NONE) depends on !MULTIPLATFORM, and with this patch it probably shouldn't any more; it should be the default uncompress type for MULTIPLATFORM. > If I got the point of Russel right, uncompress.h is not a debug trace and > maybe should not depend on any DEBUG_LL* option? The only way a multi-platform zImage can work (at the moment anyway) is to have no serial/debug/... output from the uncompressor, nor earlyprintk. Once the DT is parsed and the real platform-specific console driver is registered, console output can commence. If the kernel experiences problems before that point, you might want to turn on earlyprintk or even output from the uncompressor. Once you've done that, you've tied the kernel image to a single platform. This is likely only something you'd do when debugging a problem, otherwise it would defeat the point of single zImage. Hence, classifying this as a debug option seems reasonable. ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 2/3] ARM: mvebu: restore uncompress.h 2012-09-25 22:46 ` Stephen Warren @ 2012-09-25 22:46 ` Stephen Warren -1 siblings, 0 replies; 36+ messages in thread From: Stephen Warren @ 2012-09-25 22:46 UTC (permalink / raw) To: Arnd Bergmann, Olof Johansson, Russell King, Rob Herring Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren, Gregory CLEMENT, Thomas Petazzoni, Lior Amsalem, Andrew Lunn, Yehuda Yitschak From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Now that we have a way to provide uncompress.h in a multi-platform zImage, re-instate mvebu's uncompress.h. This was originally removed as part of commit 387798b "ARM: initial multiplatform support". Note that actually enabling this via DEBUG_LL still entails the restrictions outlined for that option. Cc: Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> Cc: Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> Cc: Lior Amsalem <alior-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org> Cc: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org> Cc: Yehuda Yitschak <yehuday-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> --- arch/arm/Kconfig.debug | 3 +- arch/arm/include/debug/mvebu-uncompress.h | 43 +++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletions(-) create mode 100644 arch/arm/include/debug/mvebu-uncompress.h diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 0daec3d..af34a43 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -423,8 +423,9 @@ config DEBUG_LL_INCLUDE config UNCOMPRESS_INCLUDE string default "debug/icedcc-uncompress.h" if DEBUG_ICEDCC + default "debug/mvebu-uncompress.h" if DEBUG_MVEBU_UART default "debug/none-uncompress.h" if ARCH_MULTIPLATFORM || \ - DEBUG_HIGHBANK_UART || DEBUG_MVEBU_UART || \ + DEBUG_HIGHBANK_UART || \ DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ DEBUG_VEXPRESS_UART0_DETECT || DEBUG_VEXPRESS_UART0_CA9 || \ DEBUG_VEXPRESS_UART0_RS1 diff --git a/arch/arm/include/debug/mvebu-uncompress.h b/arch/arm/include/debug/mvebu-uncompress.h new file mode 100644 index 0000000..df3bd6b --- /dev/null +++ b/arch/arm/include/debug/mvebu-uncompress.h @@ -0,0 +1,43 @@ +/* + * Marvell Armada SoC kernel uncompression UART routines + * + * Copyright (C) 2012 Marvell + * + * Lior Amsalem <alior-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org> + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000 + +#define UART_THR ((volatile unsigned char *)(ARMADA_370_XP_REGS_PHYS_BASE\ + + 0x12000)) +#define UART_LSR ((volatile unsigned char *)(ARMADA_370_XP_REGS_PHYS_BASE\ + + 0x12014)) + +#define LSR_THRE 0x20 + +static void putc(const char c) +{ + int i; + + for (i = 0; i < 0x1000; i++) { + /* Transmit fifo not full? */ + if (*UART_LSR & LSR_THRE) + break; + } + + *UART_THR = c; +} + +static void flush(void) +{ +} + +/* + * nothing to do + */ +#define arch_decomp_setup() +#define arch_decomp_wdog() -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 36+ messages in thread
* [RFC PATCH 2/3] ARM: mvebu: restore uncompress.h @ 2012-09-25 22:46 ` Stephen Warren 0 siblings, 0 replies; 36+ messages in thread From: Stephen Warren @ 2012-09-25 22:46 UTC (permalink / raw) To: linux-arm-kernel From: Stephen Warren <swarren@nvidia.com> Now that we have a way to provide uncompress.h in a multi-platform zImage, re-instate mvebu's uncompress.h. This was originally removed as part of commit 387798b "ARM: initial multiplatform support". Note that actually enabling this via DEBUG_LL still entails the restrictions outlined for that option. Cc: Gregory CLEMENT <gregory.clement@free-electrons.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Lior Amsalem <alior@marvell.com> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Yehuda Yitschak <yehuday@marvell.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> --- arch/arm/Kconfig.debug | 3 +- arch/arm/include/debug/mvebu-uncompress.h | 43 +++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletions(-) create mode 100644 arch/arm/include/debug/mvebu-uncompress.h diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 0daec3d..af34a43 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -423,8 +423,9 @@ config DEBUG_LL_INCLUDE config UNCOMPRESS_INCLUDE string default "debug/icedcc-uncompress.h" if DEBUG_ICEDCC + default "debug/mvebu-uncompress.h" if DEBUG_MVEBU_UART default "debug/none-uncompress.h" if ARCH_MULTIPLATFORM || \ - DEBUG_HIGHBANK_UART || DEBUG_MVEBU_UART || \ + DEBUG_HIGHBANK_UART || \ DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ DEBUG_VEXPRESS_UART0_DETECT || DEBUG_VEXPRESS_UART0_CA9 || \ DEBUG_VEXPRESS_UART0_RS1 diff --git a/arch/arm/include/debug/mvebu-uncompress.h b/arch/arm/include/debug/mvebu-uncompress.h new file mode 100644 index 0000000..df3bd6b --- /dev/null +++ b/arch/arm/include/debug/mvebu-uncompress.h @@ -0,0 +1,43 @@ +/* + * Marvell Armada SoC kernel uncompression UART routines + * + * Copyright (C) 2012 Marvell + * + * Lior Amsalem <alior@marvell.com> + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000 + +#define UART_THR ((volatile unsigned char *)(ARMADA_370_XP_REGS_PHYS_BASE\ + + 0x12000)) +#define UART_LSR ((volatile unsigned char *)(ARMADA_370_XP_REGS_PHYS_BASE\ + + 0x12014)) + +#define LSR_THRE 0x20 + +static void putc(const char c) +{ + int i; + + for (i = 0; i < 0x1000; i++) { + /* Transmit fifo not full? */ + if (*UART_LSR & LSR_THRE) + break; + } + + *UART_THR = c; +} + +static void flush(void) +{ +} + +/* + * nothing to do + */ +#define arch_decomp_setup() +#define arch_decomp_wdog() -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 36+ messages in thread
* [RFC PATCH 3/3] ARM: tegra: move debug macros to include/debug 2012-09-25 22:46 ` Stephen Warren @ 2012-09-25 22:46 ` Stephen Warren -1 siblings, 0 replies; 36+ messages in thread From: Stephen Warren @ 2012-09-25 22:46 UTC (permalink / raw) To: Arnd Bergmann, Olof Johansson, Russell King, Rob Herring Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Move Tegra's debug-macro.S and uncompress.h over to the common debug macro directory. Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> --- TODO: We need to find a better solution for access to <mach/iomap.h>. Perhaps the headers should just be moved into some generally accessible location, such as arch/arm/include or include/linux/... --- arch/arm/Kconfig.debug | 9 +++++++++ .../debug/tegra-uncompress.h} | 6 ++---- .../mach/debug-macro.S => include/debug/tegra.S} | 6 ++---- 3 files changed, 13 insertions(+), 8 deletions(-) rename arch/arm/{mach-tegra/include/mach/uncompress.h => include/debug/tegra-uncompress.h} (98%) rename arch/arm/{mach-tegra/include/mach/debug-macro.S => include/debug/tegra.S} (96%) diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index af34a43..78e11ed 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -345,6 +345,13 @@ choice Say Y here if you want kernel low-level debugging support on SOCFPGA based platforms. + config DEBUG_TEGRA_UART + depends on ARCH_TEGRA + bool "Use Tegra UART for low-level debug" + help + Say Y here if you want kernel low-level debugging support + on Tegra based platforms. + config DEBUG_VEXPRESS_UART0_DETECT bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" depends on ARCH_VEXPRESS && CPU_CP15_MMU @@ -418,12 +425,14 @@ config DEBUG_LL_INCLUDE default "debug/socfpga.S" if DEBUG_SOCFPGA_UART default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 + default "debug/tegra.S" if DEBUG_TEGRA_UART default "mach/debug-macro.S" config UNCOMPRESS_INCLUDE string default "debug/icedcc-uncompress.h" if DEBUG_ICEDCC default "debug/mvebu-uncompress.h" if DEBUG_MVEBU_UART + default "debug/tegra-uncompress.h" if DEBUG_TEGRA_UART default "debug/none-uncompress.h" if ARCH_MULTIPLATFORM || \ DEBUG_HIGHBANK_UART || \ DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ diff --git a/arch/arm/mach-tegra/include/mach/uncompress.h b/arch/arm/include/debug/tegra-uncompress.h similarity index 98% rename from arch/arm/mach-tegra/include/mach/uncompress.h rename to arch/arm/include/debug/tegra-uncompress.h index 937c4c5..da0f7e5 100644 --- a/arch/arm/mach-tegra/include/mach/uncompress.h +++ b/arch/arm/include/debug/tegra-uncompress.h @@ -1,6 +1,4 @@ /* - * arch/arm/mach-tegra/include/mach/uncompress.h - * * Copyright (C) 2010 Google, Inc. * Copyright (C) 2011 Google, Inc. * Copyright (C) 2011-2012 NVIDIA CORPORATION. All Rights Reserved. @@ -28,8 +26,8 @@ #include <linux/types.h> #include <linux/serial_reg.h> -#include <mach/iomap.h> -#include <mach/irammap.h> +#include "../../mach-tegra/include/mach/iomap.h" +#include "../../mach-tegra/include/mach/irammap.h" #define BIT(x) (1 << (x)) #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) diff --git a/arch/arm/mach-tegra/include/mach/debug-macro.S b/arch/arm/include/debug/tegra.S similarity index 96% rename from arch/arm/mach-tegra/include/mach/debug-macro.S rename to arch/arm/include/debug/tegra.S index 8ce0661..879511b 100644 --- a/arch/arm/mach-tegra/include/mach/debug-macro.S +++ b/arch/arm/include/debug/tegra.S @@ -1,6 +1,4 @@ /* - * arch/arm/mach-tegra/include/mach/debug-macro.S - * * Copyright (C) 2010,2011 Google, Inc. * Copyright (C) 2011-2012 NVIDIA CORPORATION. All Rights Reserved. * @@ -26,8 +24,8 @@ #include <linux/serial_reg.h> -#include <mach/iomap.h> -#include <mach/irammap.h> +#include "../../mach-tegra/include/mach/iomap.h" +#include "../../mach-tegra/include/mach/irammap.h" .macro addruart, rp, rv, tmp adr \rp, 99f @ actual addr of 99f -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 36+ messages in thread
* [RFC PATCH 3/3] ARM: tegra: move debug macros to include/debug @ 2012-09-25 22:46 ` Stephen Warren 0 siblings, 0 replies; 36+ messages in thread From: Stephen Warren @ 2012-09-25 22:46 UTC (permalink / raw) To: linux-arm-kernel From: Stephen Warren <swarren@nvidia.com> Move Tegra's debug-macro.S and uncompress.h over to the common debug macro directory. Signed-off-by: Stephen Warren <swarren@nvidia.com> --- TODO: We need to find a better solution for access to <mach/iomap.h>. Perhaps the headers should just be moved into some generally accessible location, such as arch/arm/include or include/linux/... --- arch/arm/Kconfig.debug | 9 +++++++++ .../debug/tegra-uncompress.h} | 6 ++---- .../mach/debug-macro.S => include/debug/tegra.S} | 6 ++---- 3 files changed, 13 insertions(+), 8 deletions(-) rename arch/arm/{mach-tegra/include/mach/uncompress.h => include/debug/tegra-uncompress.h} (98%) rename arch/arm/{mach-tegra/include/mach/debug-macro.S => include/debug/tegra.S} (96%) diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index af34a43..78e11ed 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -345,6 +345,13 @@ choice Say Y here if you want kernel low-level debugging support on SOCFPGA based platforms. + config DEBUG_TEGRA_UART + depends on ARCH_TEGRA + bool "Use Tegra UART for low-level debug" + help + Say Y here if you want kernel low-level debugging support + on Tegra based platforms. + config DEBUG_VEXPRESS_UART0_DETECT bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" depends on ARCH_VEXPRESS && CPU_CP15_MMU @@ -418,12 +425,14 @@ config DEBUG_LL_INCLUDE default "debug/socfpga.S" if DEBUG_SOCFPGA_UART default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 + default "debug/tegra.S" if DEBUG_TEGRA_UART default "mach/debug-macro.S" config UNCOMPRESS_INCLUDE string default "debug/icedcc-uncompress.h" if DEBUG_ICEDCC default "debug/mvebu-uncompress.h" if DEBUG_MVEBU_UART + default "debug/tegra-uncompress.h" if DEBUG_TEGRA_UART default "debug/none-uncompress.h" if ARCH_MULTIPLATFORM || \ DEBUG_HIGHBANK_UART || \ DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ diff --git a/arch/arm/mach-tegra/include/mach/uncompress.h b/arch/arm/include/debug/tegra-uncompress.h similarity index 98% rename from arch/arm/mach-tegra/include/mach/uncompress.h rename to arch/arm/include/debug/tegra-uncompress.h index 937c4c5..da0f7e5 100644 --- a/arch/arm/mach-tegra/include/mach/uncompress.h +++ b/arch/arm/include/debug/tegra-uncompress.h @@ -1,6 +1,4 @@ /* - * arch/arm/mach-tegra/include/mach/uncompress.h - * * Copyright (C) 2010 Google, Inc. * Copyright (C) 2011 Google, Inc. * Copyright (C) 2011-2012 NVIDIA CORPORATION. All Rights Reserved. @@ -28,8 +26,8 @@ #include <linux/types.h> #include <linux/serial_reg.h> -#include <mach/iomap.h> -#include <mach/irammap.h> +#include "../../mach-tegra/include/mach/iomap.h" +#include "../../mach-tegra/include/mach/irammap.h" #define BIT(x) (1 << (x)) #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) diff --git a/arch/arm/mach-tegra/include/mach/debug-macro.S b/arch/arm/include/debug/tegra.S similarity index 96% rename from arch/arm/mach-tegra/include/mach/debug-macro.S rename to arch/arm/include/debug/tegra.S index 8ce0661..879511b 100644 --- a/arch/arm/mach-tegra/include/mach/debug-macro.S +++ b/arch/arm/include/debug/tegra.S @@ -1,6 +1,4 @@ /* - * arch/arm/mach-tegra/include/mach/debug-macro.S - * * Copyright (C) 2010,2011 Google, Inc. * Copyright (C) 2011-2012 NVIDIA CORPORATION. All Rights Reserved. * @@ -26,8 +24,8 @@ #include <linux/serial_reg.h> -#include <mach/iomap.h> -#include <mach/irammap.h> +#include "../../mach-tegra/include/mach/iomap.h" +#include "../../mach-tegra/include/mach/irammap.h" .macro addruart, rp, rv, tmp adr \rp, 99f @ actual addr of 99f -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement 2012-09-25 22:46 ` Stephen Warren @ 2012-09-26 10:38 ` Arnd Bergmann -1 siblings, 0 replies; 36+ messages in thread From: Arnd Bergmann @ 2012-09-26 10:38 UTC (permalink / raw) To: Stephen Warren Cc: Olof Johansson, Russell King, Rob Herring, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren On Tuesday 25 September 2012, Stephen Warren wrote: > > From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > > Tegra's uncompress and debug-macro.S communicate to each-other. Hence, > we can't be left without uncompress.h in a multi-platform enabled kernel, > or we'll lose features. This series allows uncompress.h to be used in a > multi-platform kernel, restores the mvebu uncompress.h, and finally moves > the Tegra debug macros into the common location. The series as mainly an > RFC due to the outstanding question of where to put Tegra's <mach/iomap.h> > in the final patch. To follow up on the IRC discussion we had yesterday leading to this patch set, I had another idea of how to handle the same: Since the decompressor code is actually fairly separate from the kernel, we could also build multiple versions of it, and link in the same compressed vmlinux. We already allow building Image/zImage/uImage from the same vmlinux, and that could theoretically be extended. Your approach of course also sounds ok, and we could eventually combine the two. Arnd ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement @ 2012-09-26 10:38 ` Arnd Bergmann 0 siblings, 0 replies; 36+ messages in thread From: Arnd Bergmann @ 2012-09-26 10:38 UTC (permalink / raw) To: linux-arm-kernel On Tuesday 25 September 2012, Stephen Warren wrote: > > From: Stephen Warren <swarren@nvidia.com> > > Tegra's uncompress and debug-macro.S communicate to each-other. Hence, > we can't be left without uncompress.h in a multi-platform enabled kernel, > or we'll lose features. This series allows uncompress.h to be used in a > multi-platform kernel, restores the mvebu uncompress.h, and finally moves > the Tegra debug macros into the common location. The series as mainly an > RFC due to the outstanding question of where to put Tegra's <mach/iomap.h> > in the final patch. To follow up on the IRC discussion we had yesterday leading to this patch set, I had another idea of how to handle the same: Since the decompressor code is actually fairly separate from the kernel, we could also build multiple versions of it, and link in the same compressed vmlinux. We already allow building Image/zImage/uImage from the same vmlinux, and that could theoretically be extended. Your approach of course also sounds ok, and we could eventually combine the two. Arnd ^ permalink raw reply [flat|nested] 36+ messages in thread
[parent not found: <201209261038.36223.arnd-r2nGTMty4D4@public.gmane.org>]
* Re: [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement 2012-09-26 10:38 ` Arnd Bergmann @ 2012-09-26 10:44 ` Russell King - ARM Linux -1 siblings, 0 replies; 36+ messages in thread From: Russell King - ARM Linux @ 2012-09-26 10:44 UTC (permalink / raw) To: Arnd Bergmann Cc: Stephen Warren, Olof Johansson, Rob Herring, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren On Wed, Sep 26, 2012 at 10:38:36AM +0000, Arnd Bergmann wrote: > On Tuesday 25 September 2012, Stephen Warren wrote: > > > > From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > > > > Tegra's uncompress and debug-macro.S communicate to each-other. Hence, > > we can't be left without uncompress.h in a multi-platform enabled kernel, > > or we'll lose features. This series allows uncompress.h to be used in a > > multi-platform kernel, restores the mvebu uncompress.h, and finally moves > > the Tegra debug macros into the common location. The series as mainly an > > RFC due to the outstanding question of where to put Tegra's <mach/iomap.h> > > in the final patch. > > > To follow up on the IRC discussion we had yesterday leading to this patch > set, I had another idea of how to handle the same: Since the decompressor > code is actually fairly separate from the kernel, we could also build > multiple versions of it, and link in the same compressed vmlinux. That rubbishes the idea of a single kernel though, which is to give distros a single kernel image that they can boot on different ARM platforms. They want a single kernel binary that works everywhere, not one which they need to select the right binary to work on platform X. Yes, the _internal_ uncompressed bulk may be the same, but it would require distros to carry around N different kernel images for N different platforms. ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement @ 2012-09-26 10:44 ` Russell King - ARM Linux 0 siblings, 0 replies; 36+ messages in thread From: Russell King - ARM Linux @ 2012-09-26 10:44 UTC (permalink / raw) To: linux-arm-kernel On Wed, Sep 26, 2012 at 10:38:36AM +0000, Arnd Bergmann wrote: > On Tuesday 25 September 2012, Stephen Warren wrote: > > > > From: Stephen Warren <swarren@nvidia.com> > > > > Tegra's uncompress and debug-macro.S communicate to each-other. Hence, > > we can't be left without uncompress.h in a multi-platform enabled kernel, > > or we'll lose features. This series allows uncompress.h to be used in a > > multi-platform kernel, restores the mvebu uncompress.h, and finally moves > > the Tegra debug macros into the common location. The series as mainly an > > RFC due to the outstanding question of where to put Tegra's <mach/iomap.h> > > in the final patch. > > > To follow up on the IRC discussion we had yesterday leading to this patch > set, I had another idea of how to handle the same: Since the decompressor > code is actually fairly separate from the kernel, we could also build > multiple versions of it, and link in the same compressed vmlinux. That rubbishes the idea of a single kernel though, which is to give distros a single kernel image that they can boot on different ARM platforms. They want a single kernel binary that works everywhere, not one which they need to select the right binary to work on platform X. Yes, the _internal_ uncompressed bulk may be the same, but it would require distros to carry around N different kernel images for N different platforms. ^ permalink raw reply [flat|nested] 36+ messages in thread
[parent not found: <20120926104421.GA7040-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>]
* Re: [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement 2012-09-26 10:44 ` Russell King - ARM Linux @ 2012-09-26 12:05 ` Arnd Bergmann -1 siblings, 0 replies; 36+ messages in thread From: Arnd Bergmann @ 2012-09-26 12:05 UTC (permalink / raw) To: Russell King - ARM Linux Cc: Stephen Warren, Olof Johansson, Rob Herring, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren On Wednesday 26 September 2012, Russell King - ARM Linux wrote: > That rubbishes the idea of a single kernel though, which is to give > distros a single kernel image that they can boot on different ARM > platforms. > > They want a single kernel binary that works everywhere, not one which > they need to select the right binary to work on platform X. Yes, the > internal uncompressed bulk may be the same, but it would require > distros to carry around N different kernel images for N different > platforms. Right. It still helps the distros ensure that they only have a single configuration and a single binary to test, which I expect is their main interest, but keeping multiple copies of the same binary with different headers is a bit silly, I agree. On PowerPC, we have a similar problem, and the way that distros usually deal with that is to do the final link of the zImage from the post-install stage of their rpm or deb packages, depending on the platform they are on. In the same stage, they also link in the newly created initrd and the device tree blob if necessary. Arnd ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement @ 2012-09-26 12:05 ` Arnd Bergmann 0 siblings, 0 replies; 36+ messages in thread From: Arnd Bergmann @ 2012-09-26 12:05 UTC (permalink / raw) To: linux-arm-kernel On Wednesday 26 September 2012, Russell King - ARM Linux wrote: > That rubbishes the idea of a single kernel though, which is to give > distros a single kernel image that they can boot on different ARM > platforms. > > They want a single kernel binary that works everywhere, not one which > they need to select the right binary to work on platform X. Yes, the > internal uncompressed bulk may be the same, but it would require > distros to carry around N different kernel images for N different > platforms. Right. It still helps the distros ensure that they only have a single configuration and a single binary to test, which I expect is their main interest, but keeping multiple copies of the same binary with different headers is a bit silly, I agree. On PowerPC, we have a similar problem, and the way that distros usually deal with that is to do the final link of the zImage from the post-install stage of their rpm or deb packages, depending on the platform they are on. In the same stage, they also link in the newly created initrd and the device tree blob if necessary. Arnd ^ permalink raw reply [flat|nested] 36+ messages in thread
[parent not found: <201209261205.01351.arnd-r2nGTMty4D4@public.gmane.org>]
* Re: [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement 2012-09-26 12:05 ` Arnd Bergmann @ 2012-09-26 13:10 ` Domenico Andreoli -1 siblings, 0 replies; 36+ messages in thread From: Domenico Andreoli @ 2012-09-26 13:10 UTC (permalink / raw) To: Arnd Bergmann Cc: Russell King - ARM Linux, Stephen Warren, Stephen Warren, Rob Herring, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On Wed, Sep 26, 2012 at 12:05:01PM +0000, Arnd Bergmann wrote: > On Wednesday 26 September 2012, Russell King - ARM Linux wrote: > > That rubbishes the idea of a single kernel though, which is to give > > distros a single kernel image that they can boot on different ARM > > platforms. > > > > They want a single kernel binary that works everywhere, not one which > > they need to select the right binary to work on platform X. Yes, the > > internal uncompressed bulk may be the same, but it would require > > distros to carry around N different kernel images for N different > > platforms. > > Right. It still helps the distros ensure that they only have a single > configuration and a single binary to test, which I expect is their main > interest, but keeping multiple copies of the same binary with different > headers is a bit silly, I agree. > > On PowerPC, we have a similar problem, and the way that distros usually > deal with that is to do the final link of the zImage from the post-install > stage of their rpm or deb packages, depending on the platform they are > on. In the same stage, they also link in the newly created initrd and > the device tree blob if necessary. Wouldn't help to have a sort of generic console driver in the decompressor accepting some regs and masks provided by DT? This would fit most of the uarts around, would be totally generic and multi-platform friendly. Regards, Domenico ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement @ 2012-09-26 13:10 ` Domenico Andreoli 0 siblings, 0 replies; 36+ messages in thread From: Domenico Andreoli @ 2012-09-26 13:10 UTC (permalink / raw) To: linux-arm-kernel On Wed, Sep 26, 2012 at 12:05:01PM +0000, Arnd Bergmann wrote: > On Wednesday 26 September 2012, Russell King - ARM Linux wrote: > > That rubbishes the idea of a single kernel though, which is to give > > distros a single kernel image that they can boot on different ARM > > platforms. > > > > They want a single kernel binary that works everywhere, not one which > > they need to select the right binary to work on platform X. Yes, the > > internal uncompressed bulk may be the same, but it would require > > distros to carry around N different kernel images for N different > > platforms. > > Right. It still helps the distros ensure that they only have a single > configuration and a single binary to test, which I expect is their main > interest, but keeping multiple copies of the same binary with different > headers is a bit silly, I agree. > > On PowerPC, we have a similar problem, and the way that distros usually > deal with that is to do the final link of the zImage from the post-install > stage of their rpm or deb packages, depending on the platform they are > on. In the same stage, they also link in the newly created initrd and > the device tree blob if necessary. Wouldn't help to have a sort of generic console driver in the decompressor accepting some regs and masks provided by DT? This would fit most of the uarts around, would be totally generic and multi-platform friendly. Regards, Domenico ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement 2012-09-26 10:44 ` Russell King - ARM Linux @ 2012-09-26 13:48 ` Tim Bird -1 siblings, 0 replies; 36+ messages in thread From: Tim Bird @ 2012-09-26 13:48 UTC (permalink / raw) To: Russell King - ARM Linux Cc: Arnd Bergmann, Stephen Warren, Stephen Warren, Rob Herring, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On 09/26/2012 03:44 AM, Russell King - ARM Linux wrote: > On Wed, Sep 26, 2012 at 10:38:36AM +0000, Arnd Bergmann wrote: >> On Tuesday 25 September 2012, Stephen Warren wrote: >>> >>> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> >>> >>> Tegra's uncompress and debug-macro.S communicate to each-other. Hence, >>> we can't be left without uncompress.h in a multi-platform enabled kernel, >>> or we'll lose features. This series allows uncompress.h to be used in a >>> multi-platform kernel, restores the mvebu uncompress.h, and finally moves >>> the Tegra debug macros into the common location. The series as mainly an >>> RFC due to the outstanding question of where to put Tegra's <mach/iomap.h> >>> in the final patch. >> >> >> To follow up on the IRC discussion we had yesterday leading to this patch >> set, I had another idea of how to handle the same: Since the decompressor >> code is actually fairly separate from the kernel, we could also build >> multiple versions of it, and link in the same compressed vmlinux. > > That rubbishes the idea of a single kernel though, which is to give > distros a single kernel image that they can boot on different ARM > platforms. > > They want a single kernel binary that works everywhere, not one which > they need to select the right binary to work on platform X. Yes, the > _internal_ uncompressed bulk may be the same, but it would require > distros to carry around N different kernel images for N different > platforms. Will those of us not interested in a single kernel binary that works everywhere be able to configure an ARM kernel image without a lot of bloat? -- Tim ============================= Tim Bird Architecture Group Chair, CE Workgroup of the Linux Foundation Senior Staff Engineer, Sony Network Entertainment ============================= ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement @ 2012-09-26 13:48 ` Tim Bird 0 siblings, 0 replies; 36+ messages in thread From: Tim Bird @ 2012-09-26 13:48 UTC (permalink / raw) To: linux-arm-kernel On 09/26/2012 03:44 AM, Russell King - ARM Linux wrote: > On Wed, Sep 26, 2012 at 10:38:36AM +0000, Arnd Bergmann wrote: >> On Tuesday 25 September 2012, Stephen Warren wrote: >>> >>> From: Stephen Warren <swarren@nvidia.com> >>> >>> Tegra's uncompress and debug-macro.S communicate to each-other. Hence, >>> we can't be left without uncompress.h in a multi-platform enabled kernel, >>> or we'll lose features. This series allows uncompress.h to be used in a >>> multi-platform kernel, restores the mvebu uncompress.h, and finally moves >>> the Tegra debug macros into the common location. The series as mainly an >>> RFC due to the outstanding question of where to put Tegra's <mach/iomap.h> >>> in the final patch. >> >> >> To follow up on the IRC discussion we had yesterday leading to this patch >> set, I had another idea of how to handle the same: Since the decompressor >> code is actually fairly separate from the kernel, we could also build >> multiple versions of it, and link in the same compressed vmlinux. > > That rubbishes the idea of a single kernel though, which is to give > distros a single kernel image that they can boot on different ARM > platforms. > > They want a single kernel binary that works everywhere, not one which > they need to select the right binary to work on platform X. Yes, the > _internal_ uncompressed bulk may be the same, but it would require > distros to carry around N different kernel images for N different > platforms. Will those of us not interested in a single kernel binary that works everywhere be able to configure an ARM kernel image without a lot of bloat? -- Tim ============================= Tim Bird Architecture Group Chair, CE Workgroup of the Linux Foundation Senior Staff Engineer, Sony Network Entertainment ============================= ^ permalink raw reply [flat|nested] 36+ messages in thread
[parent not found: <506307A0.7010701-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org>]
* Re: [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement 2012-09-26 13:48 ` Tim Bird @ 2012-09-26 14:17 ` Arnd Bergmann -1 siblings, 0 replies; 36+ messages in thread From: Arnd Bergmann @ 2012-09-26 14:17 UTC (permalink / raw) To: Tim Bird Cc: Russell King - ARM Linux, Stephen Warren, Stephen Warren, Rob Herring, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On Wednesday 26 September 2012, Tim Bird wrote: > Will those of us not interested in a single kernel binary > that works everywhere be able to configure an ARM kernel image > without a lot of bloat? I'm not aware of increase in code size from the single kernel image yet. If you find something, let us know. For the platforms that are being converted to multiplatform in 3.7, the kernel binary should be essentially the same between building a single-platform kernel before the patches, and a multiplatform kernel with only one platform enabled after the patches. We had to add a few indirect function pointers, e.g. for SMP startup, but that overhead is measured in bytes, not kilobytes. Arnd ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement @ 2012-09-26 14:17 ` Arnd Bergmann 0 siblings, 0 replies; 36+ messages in thread From: Arnd Bergmann @ 2012-09-26 14:17 UTC (permalink / raw) To: linux-arm-kernel On Wednesday 26 September 2012, Tim Bird wrote: > Will those of us not interested in a single kernel binary > that works everywhere be able to configure an ARM kernel image > without a lot of bloat? I'm not aware of increase in code size from the single kernel image yet. If you find something, let us know. For the platforms that are being converted to multiplatform in 3.7, the kernel binary should be essentially the same between building a single-platform kernel before the patches, and a multiplatform kernel with only one platform enabled after the patches. We had to add a few indirect function pointers, e.g. for SMP startup, but that overhead is measured in bytes, not kilobytes. Arnd ^ permalink raw reply [flat|nested] 36+ messages in thread
[parent not found: <201209261417.18883.arnd-r2nGTMty4D4@public.gmane.org>]
* Re: [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement 2012-09-26 14:17 ` Arnd Bergmann @ 2012-09-26 14:48 ` Tim Bird -1 siblings, 0 replies; 36+ messages in thread From: Tim Bird @ 2012-09-26 14:48 UTC (permalink / raw) To: Arnd Bergmann Cc: Russell King - ARM Linux, Stephen Warren, Stephen Warren, Rob Herring, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On 09/26/2012 07:17 AM, Arnd Bergmann wrote: > On Wednesday 26 September 2012, Tim Bird wrote: >> Will those of us not interested in a single kernel binary >> that works everywhere be able to configure an ARM kernel image >> without a lot of bloat? > > I'm not aware of increase in code size from the single kernel > image yet. If you find something, let us know. I have been assuming that the device tree conversion added a small overhead to both the kernel size and the boot time. You are correct that I should measure this before complaining. :-) I'll try to do that when I have some time. Unfortunately, before and after size snapshots are a little difficult to obtain -- it appears that support for device tree involves other refactoring. My main issue is to avoid requiring the loading of drivers and features that are not required for a platform, if the platform does not need it (or the developer chooses to omit it). I may have mis-read this thread, but it sounded like the uncompress code was going to be moved to a common area and not be configurable. Sorry if this is not the case. -- Tim ============================= Tim Bird Architecture Group Chair, CE Workgroup of the Linux Foundation Senior Staff Engineer, Sony Network Entertainment ============================= ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement @ 2012-09-26 14:48 ` Tim Bird 0 siblings, 0 replies; 36+ messages in thread From: Tim Bird @ 2012-09-26 14:48 UTC (permalink / raw) To: linux-arm-kernel On 09/26/2012 07:17 AM, Arnd Bergmann wrote: > On Wednesday 26 September 2012, Tim Bird wrote: >> Will those of us not interested in a single kernel binary >> that works everywhere be able to configure an ARM kernel image >> without a lot of bloat? > > I'm not aware of increase in code size from the single kernel > image yet. If you find something, let us know. I have been assuming that the device tree conversion added a small overhead to both the kernel size and the boot time. You are correct that I should measure this before complaining. :-) I'll try to do that when I have some time. Unfortunately, before and after size snapshots are a little difficult to obtain -- it appears that support for device tree involves other refactoring. My main issue is to avoid requiring the loading of drivers and features that are not required for a platform, if the platform does not need it (or the developer chooses to omit it). I may have mis-read this thread, but it sounded like the uncompress code was going to be moved to a common area and not be configurable. Sorry if this is not the case. -- Tim ============================= Tim Bird Architecture Group Chair, CE Workgroup of the Linux Foundation Senior Staff Engineer, Sony Network Entertainment ============================= ^ permalink raw reply [flat|nested] 36+ messages in thread
[parent not found: <506315A6.3090300-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org>]
* Re: [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement 2012-09-26 14:48 ` Tim Bird @ 2012-09-26 14:49 ` Arnd Bergmann -1 siblings, 0 replies; 36+ messages in thread From: Arnd Bergmann @ 2012-09-26 14:49 UTC (permalink / raw) To: Tim Bird Cc: Russell King - ARM Linux, Stephen Warren, Stephen Warren, Rob Herring, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On Wednesday 26 September 2012, Tim Bird wrote: > My main issue is to avoid requiring the loading of > drivers and features that are not required for a > platform, if the platform does not need it (or the > developer chooses to omit it). I may have mis-read > this thread, but it sounded like the uncompress > code was going to be moved to a common area and > not be configurable. The suggestion was to move it into a different location, but you still would only have one version of it, even for a multiplatform kernel, so no code growth there. Right now, a multiplatform kernel has no way of debugging the decompressor using console output, so it's actually /smaller/ than a single-platform kernel, but also less capable. Stephen's patches are a way to bring that feature back for platforms that are converted to multiplatform, but such a kernel would still only work on a single platform, even if it has all the actual kernel code enabled to support others. Arnd ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement @ 2012-09-26 14:49 ` Arnd Bergmann 0 siblings, 0 replies; 36+ messages in thread From: Arnd Bergmann @ 2012-09-26 14:49 UTC (permalink / raw) To: linux-arm-kernel On Wednesday 26 September 2012, Tim Bird wrote: > My main issue is to avoid requiring the loading of > drivers and features that are not required for a > platform, if the platform does not need it (or the > developer chooses to omit it). I may have mis-read > this thread, but it sounded like the uncompress > code was going to be moved to a common area and > not be configurable. The suggestion was to move it into a different location, but you still would only have one version of it, even for a multiplatform kernel, so no code growth there. Right now, a multiplatform kernel has no way of debugging the decompressor using console output, so it's actually /smaller/ than a single-platform kernel, but also less capable. Stephen's patches are a way to bring that feature back for platforms that are converted to multiplatform, but such a kernel would still only work on a single platform, even if it has all the actual kernel code enabled to support others. Arnd ^ permalink raw reply [flat|nested] 36+ messages in thread
[parent not found: <201209261449.48468.arnd-r2nGTMty4D4@public.gmane.org>]
* Re: [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement 2012-09-26 14:49 ` Arnd Bergmann @ 2012-09-26 15:10 ` Russell King - ARM Linux -1 siblings, 0 replies; 36+ messages in thread From: Russell King - ARM Linux @ 2012-09-26 15:10 UTC (permalink / raw) To: Arnd Bergmann Cc: Tim Bird, Stephen Warren, Stephen Warren, Rob Herring, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On Wed, Sep 26, 2012 at 02:49:48PM +0000, Arnd Bergmann wrote: > Right now, a multiplatform kernel has no way of debugging the > decompressor using console output, so it's actually /smaller/ > than a single-platform kernel, but also less capable. Err, are you sure about all your details above? You do realise when debugging is disabled there is no debug code included anywhere in the decompressor? I think what you're referring to is not the debug output, but the normal decompressor output. (The "Decompressing Linux..." message is not debug output.) Let's be a little more clear about what "less capable" means - it will be unable to report any errors that occur during the decompression. What that means is that you'll end up with mere silence should an error occur. ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement @ 2012-09-26 15:10 ` Russell King - ARM Linux 0 siblings, 0 replies; 36+ messages in thread From: Russell King - ARM Linux @ 2012-09-26 15:10 UTC (permalink / raw) To: linux-arm-kernel On Wed, Sep 26, 2012 at 02:49:48PM +0000, Arnd Bergmann wrote: > Right now, a multiplatform kernel has no way of debugging the > decompressor using console output, so it's actually /smaller/ > than a single-platform kernel, but also less capable. Err, are you sure about all your details above? You do realise when debugging is disabled there is no debug code included anywhere in the decompressor? I think what you're referring to is not the debug output, but the normal decompressor output. (The "Decompressing Linux..." message is not debug output.) Let's be a little more clear about what "less capable" means - it will be unable to report any errors that occur during the decompression. What that means is that you'll end up with mere silence should an error occur. ^ permalink raw reply [flat|nested] 36+ messages in thread
[parent not found: <20120926151023.GC30938-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>]
* Re: [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement 2012-09-26 15:10 ` Russell King - ARM Linux @ 2012-09-26 15:34 ` Stephen Warren -1 siblings, 0 replies; 36+ messages in thread From: Stephen Warren @ 2012-09-26 15:34 UTC (permalink / raw) To: Russell King - ARM Linux Cc: Arnd Bergmann, Tim Bird, Stephen Warren, Rob Herring, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On 09/26/2012 09:10 AM, Russell King - ARM Linux wrote: > On Wed, Sep 26, 2012 at 02:49:48PM +0000, Arnd Bergmann wrote: >> Right now, a multiplatform kernel has no way of debugging the >> decompressor using console output, so it's actually /smaller/ >> than a single-platform kernel, but also less capable. > > Err, are you sure about all your details above? You do realise when > debugging is disabled there is no debug code included anywhere in the > decompressor? > > I think what you're referring to is not the debug output, but the normal > decompressor output. (The "Decompressing Linux..." message is not > debug output.) > > Let's be a little more clear about what "less capable" means - it will > be unable to report any errors that occur during the decompression. > What that means is that you'll end up with mere silence should an > error occur. In the Tegra case, by omitting uncompress.h, we lose more than just the "Decompressing Linux..." message; uncompress.h contains code to parse extract the platform's debug UART ID from data set up by the boot ROM (since we have 5 UARTs), and pass this on to debug-macro.S. Without uncompress.h running, debug-macro.S would either have to hard-code a single UART ID (and different boards uses different UARTs, which would make running a single kernel image across all Tegra devices with earlyprintk enabled impossible) *or* we'd have to port the UART ID extraction code to debug-macro.S too, which I don't fancy very much since that's assembly whereas uncompress.h is C. ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement @ 2012-09-26 15:34 ` Stephen Warren 0 siblings, 0 replies; 36+ messages in thread From: Stephen Warren @ 2012-09-26 15:34 UTC (permalink / raw) To: linux-arm-kernel On 09/26/2012 09:10 AM, Russell King - ARM Linux wrote: > On Wed, Sep 26, 2012 at 02:49:48PM +0000, Arnd Bergmann wrote: >> Right now, a multiplatform kernel has no way of debugging the >> decompressor using console output, so it's actually /smaller/ >> than a single-platform kernel, but also less capable. > > Err, are you sure about all your details above? You do realise when > debugging is disabled there is no debug code included anywhere in the > decompressor? > > I think what you're referring to is not the debug output, but the normal > decompressor output. (The "Decompressing Linux..." message is not > debug output.) > > Let's be a little more clear about what "less capable" means - it will > be unable to report any errors that occur during the decompression. > What that means is that you'll end up with mere silence should an > error occur. In the Tegra case, by omitting uncompress.h, we lose more than just the "Decompressing Linux..." message; uncompress.h contains code to parse extract the platform's debug UART ID from data set up by the boot ROM (since we have 5 UARTs), and pass this on to debug-macro.S. Without uncompress.h running, debug-macro.S would either have to hard-code a single UART ID (and different boards uses different UARTs, which would make running a single kernel image across all Tegra devices with earlyprintk enabled impossible) *or* we'd have to port the UART ID extraction code to debug-macro.S too, which I don't fancy very much since that's assembly whereas uncompress.h is C. ^ permalink raw reply [flat|nested] 36+ messages in thread
[parent not found: <50632096.7080208-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* Re: [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement 2012-09-26 15:34 ` Stephen Warren @ 2012-09-28 3:53 ` Nicolas Pitre -1 siblings, 0 replies; 36+ messages in thread From: Nicolas Pitre @ 2012-09-28 3:53 UTC (permalink / raw) To: Stephen Warren Cc: Russell King - ARM Linux, Stephen Warren, Arnd Bergmann, Rob Herring, Olof Johansson, Tim Bird, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On Wed, 26 Sep 2012, Stephen Warren wrote: > In the Tegra case, by omitting uncompress.h, we lose more than just the > "Decompressing Linux..." message; uncompress.h contains code to parse > extract the platform's debug UART ID from data set up by the boot ROM > (since we have 5 UARTs), and pass this on to debug-macro.S. Let me tell you that this is totally evil. OMAP and Davinci are doing the same abuse. > Without uncompress.h running, debug-macro.S would either have to > hard-code a single UART ID (and different boards uses different UARTs, > which would make running a single kernel image across all Tegra > devices with earlyprintk enabled impossible) *or* we'd have to port > the UART ID extraction code to debug-macro.S too, Please do the later. That's the only sane solution. > which I don't fancy very much since that's assembly whereas > uncompress.h is C. Well, that's too bad. Time to sharpen your assembly skills. ;-) Nicolas ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement @ 2012-09-28 3:53 ` Nicolas Pitre 0 siblings, 0 replies; 36+ messages in thread From: Nicolas Pitre @ 2012-09-28 3:53 UTC (permalink / raw) To: linux-arm-kernel On Wed, 26 Sep 2012, Stephen Warren wrote: > In the Tegra case, by omitting uncompress.h, we lose more than just the > "Decompressing Linux..." message; uncompress.h contains code to parse > extract the platform's debug UART ID from data set up by the boot ROM > (since we have 5 UARTs), and pass this on to debug-macro.S. Let me tell you that this is totally evil. OMAP and Davinci are doing the same abuse. > Without uncompress.h running, debug-macro.S would either have to > hard-code a single UART ID (and different boards uses different UARTs, > which would make running a single kernel image across all Tegra > devices with earlyprintk enabled impossible) *or* we'd have to port > the UART ID extraction code to debug-macro.S too, Please do the later. That's the only sane solution. > which I don't fancy very much since that's assembly whereas > uncompress.h is C. Well, that's too bad. Time to sharpen your assembly skills. ;-) Nicolas ^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement 2012-09-25 22:46 ` Stephen Warren @ 2012-09-27 5:37 ` Jean-Christophe PLAGNIOL-VILLARD -1 siblings, 0 replies; 36+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-09-27 5:37 UTC (permalink / raw) To: Stephen Warren Cc: Russell King, Arnd Bergmann, Rob Herring, linux-tegra, Olof Johansson, Stephen Warren, linux-arm-kernel HI, what happend on the patch serie taht use the fdt to do the same Best Regards, J. On 16:46 Tue 25 Sep , Stephen Warren wrote: > From: Stephen Warren <swarren@nvidia.com> > > Tegra's uncompress and debug-macro.S communicate to each-other. Hence, > we can't be left without uncompress.h in a multi-platform enabled kernel, > or we'll lose features. This series allows uncompress.h to be used in a > multi-platform kernel, restores the mvebu uncompress.h, and finally moves > the Tegra debug macros into the common location. The series as mainly an > RFC due to the outstanding question of where to put Tegra's <mach/iomap.h> > in the final patch. > > Stephen Warren (3): > ARM: move ICEDCC uncompress.h to common location > ARM: mvebu: restore uncompress.h > ARM: tegra: move debug macros to include/debug > > arch/arm/Kconfig.debug | 20 ++++++ > arch/arm/boot/compressed/misc.c | 64 +------------------- > arch/arm/include/debug/icedcc-uncompress.h | 61 +++++++++++++++++++ > arch/arm/include/debug/mvebu-uncompress.h | 43 +++++++++++++ > arch/arm/include/debug/none-uncompress.h | 3 + > .../debug/tegra-uncompress.h} | 6 +- > .../mach/debug-macro.S => include/debug/tegra.S} | 6 +- > 7 files changed, 132 insertions(+), 71 deletions(-) > create mode 100644 arch/arm/include/debug/icedcc-uncompress.h > create mode 100644 arch/arm/include/debug/mvebu-uncompress.h > create mode 100644 arch/arm/include/debug/none-uncompress.h > rename arch/arm/{mach-tegra/include/mach/uncompress.h => include/debug/tegra-uncompress.h} (98%) > rename arch/arm/{mach-tegra/include/mach/debug-macro.S => include/debug/tegra.S} (96%) > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 36+ messages in thread
* [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement @ 2012-09-27 5:37 ` Jean-Christophe PLAGNIOL-VILLARD 0 siblings, 0 replies; 36+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-09-27 5:37 UTC (permalink / raw) To: linux-arm-kernel HI, what happend on the patch serie taht use the fdt to do the same Best Regards, J. On 16:46 Tue 25 Sep , Stephen Warren wrote: > From: Stephen Warren <swarren@nvidia.com> > > Tegra's uncompress and debug-macro.S communicate to each-other. Hence, > we can't be left without uncompress.h in a multi-platform enabled kernel, > or we'll lose features. This series allows uncompress.h to be used in a > multi-platform kernel, restores the mvebu uncompress.h, and finally moves > the Tegra debug macros into the common location. The series as mainly an > RFC due to the outstanding question of where to put Tegra's <mach/iomap.h> > in the final patch. > > Stephen Warren (3): > ARM: move ICEDCC uncompress.h to common location > ARM: mvebu: restore uncompress.h > ARM: tegra: move debug macros to include/debug > > arch/arm/Kconfig.debug | 20 ++++++ > arch/arm/boot/compressed/misc.c | 64 +------------------- > arch/arm/include/debug/icedcc-uncompress.h | 61 +++++++++++++++++++ > arch/arm/include/debug/mvebu-uncompress.h | 43 +++++++++++++ > arch/arm/include/debug/none-uncompress.h | 3 + > .../debug/tegra-uncompress.h} | 6 +- > .../mach/debug-macro.S => include/debug/tegra.S} | 6 +- > 7 files changed, 132 insertions(+), 71 deletions(-) > create mode 100644 arch/arm/include/debug/icedcc-uncompress.h > create mode 100644 arch/arm/include/debug/mvebu-uncompress.h > create mode 100644 arch/arm/include/debug/none-uncompress.h > rename arch/arm/{mach-tegra/include/mach/uncompress.h => include/debug/tegra-uncompress.h} (98%) > rename arch/arm/{mach-tegra/include/mach/debug-macro.S => include/debug/tegra.S} (96%) > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 36+ messages in thread
end of thread, other threads:[~2012-09-28 3:53 UTC | newest] Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-09-25 22:46 [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement Stephen Warren 2012-09-25 22:46 ` Stephen Warren [not found] ` <1348613212-21897-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2012-09-25 22:46 ` [RFC PATCH 1/3] ARM: move ICEDCC uncompress.h to common location Stephen Warren 2012-09-25 22:46 ` Stephen Warren [not found] ` <1348613212-21897-2-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2012-09-26 21:56 ` Domenico Andreoli 2012-09-26 21:56 ` Domenico Andreoli 2012-09-27 5:19 ` Stephen Warren 2012-09-27 5:19 ` Stephen Warren 2012-09-25 22:46 ` [RFC PATCH 2/3] ARM: mvebu: restore uncompress.h Stephen Warren 2012-09-25 22:46 ` Stephen Warren 2012-09-25 22:46 ` [RFC PATCH 3/3] ARM: tegra: move debug macros to include/debug Stephen Warren 2012-09-25 22:46 ` Stephen Warren 2012-09-26 10:38 ` [RFC PATCH 0/3] ARM: uncompress.h multi-platform enablement Arnd Bergmann 2012-09-26 10:38 ` Arnd Bergmann [not found] ` <201209261038.36223.arnd-r2nGTMty4D4@public.gmane.org> 2012-09-26 10:44 ` Russell King - ARM Linux 2012-09-26 10:44 ` Russell King - ARM Linux [not found] ` <20120926104421.GA7040-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org> 2012-09-26 12:05 ` Arnd Bergmann 2012-09-26 12:05 ` Arnd Bergmann [not found] ` <201209261205.01351.arnd-r2nGTMty4D4@public.gmane.org> 2012-09-26 13:10 ` Domenico Andreoli 2012-09-26 13:10 ` Domenico Andreoli 2012-09-26 13:48 ` Tim Bird 2012-09-26 13:48 ` Tim Bird [not found] ` <506307A0.7010701-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org> 2012-09-26 14:17 ` Arnd Bergmann 2012-09-26 14:17 ` Arnd Bergmann [not found] ` <201209261417.18883.arnd-r2nGTMty4D4@public.gmane.org> 2012-09-26 14:48 ` Tim Bird 2012-09-26 14:48 ` Tim Bird [not found] ` <506315A6.3090300-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org> 2012-09-26 14:49 ` Arnd Bergmann 2012-09-26 14:49 ` Arnd Bergmann [not found] ` <201209261449.48468.arnd-r2nGTMty4D4@public.gmane.org> 2012-09-26 15:10 ` Russell King - ARM Linux 2012-09-26 15:10 ` Russell King - ARM Linux [not found] ` <20120926151023.GC30938-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org> 2012-09-26 15:34 ` Stephen Warren 2012-09-26 15:34 ` Stephen Warren [not found] ` <50632096.7080208-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2012-09-28 3:53 ` Nicolas Pitre 2012-09-28 3:53 ` Nicolas Pitre 2012-09-27 5:37 ` Jean-Christophe PLAGNIOL-VILLARD 2012-09-27 5:37 ` Jean-Christophe PLAGNIOL-VILLARD
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.