From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95F16C4321D for ; Thu, 16 Aug 2018 15:33:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C43621486 for ; Thu, 16 Aug 2018 15:33:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C43621486 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392027AbeHPSc0 (ORCPT ); Thu, 16 Aug 2018 14:32:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:40692 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725808AbeHPSc0 (ORCPT ); Thu, 16 Aug 2018 14:32:26 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B6C2020C0A; Thu, 16 Aug 2018 15:33:12 +0000 (UTC) Date: Thu, 16 Aug 2018 11:33:11 -0400 From: Steven Rostedt To: Prarit Bhargava Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Mark Salter , Al Stone , "Rafael J. Wysocki" , Len Brown , Pavel Machek , x86@kernel.org, Petr Mladek , Sergey Senozhatsky , Kees Cook , linux-pm@vger.kernel.org Subject: Re: [PATCH] console: Add console=auto option Message-ID: <20180816113311.676971d0@gandalf.local.home> In-Reply-To: <4335912e-dab7-c516-d71e-47ed479c638a@redhat.com> References: <20180816141055.451-1-prarit@redhat.com> <20180816150948.GA10648@kroah.com> <4335912e-dab7-c516-d71e-47ed479c638a@redhat.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 16 Aug 2018 11:28:24 -0400 Prarit Bhargava wrote: > On 08/16/2018 11:09 AM, Greg Kroah-Hartman wrote: > > On Thu, Aug 16, 2018 at 10:10:55AM -0400, Prarit Bhargava wrote: > >> ACPI may contain an SPCR table that defines a default system console. > >> On ARM if the table is present then the SPCR console is enabled by default. > >> On x86 the SPCR console is used if 'earlycon' (no parameters) is > >> specified as a kernel parameter and is used only as the early console. > >> To use the SPCR data as a console a user must boot with 'earlycon', > >> grep logs & specify a console= kernel parameter, and then reboot again. > >> > >> Add 'console=auto' that enables a firmware or hardware console, and on > >> x86 enable the SPCR console if 'console=auto' is specified. > >> > >> Tested on systems with and without an ACPI SPCR. The following kernel > >> parameters were also tested: > >> > >> console=ttyS0,115200 works > >> earlycon works (early console only) > >> console=auto works (full console as expected) > >> no console or earlycon arguments works (no output as expected) > >> > >> Signed-off-by: Prarit Bhargava > >> Cc: Mark Salter > >> Cc: Al Stone > >> Cc: "Rafael J. Wysocki" > >> Cc: Len Brown > >> Cc: Pavel Machek > >> Cc: x86@kernel.org > >> Cc: Petr Mladek > >> Cc: Sergey Senozhatsky > >> Cc: Steven Rostedt > >> Cc: Kees Cook > >> Cc: Greg Kroah-Hartman > >> Cc: linux-pm@vger.kernel.org > >> --- > >> Documentation/admin-guide/kernel-parameters.txt | 1 + > >> arch/x86/kernel/acpi/boot.c | 5 +++++ > >> include/linux/console.h | 1 + > >> kernel/printk/printk.c | 10 ++++++++++ > >> 4 files changed, 17 insertions(+) > >> > >> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > >> index a32f2a126791..dd057224f33b 100644 > >> --- a/Documentation/admin-guide/kernel-parameters.txt > >> +++ b/Documentation/admin-guide/kernel-parameters.txt > >> @@ -635,6 +635,7 @@ > >> > >> hvc Use the hypervisor console device . This is for > >> both Xen and PowerPC hypervisors. > >> + auto [X86] Enable ACPI SPCR console > >> > >> If the device connected to the port is not a TTY but a braille > >> device, prepend "brl," before the device type, for instance > >> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c > >> index 3b20607d581b..fb2616ba3b21 100644 > >> --- a/arch/x86/kernel/acpi/boot.c > >> +++ b/arch/x86/kernel/acpi/boot.c > >> @@ -1771,3 +1771,8 @@ void __init arch_reserve_mem_area(acpi_physical_address addr, size_t size) > >> e820__range_add(addr, size, E820_TYPE_ACPI); > >> e820__update_table_print(); > >> } > >> + > >> +void __init arch_console_setup(void) > >> +{ > >> + acpi_parse_spcr(false, true); > >> +} > > > > > > > >> +int arch_console_setup(void); > > > > Function does not match its prototype :( > > > > How did you build this successfully? > > Weird, it compiles on my system? Are you compiling with ACPI enabled? It would still compile without it and use the properly prototyped "weak" function. -- Steve > > I'll fix it though. >