Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp974056lqs; Fri, 14 Jun 2024 10:46:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWKujsFITWbeKXK8EvyZ/9NPo4cQGsgQteuMIgtiAE2jiMrTfdg3vc1CRaN/CGI24M+3pMlLCQdGe8usuHXGJRjZ1dOUDvUQo6ejLDZEQ== X-Google-Smtp-Source: AGHT+IGoAwWvxh+y8A1ghQKbbMZZ+EOUCkPT1vBVdkpM84wffGVhrZOfVdivbZj4hO0atTSf2rjU X-Received: by 2002:a05:6a00:3d55:b0:705:ddb0:5260 with SMTP id d2e1a72fcca58-705ddb05420mr2811286b3a.0.1718387198565; Fri, 14 Jun 2024 10:46:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718387198; cv=pass; d=google.com; s=arc-20160816; b=kjrB9sK0Leeqmy6rYfaXC2pBw3JltuctV1YPv6pZ3IfCr9U9kdtL0A5HvK2ClahSbF YgX5ydj8uC2R3jonEKoLJV1IxTVQ5zz7pruS2yTJkd1DK69z97gJsYDHGwrRf9tcTA1u FF1kwKa6q9jzkLFLhA1hlTfqa1erRUhJ0xmXDi5B4expQB7twGEMv0fNgNF2rWAfHTBp rffCn0t/DvqPGC5EPHchcTb4QqIsOhtWc/+VVvakflkxjlJS1Hpz5GQl/PkiVPeFR3bu OP5gzRpl9bmb3mtVHU5qb5E6jRssNOvQLh+U/i0PrFEHVEdTr8CmnLSo8Ndu9RgLLM9F QjDw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xGKaapsSeNQ6/aDBUFIiYP/WXTn0IiML89dBYrB59AE=; fh=XdKhkqsg511fwmj5Ff3ck1VPEJzJWlKxCIcENTUZqHM=; b=vli4yhpNcKxPPnFHe/5TfsFsnu2QhMxWPpx2baLNpCuQfTFVwn1tivA7eFV8wAZXOE IwHx16HudYSprfjMmsn5R5PfoiB0eeNuXCz5pIcgife9qYUDUou/dS8zSyxMci8YxtA/ rs4lCx4zN9v1keUQezecbDEwnUP5/43YlLC2us7NAlJBSMa6hPo9oBaS6Xs+I7VYZ6A/ TCeRz3+Ml/TzuOhr5QtMsfrUCYcn3qZUdBx52OSbNZdCH1HvKLU+yRjRsIPELX2OVeYq P5BUWvtCIcV2QU1l7XTDMayv1eeYaPtSuefqIe1h8rTlK+WqFBdGzcqaJYJz+BkbxQh2 4A3g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=e75WSjAI; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-215334-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215334-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-705ccb9c4e9si3969432b3a.315.2024.06.14.10.46.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 10:46:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215334-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=e75WSjAI; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-215334-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215334-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C5B34B29D3E for ; Fri, 14 Jun 2024 17:19:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5535D19DF41; Fri, 14 Jun 2024 17:18:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="e75WSjAI" Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66B8216D4EB for ; Fri, 14 Jun 2024 17:18:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718385504; cv=none; b=QP21bDHCw7wGaT9ypJ+dJp9xl4+VA9PKlraTkseJP0x5iSoVpY197MwFXHPHaPkPXbNSqZrUbpOlE+GpLubTsVAGcE4uMbL8jMHCJWU97jHr4hCXz52oH82s4YJLl9ePGxzMB3PPEmavPzMZdeqHn+2m+Tazr1u782cRXhBKQF8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718385504; c=relaxed/simple; bh=RbQiXk//5LE0+CQFSTyMsBkvBONsF/BYSpqN0fdUO34=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TkITU/8ddg97nP2hc+opXitdrMI4SY+RyozoQDXPjBfF5u7bQyc66WIgH5LwsYhFZoCSShMSreWdMEKRMRNGU8GrJ12rjdp7p1i7Jr0GhNquo2Oo0t75ZI82PmlZYiKK+hEs7SZN+DR0BEdtknzSExymdutqFsy4SbW/iQBn4IU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=e75WSjAI; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a6f0e153eddso329415566b.0 for ; Fri, 14 Jun 2024 10:18:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1718385501; x=1718990301; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=xGKaapsSeNQ6/aDBUFIiYP/WXTn0IiML89dBYrB59AE=; b=e75WSjAIOWwSXEtKPZgiqQvXtdth5VESQoe0nlW+FreKOL4DUzKW3OzL9rzKrUa5T4 PwfdrxJojL5jAG8nOheCoGqR5EApOxCKUIk95AtI5p95HkDnfbp+rg6KzP0StjMV/uYO HPIVu5kPxEht8x4z38908/p7LjEMCS073Sz1yKvMCi6KoGXW3P/mCq0ACC/7z7OghVia 8lEK9M3jOU4eb14xxfacR8uZKRhPbdKCYE970Fc9c+CytkslfhrsywUoMYHVAIjzxly/ Lg/UW23YUERHR+5TNUGGFkBlv8BRQvIVfUxDXKjXLWY1vNaCexbv+vLXIdYNmFmhU1Yo b3PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718385501; x=1718990301; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xGKaapsSeNQ6/aDBUFIiYP/WXTn0IiML89dBYrB59AE=; b=s4N3SQWCugghpTq2sV5UTWwLguJZDhcf8YEHX1zQTGop7TLESHe4fLaRP9pNHcg/Cw /+BIj7sEwosYcyleN3uoXXY4IWtDGSQDB0H2W6U6fG1IA9hLNXTdtXrlyET07JQ0Fv7S vXQWwQ91uKiVf51Vj9yLmWaTmz5BQAHqCjyU+v9THg0aug9s20fcvBtwhaGAMbSnGZLm oBaKztfoZypngbP2DIZ6VByEQNJoHBmeZKfJb173zlK6OJcke79+92GjuLsP2gJZfeBC q7m4nXgWIEyo+eAUMWAAewmpWI6a0p0MSg9k027z3JDJtxVoWMaitReLy0YTbe9wVIRW bBvQ== X-Forwarded-Encrypted: i=1; AJvYcCVqbe1XWlXQACUxqOdBboxKfJBv8TiBYbiE7WzKNw+2JWvKa4RymeUYcq6lP4mTe7zktuwRxAuoDTivxa2fzaI1zVo6UzYQPvU7597j X-Gm-Message-State: AOJu0Yz1QW1RWyMqQbtSo0a2sQc9iyRkoPTGonw+cY7Jjk6UiCQ/+647 Fvrsv/4mACHQwFp4o1PY1bT0UKziFozrgyyOvomMPaljwvSV1EEkNOF4Z5fAauA= X-Received: by 2002:a17:906:5648:b0:a6f:ce5:2875 with SMTP id a640c23a62f3a-a6f60dc5169mr224168366b.50.1718385500681; Fri, 14 Jun 2024 10:18:20 -0700 (PDT) Received: from pathway.suse.cz (nat2.prg.suse.com. [195.250.132.146]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56db6743sm205257466b.90.2024.06.14.10.18.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 10:18:20 -0700 (PDT) Date: Fri, 14 Jun 2024 19:18:18 +0200 From: Petr Mladek To: Tony Lindgren Cc: Greg Kroah-Hartman , Jiri Slaby , Steven Rostedt , John Ogness , Sergey Senozhatsky , Andy Shevchenko , Tony Lindgren , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] printk: Revert add_preferred_console_match() related commits Message-ID: References: <20240613125113.219700-1-tony.lindgren@linux.intel.com> <20240613125113.219700-2-tony.lindgren@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240613125113.219700-2-tony.lindgren@linux.intel.com> On Thu 2024-06-13 15:51:07, Tony Lindgren wrote: > Recent changes to allow using DEVNAME:0.0 style console names caused a > regression to the kernel command line handling for the console options. > > The last preferred console added gets used for init. This is documented > in the comments for add_preferred_console(). Now the kernel command line > options for console=ttyS0,115200 console=tty0 are wrongly handled and > cause the /dev/console to be associated with ttyS0 instead of tty0. > > This happens because we are calling __add_preferred_console() later on > from serial8250_isa_init_ports() after console_setup() and the console > gets treated as the last added preferred console. As the DEVNAME:0.0 style > console device is not known at console_setup() time, I added a call to > __add_preferred_console() later on when the console is ready. > > To fix the issue, let's revert the printk related commits: > > f03e8c1060f8 ("printk: Save console options for add_preferred_console_match()") > b73c9cbe4f1f ("printk: Flag register_console() if console is set on command line") > 8a831c584e6e ("printk: Don't try to parse DEVNAME:0.0 console options") > > We need to also drop the call for add_preferred_console_match() from > serial_base_add_one_prefcon() added by commit 787a1cabac01 ("serial: core: > Add support for DEVNAME:0.0 style naming for kernel console"). > > Petr has suggested a better way to handle the deferred consoles that does > not rely on calling __add_preferred_console() again. > > Reported-by: Petr Mladek > Link: https://lore.kernel.org/linux-serial/ZlC6_Um4P4b-_WQE@pathway.suse.cz/ > Fixes: f03e8c1060f8 ("printk: Save console options for add_preferred_console_match()") > Signed-off-by: Tony Lindgren It seems that it really reverts the right parts. Reviewed-by: Petr Mladek Best Regards, Petr