* [PATCH 0/2] sh: Revive BIOS earlyprintk support
@ 2023-10-19 9:46 Geert Uytterhoeven
2023-10-19 9:46 ` [PATCH 1/2] sh: bios: Revive " Geert Uytterhoeven
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2023-10-19 9:46 UTC (permalink / raw)
To: Jonathan Corbet, Yoshinori Sato, Rich Felker,
John Paul Adrian Glaubitz, Paul Gortmaker, Thomas Gleixner,
Magnus Damm
Cc: linux-doc, linux-sh, linux-kernel, Geert Uytterhoeven
Hi all,
SuperH BIOS earlyprintk support was accidently disabled.
This series revives it, and records its existence in the documentation.
This was tested on landisk using "earlyprintk=bios" and
"earlyprintk=bios,keep".
Thanks for your comments!
Geert Uytterhoeven (2):
sh: bios: Revive earlyprintk support
Documentation: kernel-parameters: Add earlyprintk=bios on SH
Documentation/admin-guide/kernel-parameters.txt | 3 +++
arch/sh/Kconfig.debug | 11 +++++++++++
2 files changed, 14 insertions(+)
--
2.34.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/2] sh: bios: Revive earlyprintk support
2023-10-19 9:46 [PATCH 0/2] sh: Revive BIOS earlyprintk support Geert Uytterhoeven
@ 2023-10-19 9:46 ` Geert Uytterhoeven
2023-10-19 15:48 ` Randy Dunlap
2023-10-24 16:42 ` John Paul Adrian Glaubitz
2023-10-19 9:46 ` [PATCH 2/2] Documentation: kernel-parameters: Add earlyprintk=bios on SH Geert Uytterhoeven
` (2 subsequent siblings)
3 siblings, 2 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2023-10-19 9:46 UTC (permalink / raw)
To: Jonathan Corbet, Yoshinori Sato, Rich Felker,
John Paul Adrian Glaubitz, Paul Gortmaker, Thomas Gleixner,
Magnus Damm
Cc: linux-doc, linux-sh, linux-kernel, Geert Uytterhoeven
The SuperH BIOS earlyprintk code is protected by CONFIG_EARLY_PRINTK.
However, when this protection was added, it was missed that SuperH no
longer defines an EARLY_PRINTK config symbol since commit
e76fe57447e88916 ("sh: Remove old early serial console code V2"), so
BIOS earlyprintk can no longer be used.
Fix this by reviving the EARLY_PRINTK config symbol.
Fixes: d0380e6c3c0f6edb ("early_printk: consolidate random copies of identical code")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/sh/Kconfig.debug | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index c449e7c1b20ff5b5..8bcd6c1431a95be9 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -22,6 +22,17 @@ config STACK_DEBUG
every function call and will therefore incur a major
performance hit. Most users should say N.
+config EARLY_PRINTK
+ bool "Early printk"
+ depends on SH_STANDARD_BIOS
+ help
+ Say Y here to redirect kernel printk messages to the serial port
+ used by the SH-IPL bootloader, starting very early in the boot
+ process and ending when the kernel's serial console is initialised.
+ This option is only useful while porting the kernel to a new machine,
+ when the kernel may crash or hang before the serial console is
+ initialised. If unsure, say N.
+
config 4KSTACKS
bool "Use 4Kb for kernel stacks instead of 8Kb"
depends on DEBUG_KERNEL && (MMU || BROKEN) && !PAGE_SIZE_64KB
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/2] Documentation: kernel-parameters: Add earlyprintk=bios on SH
2023-10-19 9:46 [PATCH 0/2] sh: Revive BIOS earlyprintk support Geert Uytterhoeven
2023-10-19 9:46 ` [PATCH 1/2] sh: bios: Revive " Geert Uytterhoeven
@ 2023-10-19 9:46 ` Geert Uytterhoeven
2023-10-24 16:42 ` John Paul Adrian Glaubitz
2023-10-19 10:24 ` [PATCH 0/2] sh: Revive BIOS earlyprintk support John Paul Adrian Glaubitz
2023-10-25 14:54 ` John Paul Adrian Glaubitz
3 siblings, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2023-10-19 9:46 UTC (permalink / raw)
To: Jonathan Corbet, Yoshinori Sato, Rich Felker,
John Paul Adrian Glaubitz, Paul Gortmaker, Thomas Gleixner,
Magnus Damm
Cc: linux-doc, linux-sh, linux-kernel, Geert Uytterhoeven
Document the use of the "earlyprintk=bios[,keep]" kernel parameter
option on SuperH systems with a SuperH standard BIOS.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Documentation/admin-guide/kernel-parameters.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 657bb0b54e2fc6cf..8e7f6be051a0e1d3 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -1331,6 +1331,7 @@
earlyprintk=dbgp[debugController#]
earlyprintk=pciserial[,force],bus:device.function[,baudrate]
earlyprintk=xdbc[xhciController#]
+ earlyprintk=bios
earlyprintk is useful when the kernel crashes before
the normal console is initialized. It is not enabled by
@@ -1361,6 +1362,8 @@
The sclp output can only be used on s390.
+ The bios output can only be used on SuperH.
+
The optional "force" to "pciserial" enables use of a
PCI device even when its classcode is not of the
UART class.
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 0/2] sh: Revive BIOS earlyprintk support
2023-10-19 9:46 [PATCH 0/2] sh: Revive BIOS earlyprintk support Geert Uytterhoeven
2023-10-19 9:46 ` [PATCH 1/2] sh: bios: Revive " Geert Uytterhoeven
2023-10-19 9:46 ` [PATCH 2/2] Documentation: kernel-parameters: Add earlyprintk=bios on SH Geert Uytterhoeven
@ 2023-10-19 10:24 ` John Paul Adrian Glaubitz
2023-10-25 14:54 ` John Paul Adrian Glaubitz
3 siblings, 0 replies; 11+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-10-19 10:24 UTC (permalink / raw)
To: Geert Uytterhoeven, Jonathan Corbet, Yoshinori Sato, Rich Felker,
Paul Gortmaker, Thomas Gleixner, Magnus Damm
Cc: linux-doc, linux-sh, linux-kernel
Hi Geert!
On Thu, 2023-10-19 at 11:46 +0200, Geert Uytterhoeven wrote:
> SuperH BIOS earlyprintk support was accidently disabled.
> This series revives it, and records its existence in the documentation.
>
> This was tested on landisk using "earlyprintk=bios" and
> "earlyprintk=bios,keep".
>
> Thanks for your comments!
Thanks for catching this and fixing this! I will pick this up ASAP!
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] sh: bios: Revive earlyprintk support
2023-10-19 9:46 ` [PATCH 1/2] sh: bios: Revive " Geert Uytterhoeven
@ 2023-10-19 15:48 ` Randy Dunlap
2023-10-19 15:51 ` John Paul Adrian Glaubitz
2023-10-24 16:42 ` John Paul Adrian Glaubitz
1 sibling, 1 reply; 11+ messages in thread
From: Randy Dunlap @ 2023-10-19 15:48 UTC (permalink / raw)
To: Geert Uytterhoeven, Jonathan Corbet, Yoshinori Sato, Rich Felker,
John Paul Adrian Glaubitz, Paul Gortmaker, Thomas Gleixner,
Magnus Damm
Cc: linux-doc, linux-sh, linux-kernel
Hi,
On 10/19/23 02:46, Geert Uytterhoeven wrote:
> The SuperH BIOS earlyprintk code is protected by CONFIG_EARLY_PRINTK.
> However, when this protection was added, it was missed that SuperH no
> longer defines an EARLY_PRINTK config symbol since commit
> e76fe57447e88916 ("sh: Remove old early serial console code V2"), so
> BIOS earlyprintk can no longer be used.
>
> Fix this by reviving the EARLY_PRINTK config symbol.
>
> Fixes: d0380e6c3c0f6edb ("early_printk: consolidate random copies of identical code")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> arch/sh/Kconfig.debug | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
> index c449e7c1b20ff5b5..8bcd6c1431a95be9 100644
> --- a/arch/sh/Kconfig.debug
> +++ b/arch/sh/Kconfig.debug
> @@ -22,6 +22,17 @@ config STACK_DEBUG
> every function call and will therefore incur a major
> performance hit. Most users should say N.
>
> +config EARLY_PRINTK
> + bool "Early printk"
> + depends on SH_STANDARD_BIOS
> + help
> + Say Y here to redirect kernel printk messages to the serial port
> + used by the SH-IPL bootloader, starting very early in the boot
> + process and ending when the kernel's serial console is initialised.
> + This option is only useful while porting the kernel to a new machine,
Can we expect to see new machine ports using arch/sh/ ?
> + when the kernel may crash or hang before the serial console is
> + initialised. If unsure, say N.
> +
> config 4KSTACKS
> bool "Use 4Kb for kernel stacks instead of 8Kb"
> depends on DEBUG_KERNEL && (MMU || BROKEN) && !PAGE_SIZE_64KB
--
~Randy
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] sh: bios: Revive earlyprintk support
2023-10-19 15:48 ` Randy Dunlap
@ 2023-10-19 15:51 ` John Paul Adrian Glaubitz
2023-10-19 15:53 ` Randy Dunlap
2023-10-20 7:10 ` Geert Uytterhoeven
0 siblings, 2 replies; 11+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-10-19 15:51 UTC (permalink / raw)
To: Randy Dunlap, Geert Uytterhoeven, Jonathan Corbet, Yoshinori Sato,
Rich Felker, Paul Gortmaker, Thomas Gleixner, Magnus Damm
Cc: linux-doc, linux-sh, linux-kernel
Hello!
On Thu, 2023-10-19 at 08:48 -0700, Randy Dunlap wrote:
> > +config EARLY_PRINTK
> > + bool "Early printk"
> > + depends on SH_STANDARD_BIOS
> > + help
> > + Say Y here to redirect kernel printk messages to the serial port
> > + used by the SH-IPL bootloader, starting very early in the boot
> > + process and ending when the kernel's serial console is initialised.
> > + This option is only useful while porting the kernel to a new machine,
>
> Can we expect to see new machine ports using arch/sh/ ?
There is J-Core which is new open source hardware based on arch/sh.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] sh: bios: Revive earlyprintk support
2023-10-19 15:51 ` John Paul Adrian Glaubitz
@ 2023-10-19 15:53 ` Randy Dunlap
2023-10-20 7:10 ` Geert Uytterhoeven
1 sibling, 0 replies; 11+ messages in thread
From: Randy Dunlap @ 2023-10-19 15:53 UTC (permalink / raw)
To: John Paul Adrian Glaubitz, Geert Uytterhoeven, Jonathan Corbet,
Yoshinori Sato, Rich Felker, Paul Gortmaker, Thomas Gleixner,
Magnus Damm
Cc: linux-doc, linux-sh, linux-kernel
On 10/19/23 08:51, John Paul Adrian Glaubitz wrote:
> Hello!
>
> On Thu, 2023-10-19 at 08:48 -0700, Randy Dunlap wrote:
>>> +config EARLY_PRINTK
>>> + bool "Early printk"
>>> + depends on SH_STANDARD_BIOS
>>> + help
>>> + Say Y here to redirect kernel printk messages to the serial port
>>> + used by the SH-IPL bootloader, starting very early in the boot
>>> + process and ending when the kernel's serial console is initialised.
>>> + This option is only useful while porting the kernel to a new machine,
>>
>> Can we expect to see new machine ports using arch/sh/ ?
>
> There is J-Core which is new open source hardware based on arch/sh.
OK, thanks.
--
~Randy
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] sh: bios: Revive earlyprintk support
2023-10-19 15:51 ` John Paul Adrian Glaubitz
2023-10-19 15:53 ` Randy Dunlap
@ 2023-10-20 7:10 ` Geert Uytterhoeven
1 sibling, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2023-10-20 7:10 UTC (permalink / raw)
To: John Paul Adrian Glaubitz
Cc: Randy Dunlap, Jonathan Corbet, Yoshinori Sato, Rich Felker,
Paul Gortmaker, Thomas Gleixner, Magnus Damm, linux-doc, linux-sh,
linux-kernel
Hi Adrian,
On Thu, Oct 19, 2023 at 5:51 PM John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
> On Thu, 2023-10-19 at 08:48 -0700, Randy Dunlap wrote:
> > > +config EARLY_PRINTK
> > > + bool "Early printk"
> > > + depends on SH_STANDARD_BIOS
> > > + help
> > > + Say Y here to redirect kernel printk messages to the serial port
> > > + used by the SH-IPL bootloader, starting very early in the boot
> > > + process and ending when the kernel's serial console is initialised.
> > > + This option is only useful while porting the kernel to a new machine,
> >
> > Can we expect to see new machine ports using arch/sh/ ?
>
> There is J-Core which is new open source hardware based on arch/sh.
Do J-Core systems use the LinuxSH standard BIOS?
Still, it can be useful while converting existing SH systems to DT.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] sh: bios: Revive earlyprintk support
2023-10-19 9:46 ` [PATCH 1/2] sh: bios: Revive " Geert Uytterhoeven
2023-10-19 15:48 ` Randy Dunlap
@ 2023-10-24 16:42 ` John Paul Adrian Glaubitz
1 sibling, 0 replies; 11+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-10-24 16:42 UTC (permalink / raw)
To: Geert Uytterhoeven, Jonathan Corbet, Yoshinori Sato, Rich Felker,
Paul Gortmaker, Thomas Gleixner, Magnus Damm
Cc: linux-doc, linux-sh, linux-kernel
On Thu, 2023-10-19 at 11:46 +0200, Geert Uytterhoeven wrote:
> The SuperH BIOS earlyprintk code is protected by CONFIG_EARLY_PRINTK.
> However, when this protection was added, it was missed that SuperH no
> longer defines an EARLY_PRINTK config symbol since commit
> e76fe57447e88916 ("sh: Remove old early serial console code V2"), so
> BIOS earlyprintk can no longer be used.
>
> Fix this by reviving the EARLY_PRINTK config symbol.
>
> Fixes: d0380e6c3c0f6edb ("early_printk: consolidate random copies of identical code")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> arch/sh/Kconfig.debug | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
> index c449e7c1b20ff5b5..8bcd6c1431a95be9 100644
> --- a/arch/sh/Kconfig.debug
> +++ b/arch/sh/Kconfig.debug
> @@ -22,6 +22,17 @@ config STACK_DEBUG
> every function call and will therefore incur a major
> performance hit. Most users should say N.
>
> +config EARLY_PRINTK
> + bool "Early printk"
> + depends on SH_STANDARD_BIOS
> + help
> + Say Y here to redirect kernel printk messages to the serial port
> + used by the SH-IPL bootloader, starting very early in the boot
> + process and ending when the kernel's serial console is initialised.
> + This option is only useful while porting the kernel to a new machine,
> + when the kernel may crash or hang before the serial console is
> + initialised. If unsure, say N.
> +
> config 4KSTACKS
> bool "Use 4Kb for kernel stacks instead of 8Kb"
> depends on DEBUG_KERNEL && (MMU || BROKEN) && !PAGE_SIZE_64KB
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] Documentation: kernel-parameters: Add earlyprintk=bios on SH
2023-10-19 9:46 ` [PATCH 2/2] Documentation: kernel-parameters: Add earlyprintk=bios on SH Geert Uytterhoeven
@ 2023-10-24 16:42 ` John Paul Adrian Glaubitz
0 siblings, 0 replies; 11+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-10-24 16:42 UTC (permalink / raw)
To: Geert Uytterhoeven, Jonathan Corbet, Yoshinori Sato, Rich Felker,
Paul Gortmaker, Thomas Gleixner, Magnus Damm
Cc: linux-doc, linux-sh, linux-kernel
On Thu, 2023-10-19 at 11:46 +0200, Geert Uytterhoeven wrote:
> Document the use of the "earlyprintk=bios[,keep]" kernel parameter
> option on SuperH systems with a SuperH standard BIOS.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Documentation/admin-guide/kernel-parameters.txt | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 657bb0b54e2fc6cf..8e7f6be051a0e1d3 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -1331,6 +1331,7 @@
> earlyprintk=dbgp[debugController#]
> earlyprintk=pciserial[,force],bus:device.function[,baudrate]
> earlyprintk=xdbc[xhciController#]
> + earlyprintk=bios
>
> earlyprintk is useful when the kernel crashes before
> the normal console is initialized. It is not enabled by
> @@ -1361,6 +1362,8 @@
>
> The sclp output can only be used on s390.
>
> + The bios output can only be used on SuperH.
> +
> The optional "force" to "pciserial" enables use of a
> PCI device even when its classcode is not of the
> UART class.
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/2] sh: Revive BIOS earlyprintk support
2023-10-19 9:46 [PATCH 0/2] sh: Revive BIOS earlyprintk support Geert Uytterhoeven
` (2 preceding siblings ...)
2023-10-19 10:24 ` [PATCH 0/2] sh: Revive BIOS earlyprintk support John Paul Adrian Glaubitz
@ 2023-10-25 14:54 ` John Paul Adrian Glaubitz
3 siblings, 0 replies; 11+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-10-25 14:54 UTC (permalink / raw)
To: Geert Uytterhoeven, Jonathan Corbet, Yoshinori Sato, Rich Felker,
Paul Gortmaker, Thomas Gleixner, Magnus Damm
Cc: linux-doc, linux-sh, linux-kernel
On Thu, 2023-10-19 at 11:46 +0200, Geert Uytterhoeven wrote:
> Hi all,
>
> SuperH BIOS earlyprintk support was accidently disabled.
> This series revives it, and records its existence in the documentation.
>
> This was tested on landisk using "earlyprintk=bios" and
> "earlyprintk=bios,keep".
>
> Thanks for your comments!
>
> Geert Uytterhoeven (2):
> sh: bios: Revive earlyprintk support
> Documentation: kernel-parameters: Add earlyprintk=bios on SH
>
> Documentation/admin-guide/kernel-parameters.txt | 3 +++
> arch/sh/Kconfig.debug | 11 +++++++++++
> 2 files changed, 14 insertions(+)
>
Series applied for v6.7 to my sh-linux tree in the for-next branch.
Thanks,
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-10-25 14:54 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-19 9:46 [PATCH 0/2] sh: Revive BIOS earlyprintk support Geert Uytterhoeven
2023-10-19 9:46 ` [PATCH 1/2] sh: bios: Revive " Geert Uytterhoeven
2023-10-19 15:48 ` Randy Dunlap
2023-10-19 15:51 ` John Paul Adrian Glaubitz
2023-10-19 15:53 ` Randy Dunlap
2023-10-20 7:10 ` Geert Uytterhoeven
2023-10-24 16:42 ` John Paul Adrian Glaubitz
2023-10-19 9:46 ` [PATCH 2/2] Documentation: kernel-parameters: Add earlyprintk=bios on SH Geert Uytterhoeven
2023-10-24 16:42 ` John Paul Adrian Glaubitz
2023-10-19 10:24 ` [PATCH 0/2] sh: Revive BIOS earlyprintk support John Paul Adrian Glaubitz
2023-10-25 14:54 ` John Paul Adrian Glaubitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox