From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Hurley Subject: Re: [PATCH v4 0/4] ACPI: parse the SPCR table Date: Thu, 3 Mar 2016 07:35:40 -0800 Message-ID: <56D859CC.7010901@hurleysoftware.com> References: <1456747355-15692-1-git-send-email-aleksey.makarov@linaro.org> <56D5B5CB.7010702@hurleysoftware.com> <56D8272E.20705@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pf0-f171.google.com ([209.85.192.171]:35879 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755746AbcCCPfp (ORCPT ); Thu, 3 Mar 2016 10:35:45 -0500 Received: by mail-pf0-f171.google.com with SMTP id 63so16670380pfe.3 for ; Thu, 03 Mar 2016 07:35:45 -0800 (PST) In-Reply-To: <56D8272E.20705@gmail.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Aleksey Makarov , Aleksey Makarov , linux-acpi@vger.kernel.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King , Greg Kroah-Hartman , "Rafael J . Wysocki" , Leif Lindholm , Graeme Gregory , Al Stone , Christopher Covington , Yury Norov , "Zheng, Lv" On 03/03/2016 03:59 AM, Aleksey Makarov wrote: > > > On 03/01/2016 06:31 PM, Peter Hurley wrote: >> On 02/29/2016 04:02 AM, Aleksey Makarov wrote: >>> 'ARM Server Base Boot Requirements' [1] mentions SPCR (Serial Port >>> Console Redirection Table) [2] as a mandatory ACPI table that >>> specifies the configuration of serial console. >>> >>> Introduce a new function acpi_console_check(). At the uart port >>> registration, this function checks if the ACPI SPCR table specifies >>> its argument of type struct uart_port to be a console >>> and if so calls add_preferred_console(). >> >> How will a user enable an earlycon on the same console as the SPCR >> console if there is no DBG2 table? > > ... > [ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '') > [ 0.000000] bootconsole [pl11] enabled > ... > [ 0.000000] Kernel command line: root=/dev/vda1 rw systemd.show_status=no acpi=force earlycon=pl011,0x9000000 > ... > [ 0.318248] ACPI: SPCR: adding preferred console [ttyAMA0] > [ 0.318736] ARMH0011:00: ttyAMA0 at MMIO 0x9000000 (irq = 5, base_baud = 0) is a SBSA > [ 0.319502] console [ttyAMA0] enabled > [ 0.319502] console [ttyAMA0] enabled > [ 0.319933] bootconsole [pl11] disabled > [ 0.319933] bootconsole [pl11] disabled > ... > > Why? That's pretty disingenuous; via command line? By that measure, none of your patches are required because a user can already start both console and earlycon without them. With the console location specified in the SPCR, earlycon should be opt-in on the command-line simply with "earlycon" command-line parameter. From mboxrd@z Thu Jan 1 00:00:00 1970 From: peter@hurleysoftware.com (Peter Hurley) Date: Thu, 3 Mar 2016 07:35:40 -0800 Subject: [PATCH v4 0/4] ACPI: parse the SPCR table In-Reply-To: <56D8272E.20705@gmail.com> References: <1456747355-15692-1-git-send-email-aleksey.makarov@linaro.org> <56D5B5CB.7010702@hurleysoftware.com> <56D8272E.20705@gmail.com> Message-ID: <56D859CC.7010901@hurleysoftware.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 03/03/2016 03:59 AM, Aleksey Makarov wrote: > > > On 03/01/2016 06:31 PM, Peter Hurley wrote: >> On 02/29/2016 04:02 AM, Aleksey Makarov wrote: >>> 'ARM Server Base Boot Requirements' [1] mentions SPCR (Serial Port >>> Console Redirection Table) [2] as a mandatory ACPI table that >>> specifies the configuration of serial console. >>> >>> Introduce a new function acpi_console_check(). At the uart port >>> registration, this function checks if the ACPI SPCR table specifies >>> its argument of type struct uart_port to be a console >>> and if so calls add_preferred_console(). >> >> How will a user enable an earlycon on the same console as the SPCR >> console if there is no DBG2 table? > > ... > [ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '') > [ 0.000000] bootconsole [pl11] enabled > ... > [ 0.000000] Kernel command line: root=/dev/vda1 rw systemd.show_status=no acpi=force earlycon=pl011,0x9000000 > ... > [ 0.318248] ACPI: SPCR: adding preferred console [ttyAMA0] > [ 0.318736] ARMH0011:00: ttyAMA0 at MMIO 0x9000000 (irq = 5, base_baud = 0) is a SBSA > [ 0.319502] console [ttyAMA0] enabled > [ 0.319502] console [ttyAMA0] enabled > [ 0.319933] bootconsole [pl11] disabled > [ 0.319933] bootconsole [pl11] disabled > ... > > Why? That's pretty disingenuous; via command line? By that measure, none of your patches are required because a user can already start both console and earlycon without them. With the console location specified in the SPCR, earlycon should be opt-in on the command-line simply with "earlycon" command-line parameter.