* [PATCH] ARM: Add config option DEBUG_DECOMPRESS_KERNEL
@ 2012-09-17 13:08 Maximilian Schwerin
2012-09-17 13:17 ` Domenico Andreoli
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Maximilian Schwerin @ 2012-09-17 13:08 UTC (permalink / raw)
To: linux-arm-kernel
This change allows preventing the message "Uncompressing Linux..." from
being sent to serial port. This is necessary if the primary serial port is
used for something other than kernel debugging (e.g. some external device
controlled by serial commands).
Signed-off-by: Maximilian Schwerin <mvs@tigris.de>
---
arch/arm/Kconfig.debug | 9 +++++++++
arch/arm/boot/compressed/misc.c | 4 ++++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index e968a52..96e90dc 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -46,6 +46,15 @@ config OLD_MCOUNT
depends on FUNCTION_TRACER && FRAME_POINTER
default y
+config DEBUG_DECOMPRESS_KERNEL
+ bool "Using serial port during decompressing kernel"
+ depends on DEBUG_KERNEL
+ default n
+ help
+ If you say Y here you will confirm the start and the end of
+ decompressing Linux seeing "Uncompressing Linux... " and
+ " done, booting the kernel.\n" on console.
+
config DEBUG_USER
bool "Verbose user fault messages"
help
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index 8e2a8fc..edf4a35 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -144,11 +144,15 @@ decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p,
arch_decomp_setup();
+#ifdef CONFIG_DEBUG_DECOMPRESS_KERNEL
putstr("Uncompressing Linux...");
+#endif /* CONFIG_DEBUG_DECOMPRESS_KERNEL */
ret = do_decompress(input_data, input_data_end - input_data,
output_data, error);
if (ret)
error("decompressor returned an error");
+#ifdef CONFIG_DEBUG_DECOMPRESS_KERNEL
else
putstr(" done, booting the kernel.\n");
+#endif /* CONFIG_DEBUG_DECOMPRESS_KERNEL */
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] ARM: Add config option DEBUG_DECOMPRESS_KERNEL
2012-09-17 13:08 [PATCH] ARM: Add config option DEBUG_DECOMPRESS_KERNEL Maximilian Schwerin
@ 2012-09-17 13:17 ` Domenico Andreoli
2012-09-17 13:37 ` AW: " Maximilian Schwerin
2012-09-17 17:29 ` Nicolas Pitre
2012-09-17 19:41 ` Russell King - ARM Linux
2 siblings, 1 reply; 6+ messages in thread
From: Domenico Andreoli @ 2012-09-17 13:17 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Sep 17, 2012 at 03:08:44PM +0200, Maximilian Schwerin wrote:
> This change allows preventing the message "Uncompressing Linux..." from
> being sent to serial port. This is necessary if the primary serial port is
> used for something other than kernel debugging (e.g. some external device
> controlled by serial commands).
Disabling CONFIG_DEBUG_LL doesn't work?
Regards,
Domenico
^ permalink raw reply [flat|nested] 6+ messages in thread
* AW: [PATCH] ARM: Add config option DEBUG_DECOMPRESS_KERNEL
2012-09-17 13:17 ` Domenico Andreoli
@ 2012-09-17 13:37 ` Maximilian Schwerin
0 siblings, 0 replies; 6+ messages in thread
From: Maximilian Schwerin @ 2012-09-17 13:37 UTC (permalink / raw)
To: linux-arm-kernel
> -----Urspr?ngliche Nachricht-----
> Von: Domenico Andreoli
> [mailto:domenico.andreoli.it at gmail.com] Im Auftrag von
> Domenico Andreoli
> Gesendet: Montag, 17. September 2012 15:17
> An: Maximilian Schwerin
> Cc: linux-arm-kernel at lists.infradead.org
> Betreff: Re: [PATCH] ARM: Add config option DEBUG_DECOMPRESS_KERNEL
>
> On Mon, Sep 17, 2012 at 03:08:44PM +0200, Maximilian Schwerin wrote:
> > This change allows preventing the message "Uncompressing
> Linux..." from
> > being sent to serial port. This is necessary if the primary
> serial port is
> > used for something other than kernel debugging (e.g. some
> external device
> > controlled by serial commands).
>
> Disabling CONFIG_DEBUG_LL doesn't work?
>
> Regards,
> Domenico
>
No (never had that enabled), but that may be a bug or omission in the platform (omap3) code?!
Regards, m.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120917/101b00c3/attachment.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: Add config option DEBUG_DECOMPRESS_KERNEL
2012-09-17 13:08 [PATCH] ARM: Add config option DEBUG_DECOMPRESS_KERNEL Maximilian Schwerin
2012-09-17 13:17 ` Domenico Andreoli
@ 2012-09-17 17:29 ` Nicolas Pitre
2012-09-18 6:32 ` AW: " Maximilian Schwerin
2012-09-17 19:41 ` Russell King - ARM Linux
2 siblings, 1 reply; 6+ messages in thread
From: Nicolas Pitre @ 2012-09-17 17:29 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 17 Sep 2012, Maximilian Schwerin wrote:
> This change allows preventing the message "Uncompressing Linux..." from
> being sent to serial port. This is necessary if the primary serial port is
> used for something other than kernel debugging (e.g. some external device
> controlled by serial commands).
>
> Signed-off-by: Maximilian Schwerin <mvs@tigris.de>
> ---
> arch/arm/Kconfig.debug | 9 +++++++++
> arch/arm/boot/compressed/misc.c | 4 ++++
> 2 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index e968a52..96e90dc 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -46,6 +46,15 @@ config OLD_MCOUNT
> depends on FUNCTION_TRACER && FRAME_POINTER
> default y
>
> +config DEBUG_DECOMPRESS_KERNEL
> + bool "Using serial port during decompressing kernel"
> + depends on DEBUG_KERNEL
> + default n
> + help
> + If you say Y here you will confirm the start and the end of
> + decompressing Linux seeing "Uncompressing Linux... " and
> + " done, booting the kernel.\n" on console.
First, "default n" is the default already, so you don't need to provide
it.
Next, this is going to disable the output by default for everyone which
is an unwelcome change. You should make sure that the default behavior
is like before, and that the option allows you to disable the output.
And then the DEBUG_DECOMPRESS_KERNEL option is a rather bad name. This
output has not been considered "debugging" before. What about
"INHIBIT_DECOMPRESSOR_OUTPUT" instead?
> diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
> index 8e2a8fc..edf4a35 100644
> --- a/arch/arm/boot/compressed/misc.c
> +++ b/arch/arm/boot/compressed/misc.c
> @@ -144,11 +144,15 @@ decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p,
>
> arch_decomp_setup();
>
> +#ifdef CONFIG_DEBUG_DECOMPRESS_KERNEL
> putstr("Uncompressing Linux...");
> +#endif /* CONFIG_DEBUG_DECOMPRESS_KERNEL */
> ret = do_decompress(input_data, input_data_end - input_data,
> output_data, error);
> if (ret)
> error("decompressor returned an error");
> +#ifdef CONFIG_DEBUG_DECOMPRESS_KERNEL
> else
> putstr(" done, booting the kernel.\n");
> +#endif /* CONFIG_DEBUG_DECOMPRESS_KERNEL */
That would be cleaner if you simply redefined putstr() to an empty stub.
Similarly for error() which still can output to the same UART.
Nicolas
^ permalink raw reply [flat|nested] 6+ messages in thread
* AW: [PATCH] ARM: Add config option DEBUG_DECOMPRESS_KERNEL
2012-09-17 17:29 ` Nicolas Pitre
@ 2012-09-18 6:32 ` Maximilian Schwerin
0 siblings, 0 replies; 6+ messages in thread
From: Maximilian Schwerin @ 2012-09-18 6:32 UTC (permalink / raw)
To: linux-arm-kernel
> -----Urspr?ngliche Nachricht-----
> Von: Nicolas Pitre [mailto:nico at fluxnic.net]
> Gesendet: Montag, 17. September 2012 19:30
> An: Maximilian Schwerin
> Cc: linux-arm-kernel at lists.infradead.org
> Betreff: Re: [PATCH] ARM: Add config option DEBUG_DECOMPRESS_KERNEL
>
> On Mon, 17 Sep 2012, Maximilian Schwerin wrote:
>
> > This change allows preventing the message "Uncompressing
> Linux..." from
> > being sent to serial port. This is necessary if the primary
> serial port is
> > used for something other than kernel debugging (e.g. some
> external device
> > controlled by serial commands).
> >
> > Signed-off-by: Maximilian Schwerin <mvs@tigris.de>
> > ---
> > arch/arm/Kconfig.debug | 9 +++++++++
> > arch/arm/boot/compressed/misc.c | 4 ++++
> > 2 files changed, 13 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> > index e968a52..96e90dc 100644
> > --- a/arch/arm/Kconfig.debug
> > +++ b/arch/arm/Kconfig.debug
> > @@ -46,6 +46,15 @@ config OLD_MCOUNT
> > depends on FUNCTION_TRACER && FRAME_POINTER
> > default y
> >
> > +config DEBUG_DECOMPRESS_KERNEL
> > + bool "Using serial port during decompressing kernel"
> > + depends on DEBUG_KERNEL
> > + default n
> > + help
> > + If you say Y here you will confirm the start and the end of
> > + decompressing Linux seeing "Uncompressing Linux... " and
> > + " done, booting the kernel.\n" on console.
>
> First, "default n" is the default already, so you don't need
> to provide
> it.
Makes sense.
> Next, this is going to disable the output by default for
> everyone which
> is an unwelcome change. You should make sure that the
> default behavior
> is like before, and that the option allows you to disable the output.
>
> And then the DEBUG_DECOMPRESS_KERNEL option is a rather bad
> name. This
> output has not been considered "debugging" before. What about
> "INHIBIT_DECOMPRESSOR_OUTPUT" instead?
This is something I copied from arch/mn10300/Kconfig.debug (see http://kernel.org/doc/menuconfig/arch-mn10300-Kconfig.debug.html).
> > diff --git a/arch/arm/boot/compressed/misc.c
> b/arch/arm/boot/compressed/misc.c
> > index 8e2a8fc..edf4a35 100644
> > --- a/arch/arm/boot/compressed/misc.c
> > +++ b/arch/arm/boot/compressed/misc.c
> > @@ -144,11 +144,15 @@ decompress_kernel(unsigned long
> output_start, unsigned long free_mem_ptr_p,
> >
> > arch_decomp_setup();
> >
> > +#ifdef CONFIG_DEBUG_DECOMPRESS_KERNEL
> > putstr("Uncompressing Linux...");
> > +#endif /* CONFIG_DEBUG_DECOMPRESS_KERNEL */
> > ret = do_decompress(input_data, input_data_end - input_data,
> > output_data, error);
> > if (ret)
> > error("decompressor returned an error");
> > +#ifdef CONFIG_DEBUG_DECOMPRESS_KERNEL
> > else
> > putstr(" done, booting the kernel.\n");
> > +#endif /* CONFIG_DEBUG_DECOMPRESS_KERNEL */
>
> That would be cleaner if you simply redefined putstr() to an
> empty stub.
> Similarly for error() which still can output to the same UART.
>
>
> Nicolas
>
Thanks for the feedback both of you. I'll get into contact with the OMAP guys and will try to find a fix on the platform level.
Cheers, m.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120918/ca648346/attachment-0001.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: Add config option DEBUG_DECOMPRESS_KERNEL
2012-09-17 13:08 [PATCH] ARM: Add config option DEBUG_DECOMPRESS_KERNEL Maximilian Schwerin
2012-09-17 13:17 ` Domenico Andreoli
2012-09-17 17:29 ` Nicolas Pitre
@ 2012-09-17 19:41 ` Russell King - ARM Linux
2 siblings, 0 replies; 6+ messages in thread
From: Russell King - ARM Linux @ 2012-09-17 19:41 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Sep 17, 2012 at 03:08:44PM +0200, Maximilian Schwerin wrote:
> This change allows preventing the message "Uncompressing Linux..." from
> being sent to serial port. This is necessary if the primary serial port is
> used for something other than kernel debugging (e.g. some external device
> controlled by serial commands).
You know, it doesn't have to go to the serial port. It can go to
anything. We have at least one platform where it goes to the framebuffer
instead, but getting access to the framebuffer is a whole new load of
platform dependence that we don't want here.
In any case, ifdefing out the callsites is not the correct approach.
We already have this stuff fairly well abstracted, and there's no reason
why this can't be done by defining empty putc() and flush() functions.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-09-18 6:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-17 13:08 [PATCH] ARM: Add config option DEBUG_DECOMPRESS_KERNEL Maximilian Schwerin
2012-09-17 13:17 ` Domenico Andreoli
2012-09-17 13:37 ` AW: " Maximilian Schwerin
2012-09-17 17:29 ` Nicolas Pitre
2012-09-18 6:32 ` AW: " Maximilian Schwerin
2012-09-17 19:41 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).