Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp229220rdb; Thu, 19 Oct 2023 02:47:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEGbOaTmhivNjBI+aROON0EKDPGLTOnd+/HLdAISTbRO3Mj2sB7D+Sc94ZxA22/4rE7+218 X-Received: by 2002:a05:6a00:848:b0:6bc:b13c:35d5 with SMTP id q8-20020a056a00084800b006bcb13c35d5mr1426039pfk.13.1697708825400; Thu, 19 Oct 2023 02:47:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697708825; cv=none; d=google.com; s=arc-20160816; b=Q2hpb0pE0P2fcVtFax4vOJq/rNIxnMqK0wI4mnpSM0BIU8T1i4JaBFOeF/tKWI07dw cJDgLjYkYVF6vNUScZpeWFs+KqyzZNZTtc64xXI3qI4V08oLHsr1Si3NVV7Otprmph9T crpSG7j6fMAMiiq8eoIR9Gx1HmRF9aT98DQyjlXiCQUQ+eol816ZbBHQ7JFqpub6OHQy rGo2RdvZyh1ZFL8K3tXD9vsXnkwyplRI0N4ZzMlXf1AXHRpgtn/Y/1IcS1Otmnz+Oc5J mzbSl2UbWzAAUHd6Olz2KOf3taIle3jEXkjrFw5RWh88hFR06YK2QpWtUQip/E/Fsoxi Dljg== 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 Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id bw18-20020a056a02049200b0056952b496efsi4527078pgb.366.2023.10.19.02.47.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 02:47:05 -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 316D58083E4E; Thu, 19 Oct 2023 02:47:01 -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 S1345019AbjJSJqy (ORCPT + 99 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 ); 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 ; 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 ) 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 ) id 1qtPc5-00D4Zv-9M; Thu, 19 Oct 2023 11:46:45 +0200 From: Geert Uytterhoeven To: Jonathan Corbet , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , Paul Gortmaker , Thomas Gleixner , Magnus Damm Cc: linux-doc@vger.kernel.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/2] sh: bios: Revive earlyprintk support Date: Thu, 19 Oct 2023 11:46:43 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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: 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:01 -0700 (PDT) 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 --- 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