From nobody Mon Dec 1 22:02:19 2025 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 12EDF3054D7 for ; Thu, 27 Nov 2025 19:43:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764272605; cv=none; b=PtPWNCsxhbga+5TXfGqa98w77bM3najwiMgFBbYJAEYzPVEj8NDAPblTTA2vpxo3YUhzdvoCfFo8enNV4G9rmePxcCIwOic79Np/Tm3wjeuI18/ej1XNFXqBvjjLlteokyLCRQHD+fQ0R7P3A3iCIKNVb2wCqvgx0AYQ6uqqWbU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764272605; c=relaxed/simple; bh=pFonbZdkoDJgIJ8NyaA+K6xBjxLANQhO6P3h3mAC4B8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bLSmBhxFhf5ZJi26nYAD+h3WTPamdMVSOIdzXwF2gHMZG7hy2y0FhRdjfZvScRusitQUxTaweARDbPUpC6DwheEZFw7kPiEDYG0Z1FCBrLiCVkJVgJ4WSCWdrXqb8997cUOeAcO2HlBObA147cUi3byp8qv/ifxY3FF3AHdNiwY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=chrisdown.name; spf=pass smtp.mailfrom=chrisdown.name; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b=kv5TJaOf; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="kv5TJaOf" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-2956d816c10so13630015ad.1 for ; Thu, 27 Nov 2025 11:43:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; t=1764272603; x=1764877403; darn=vger.kernel.org; h=user-agent: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=AZbXku+QSkUQzgLp8ftnNXsoe+Eh23IRlTE31G2XjOs=; b=kv5TJaOfB+fHfXV3KiJ7GFaYQm0Z2cQWo0DWlFK5l+Qt+ZQL7xAEG5L3NCqB+mjorf Z6LvVr8z1gWkEhETQLpDx2CEL2aPINHjZrR2mRQx9NjURvcZpBVVvva9KB4Vt3xfbkUz 5BRpLUFT6o1My7hcozR1WMwFw7ow8Ix6Z2EB0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764272603; x=1764877403; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=AZbXku+QSkUQzgLp8ftnNXsoe+Eh23IRlTE31G2XjOs=; b=MIBj008b35gkPPdlLZWsheSwhWs8s1mEbgNYoXZ0HebAN/+cgpFFUua3O/FRiljm+J o91r7Wn1jLlBMgCT/71NUVLrbpk0T2oP+wTo2ZVf1azFtf0mWJIrEQL6nvR3yGl7qcMd PxSRiU/ZQ1cFYOd5yOKYeSTRK4SF5UabsO0fk2yhdpYU76cgRr+sDyD+vpi6OvnWlJWX iSoVm2Parp3zida5XIY+vSqIj0m/49FPWHbkTt9RhA8XrIViz8nWeVQZGDJVYZQ4EKKa eCGmpEQ1gyZE2Vhk/O1XoTtfy/8qVyLJv6w1mMX6BzpnfOWn6jkFJjNP0EzhDc6fI1Am M4mw== X-Gm-Message-State: AOJu0Yw9aMSWgaCtLENvyfkfLGNno2V5Ct2IAh4nC6KEwpdP+PwdnteL /0zLna4XxUdtTK81taGsU91j38bV3Ssi9jUYxCb53jiYQ2cZIVB2cXjS1cyxOR6QUuo= X-Gm-Gg: ASbGncuZQJ1KcRV4ZraHyFgRWaWkCzAkKop5/XY88pwM0oisTsGo40awQbfjHCdow/F NlIkns0HfAIVJZ/e2342CiEmd8U22MIzfF8DsQ9H96Im+T+WeVeUgrltDTZ/w9cB3X3en1UdbC5 CVjmImMNS7eW0jNyZ3p2ij1RutXO8Rl7KI3BCiagASFHVyzzt8WtWADKOSti1uMs+kEiwfltUux nu7nCgZV3BZ6hdhbohL6x2ZmQkRWaNi3xGxaXYuBvQPYtOjAUqIG+jEuysojuBL5JxIGTkhLWz7 OTYohxP4dvr06SRQFzcpvFAJpiR4yn4W8FSI/p1qMF5RVA31+82ccDr6aPHZZzA1cgd8nGUacUq Mbv8Q4E4sPYgzsqy48lw6dy4+rkZkmPNLUQ5Ej4Exh5mm3V64h4yaOXJqUzMPB9FGcLhWIIqbse 45UJKN7ovb3tl8YBXqhQY= X-Google-Smtp-Source: AGHT+IHH5fbIETbkKKy364kDyVol5SLjIrEJw6HGpQCYrK9ZMWpZD3n1abQqJyyMcOxs4AqTYCTvbA== X-Received: by 2002:a17:902:da4d:b0:298:2e7a:3c47 with SMTP id d9443c01a7336-29b6bf5c107mr280434835ad.42.1764272603387; Thu, 27 Nov 2025 11:43:23 -0800 (PST) Received: from localhost ([116.86.198.140]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29bceb5442csm24207845ad.85.2025.11.27.11.43.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Nov 2025 11:43:23 -0800 (PST) Date: Fri, 28 Nov 2025 03:43:21 +0800 From: Chris Down To: Petr Mladek Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Sergey Senozhatsky , Steven Rostedt , John Ogness , Geert Uytterhoeven , Tony Lindgren , kernel-team@fb.com Subject: [PATCH v8 03/21] printk: Prioritise user-specified configuration over SPCR/DT Message-ID: <4661330ae686768ddbb249f54d6df5f4806cf40d.1764272407.git.chris@chrisdown.name> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.15 (2b349c5e) (2025-10-02) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ACPI firmware routinely calls add_preferred_console() via acpi_parse_spcr() before we ever look at the kernel command line. After that first registration we short-circuit on every duplicate name/index match, so the subsequent console=3DttyS0,... parameter never refreshes the UART options that the firmware supplied. Historically that just meant you couldn't tweak baud/flow control for a firmware-provided serial console unless you picked a different device name, but the per-console loglevel plumbing in this series relies on those later console=3D entries being able to update the stored option string. Without that, console=3DttyS0,loglevel:5 simply never takes effect on machines that get their console from SPCR/DT. Teach __add_preferred_console() to update the existing slot when the same console is mentioned again: we keep the original slot, but replace its option string (and re-run braille option parsing) so that later callers can override what firmware seeded. This keeps today's behaviour unchanged for drivers, while allowing the cmdline UART parameters (and soon the loglevel hints) to override the ACPI defaults. Signed-off-by: Chris Down --- kernel/printk/printk.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index a3072ea39e5e..447d9c28f180 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2560,7 +2560,12 @@ static int __add_preferred_console(const char *name,= const short idx, (devname && strcmp(c->devname, devname) =3D=3D 0)) { if (!brl_options) preferred_console =3D i; + + if (options) + c->options =3D options; + set_user_specified(c, user_specified); + braille_set_options(c, brl_options); return 0; } } --=20 2.51.2