Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1590292

Re: [PATCH] tty: serial: pl011: add ttyAMA for matching pl011 console

Path csiph.com!weretis.net!feeder6.news.weretis.net!news.glorb.com!bofh.it!news.nic.it!robomod
From Aleksey Makarov <amakarov.linux@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] tty: serial: pl011: add ttyAMA for matching pl011 console
Date Wed, 01 Mar 2017 13:10:02 +0100
Message-ID <tgbeW-2ST-3@gated-at.bofh.it> (permalink)
References <t65kt-7KL-7@gated-at.bofh.it>
X-Original-To Sudeep Holla <sudeep.holla@arm.com>, linux-serial@vger.kernel.org
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=w8VByaOSWsRt8M+FljwI4YvBRUoDRV9BSL9I9f5m1dQ=; b=Bf+aAutp1VZrdJHM7yjuZrG8fR8kS3Y0RMR51ftVhQvrbc/ubOB1xbl2mSHzyrf9fn 9VFYUg9sV8mZ1YtNM0/THzkT+B8kPnfMPVEyw+u2ZU6hcFd7r8pylnVO7fx3bqGlE4eF DVUAQ8jUGtv1MTR/PkaJo8W+6RRD9N5uIFhxHbSObUP7ZzHKwaVzQbTUIrnJ3B41pFe1 EKo8OYn+SseYvCfNvpgbp+adyWFVE6ewuaXRZeI3Twi9b3fIowP6cUcIn8+tdUd0TxIn VaTWNTnn21gvg0aUH1cmQeDxt1ZwSiovWMfFwq/E0EjzUAIp7ZsdeOluvwT8f5ZrN+bT a+uw==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=w8VByaOSWsRt8M+FljwI4YvBRUoDRV9BSL9I9f5m1dQ=; b=mLXGQ8uLrdQDpMWzmEz42R593euCeuNYdTTzSMPWdDo+JXNe+c/LuOjX6jy1HAb8iS WjPYgddYJfWDscnxP7wYd3oxmgdTvF4YqbLV2RqdxG6MyiCVDzWLf/WKKsukjGBU3jrB MNZmv/JteyAU7x3XJ5jbe+4cDKp8y8cpAJufu3OP9jTSIEYVyp3msEgdxr99rd9SLtuD tg2zjphJx+PA90KvEYfPdSlYchnvX/2eJLTDcWUi3H6/m9kW3Fvk502IfylCtlPl4Yg+ WaS1ABnfpl7BVfVShqgP1OVSVeRSNTMRgpu2PjYFBaO7S+zNk4EbAWXC3cFJwfUCX9uw oDIQ==
X-Gm-Message-State AMke39msnVnqHsYqO8Tnw8E3kOpX8iu9pw/0MfuZq+YlzDKEfghtauLYps0/LCGsOR8Psg==
X-Received by 10.46.8.18 with SMTP id 18mr2741504lji.35.1488369305591; Wed, 01 Mar 2017 03:55:05 -0800 (PST)
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1
MIME-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 8bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 65
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, Russell King <linux@armlinux.org.uk>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jslaby@suse.com>, Peter Hurley <peter@hurleysoftware.com>, Aleksey Makarov <aleksey.makarov@linaro.org>
X-Original-Date Wed, 1 Mar 2017 14:51:53 +0300
X-Original-Message-ID <8a7074e1-b106-1847-f045-6400d6832110@gmail.com>
X-Original-References <1485963998-921-1-git-send-email-sudeep.holla@arm.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1590292

Show key headers only | View raw



On 02/01/2017 06:46 PM, Sudeep Holla wrote:
> Commit c7cef0a84912 ("console: Add extensible console matching") added
> match() method to struct console which allows the console to perform
> console command line matching instead of (or in addition to) default
> console matching (ie., by fixed name and index).
> 
> Commit ad1696f6f09d ("ACPI: parse SPCR and enable matching console")
> introduced support for SPCR as matching console.
> 
> Commit 10879ae5f12e ("serial: pl011: add console matching function")
> added the match method for pl011 console which checks for the console
> string to be "pl011"
> 
> Now on a platform which has both SPCR in the ACPI tables and ttyAMA in
> the command line, the ttyAMA is chosen as "selected console" but it
> doesn't pass the matching console method which results in CON_CONSDEV
> not being set on the "selected console".
> 
> As a result of that, the bootconsole(SPCR in the above case) is not
> unregistered and all the beginning boot messages are seen twice.
> 
> This patch adds "ttyAMA" so that it's considered to match pl011 console.
> 
> Fixes: 10879ae5f12e ("serial: pl011: add console matching function")
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jslaby@suse.com>
> Cc: Peter Hurley <peter@hurleysoftware.com>
> Cc: Aleksey Makarov <aleksey.makarov@linaro.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  drivers/tty/serial/amba-pl011.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index 963c2e5feedd..533b18d4a587 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -2340,7 +2340,7 @@ static int __init pl011_console_match(struct console *co, char *name, int idx,
>  	resource_size_t addr;
>  	int i;
> 
> -	if (strcmp(name, "pl011") != 0)
> +	if (strcmp(name, "pl011") != 0 || strcmp(name, "ttyAMA") != 0)

So the condition is always true now?

The patch is obviously wrong and should be reverted ASAP.

Thank you
Aleksey Makarov

>  		return -ENODEV;
> 
>  	if (uart_parse_earlycon(options, &iotype, &addr, &options))
> --
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-serial" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] tty: serial: pl011: add ttyAMA for matching pl011 console Aleksey Makarov <amakarov.linux@gmail.com> - 2017-03-01 13:10 +0100

csiph-web