Message ID | c40972dfec3dcc6719808d5df388857360262878.1697708489.git.geert+renesas@glider.be |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp266569vqb; Thu, 19 Oct 2023 02:47:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFI3GYk2j/VUbICpLOjmmMbi0efoOX8YBWCYNrs1VrczBSJIgdMntR2LfmuUnXZceUuZmBN X-Received: by 2002:a17:903:744:b0:1c0:bcbc:d64 with SMTP id kl4-20020a170903074400b001c0bcbc0d64mr1436309plb.51.1697708828548; Thu, 19 Oct 2023 02:47:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697708828; cv=none; d=google.com; s=arc-20160816; b=D8KLOBCg7SQ66VOSIMScY3u58Ca+POPBufHueMBTKlaI2smjgbtVfrpGORsCOUySPi +t29zYfEBc5O6+IookxH9qMaqTAXEmQYQDTtrUtDXP+HKK6SpxfOS24Ncl5wzY3TunJE zfJ3uGJnJdVyhQoVaQjWVJJFmfRq40cqQaCy3YJQjo6ZHvgsZv0jjEhTj8oGNhJILFPJ FY6r2nuyoNrMwuYEKBZvUvU2FUWpHOw2QsrhCtv7BwmlbR5lfvLtCiOpojvFm6l0qZsT ZDopBSNnxy3NqMVjMgwp7crBKuha8X7AaH5eboJEsa34kuqDIebX55bwydD7CxhP4gn8 ppBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=9reTZKhkFfZ82ZT960pyu0yizYfFpWLv36ONzD2pFro=; fh=1n1LJWCvJvm8B+sb/hEg4mCNIMUAZmGdEBbE6tR4NVo=; b=wkeGa04LwVmkL5qDFMe3WlqNTxQEb4OUM7hAK8epdUEqFOxkBiL7KboppclBszzbGO i1f3AL8nKQiRIE+Irgo8pS+2tgkhwPNThNhxZRyLsLvJJZtY+bDNu85XHwGRPeyOCc8L 84iWYyoqQi4bothR0smjPrawmXo4f8Wn0cnxsfEzQ5XpquAzYxatfaso26p88sWlqSbA +ZtFHF4nRuHw277JvpeyJ9NtFQIJt5jZk8CfJI5Cw133qQYQr9XpkA06y2QeT+/Fe3WQ AnHrmujezMiWvwLIs5q7DD/RSSPJ/abhoX3Ma5J/GSVuWd2RZwEEp5yukgi0yPaCbz4x q6IA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id u12-20020a17090341cc00b001c5e0672f53si1981937ple.466.2023.10.19.02.47.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 02:47:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 78AB3826BBAA; Thu, 19 Oct 2023 02:47:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345120AbjJSJqy (ORCPT <rfc822;zwp10758@gmail.com> + 24 others); Thu, 19 Oct 2023 05:46:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345035AbjJSJqx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 19 Oct 2023 05:46:53 -0400 Received: from andre.telenet-ops.be (andre.telenet-ops.be [IPv6:2a02:1800:120:4::f00:15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DCB618F for <linux-kernel@vger.kernel.org>; Thu, 19 Oct 2023 02:46:50 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:2008:f423:365a:a88b]) by andre.telenet-ops.be with bizsmtp id zlml2A0071ooZrg01lmlUF; Thu, 19 Oct 2023 11:46:47 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from <geert@linux-m68k.org>) id 1qtPc0-006w32-Vm; Thu, 19 Oct 2023 11:46:45 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from <geert@linux-m68k.org>) id 1qtPc5-00D4Zv-9M; Thu, 19 Oct 2023 11:46:45 +0200 From: Geert Uytterhoeven <geert+renesas@glider.be> To: Jonathan Corbet <corbet@lwn.net>, Yoshinori Sato <ysato@users.sourceforge.jp>, Rich Felker <dalias@libc.org>, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, Paul Gortmaker <paul.gortmaker@windriver.com>, Thomas Gleixner <tglx@linutronix.de>, Magnus Damm <magnus.damm@gmail.com> Cc: linux-doc@vger.kernel.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert+renesas@glider.be> Subject: [PATCH 1/2] sh: bios: Revive earlyprintk support Date: Thu, 19 Oct 2023 11:46:43 +0200 Message-Id: <c40972dfec3dcc6719808d5df388857360262878.1697708489.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: <cover.1697708489.git.geert+renesas@glider.be> References: <cover.1697708489.git.geert+renesas@glider.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 19 Oct 2023 02:47:06 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780176732477794757 X-GMAIL-MSGID: 1780176732477794757 |
Series |
sh: Revive BIOS earlyprintk support
|
|
Commit Message
Geert Uytterhoeven
Oct. 19, 2023, 9:46 a.m. UTC
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(+)
Comments
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
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
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.
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
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>
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