From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754549AbcCAP1H (ORCPT ); Tue, 1 Mar 2016 10:27:07 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:33922 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754327AbcCAP1F (ORCPT ); Tue, 1 Mar 2016 10:27:05 -0500 Subject: Re: [PATCH v4 0/4] ACPI: parse the SPCR table To: Aleksey Makarov , linux-acpi@vger.kernel.org References: <1456747355-15692-1-git-send-email-aleksey.makarov@linaro.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" From: Peter Hurley Message-ID: <56D5B4C4.4090405@hurleysoftware.com> Date: Tue, 1 Mar 2016 07:27:00 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1456747355-15692-1-git-send-email-aleksey.makarov@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's customary to cc reviewers of your previous series. Please review my comments to v3. Regards, Peter Hurley 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(). > > Use SPCR to tell if SBSA serial driver should use 32-bit access to registers. > > Based on the work by Leif Lindholm [3] > > Should be applied to next-20160229. > > Tested on QEMU. SPCR support is included in QEMU's ARM mach-virt > since 2.4 release. > > v4: > - drop patch "ACPI: change __init to __ref for early_acpi_os_unmap_memory()" > ACPI developers work on a new API and asked not to do that. > Instead, use acpi_get_table_with_size()/early_acpi_os_unmap_memory() once > and cache the result. (Lv Zheng) > - fix some style issues (Yury Norov) > > v3: > https://lkml.kernel.org/g/1455559532-8305-1-git-send-email-aleksey.makarov@linaro.org > > Greg Kroah-Hartman did not like v2 so I have rewritten this patchset: > > - drop acpi_match() member of struct console > - drop implementations of this member for pl011 and 8250 > - drop the patch that renames some vars in printk.c as it is not needed anymore > - drop patch that introduces system wide acpi_table_parse2(). > Instead introduce a custom acpi_table_parse_spcr() in spcr.c > > Instead of introducing a new match_acpi() member of struct console, > this patchset introduces a new function acpi_console_check(). > This function is called when a new uart is registered at serial_core.c > the same way OF code checks for console. If the registered uart is the > console specified by SPCR table, this function calls add_preferred_console() > > The restrictions of this approach are: > > - only serial consoles can be set up > - only consoles specified by the memory/io address can be set up > (SPCR can specify devices by PCI id/PCI address) > > v2: > https://lkml.kernel.org/g/1455299022-11641-1-git-send-email-aleksey.makarov@linaro.org > - don't use SPCR if user specified console in command line > - fix initialization order of newcon->index = 0 > - rename some variables at printk.c (Joe Perches, Peter Hurley) > - enable ACPI_SPCR_TABLE in a separate patch (Andy Shevchenko) > - remove the retry loop for console registering (Peter Hurley). > Instead, obtain SPCR with acpi_get_table(). That works after > call to acpi_early_init() i. e. in any *_initcall() > - describe design decision behind introducing acpi_match() (Peter Hurley) > - fix compilation for x86 + ACPI (Graeme Gregory) > - introduce DBG2 constants in a separate patch (Andy Shevchenko) > - fix a typo in DBG2 constants (Andy Shevchenko) > - add ACPI_DBG2_ARM_SBSA_32BIT constant (Christopher Covington) > - add support for ACPI_DBG2_ARM_SBSA_* consoles (Christopher Covington) > - add documentation for functions > - add a patch that uses SPCR to find if SBSA serial driver should use 32-bit > accessor functions (Christopher Covington) > - change __init to __ref for early_acpi_os_unmap_memory() in a separate patch > - introduce acpi_table_parse2() in a separate patch > - fix fetching the SPCR table early (Mark Salter) > - add a patch from Mark Salter that introduces support for matching 8250-based > consoles > > v1: > https://lkml.kernel.org/g/1453722324-22407-1-git-send-email-aleksey.makarov@linaro.org > > [1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0044a/index.html > [2] https://msdn.microsoft.com/en-us/library/windows/hardware/dn639132(v=vs.85).aspx > [3] https://lkml.kernel.org/g/1441716217-23786-1-git-send-email-leif.lindholm@linaro.org > > Aleksey Makarov (4): > ACPI: parse SPCR and enable matching console > ACPI: enable ACPI_SPCR_TABLE on ARM64 > ACPI: add definitions of DBG2 subtypes > serial: pl011: use ACPI SPCR to setup 32-bit access > > arch/arm64/Kconfig | 1 + > drivers/acpi/Kconfig | 3 + > drivers/acpi/Makefile | 1 + > drivers/acpi/spcr.c | 138 +++++++++++++++++++++++++++++++++++++++ > drivers/tty/serial/amba-pl011.c | 2 + > drivers/tty/serial/serial_core.c | 14 +++- > include/acpi/actbl2.h | 5 ++ > include/linux/acpi.h | 15 +++++ > 8 files changed, 177 insertions(+), 2 deletions(-) > create mode 100644 drivers/acpi/spcr.c >