Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34728381rwd; Sun, 9 Jul 2023 19:15:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlFUJFu1CsC18IpUgKMbd18LuAiVXVB4YFboNoJaKCqaZ9VGw7Eim9EE2q7IEMfG3Lf3b2pp X-Received: by 2002:a05:6402:686:b0:51d:d16f:7e52 with SMTP id f6-20020a056402068600b0051dd16f7e52mr9292502edy.29.1688955357734; Sun, 09 Jul 2023 19:15:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688955357; cv=pass; d=google.com; s=arc-20160816; b=mUmPsmt25rQpxUWU6N0SNAaF0vjWqsiPW4SQTlvTpoOE+wpInmtOkC0YNXnmD5XYb+ ikq8vfZNnGMXcLaCtOhiBvPfKp88sLYOuGvD43BIjwXaxYxIueAS3J7N9SBccHC3Oo+v gbW3oF2DtN8oRBnHT8iHMMbmcYB6dNsC3EvQ6GQ9wntjqi5F+sMnF2/MOP/q9TYHrJ2I vWaJ9REK55tcQUWQfFDXrkGpG84TKODXkuYrGudUjgCUVljYbAGz6IxcvjTYwAS1xOII LI3Uv6mM5O6oKk7ICQfre5YxH2J+1sJRShyhFPEqWtRStgoluI0HZ8p8mV49DWrO7upc BE2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=ZnTmBpcXmFeYjGIbERR5JKbHEoWxFeYPOOaAyG/cHhA=; fh=NONQ7Im/9d7FE+GP6EbdH9ODuvzyDXu4aYVOyGHB0Yg=; b=ECWGnKVjccynSSiijTYcRsudoz3nFah95408sxPmugO+bAxPGnUj7yQTYZddpjtnHD T/2czeB1LrDVQzwKWOcunhrWZiVXhrUkiOg0/KwTwF9JhOQx50q4yY0G56dLER+v6MPO On5C+sZVfZso2v5HHEBv5muqQ3D/TKgr3LGGvdiE81GHFUsSJvkFKO6V9jXTmgzCBq0P EEByY/+DA9n8QxEMcrW8nVy+klveG+uJtFjOUpyQ/Xczrg0pt/5tQxv5Vy+6K1Kr4AJH Jo3TCjnYC+LgrE1XNkj10s/0q+jjK4rgQb+vjTLD7OIA/MD30WgqHIvdVPXRMuoVJYDj jBRQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=TsT2ztsN; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c20-20020aa7df14000000b0051dd22715c4si7545077edy.196.2023.07.09.19.15.23; Sun, 09 Jul 2023 19:15:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=TsT2ztsN; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230073AbjGJBQD (ORCPT + 99 others); Sun, 9 Jul 2023 21:16:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjGJBQC (ORCPT ); Sun, 9 Jul 2023 21:16:02 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2084.outbound.protection.outlook.com [40.107.220.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4FEED1 for ; Sun, 9 Jul 2023 18:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BwDZvnGWnjOWh73d55RPIsJF3M5l4f/ZkGp6YXyMARd+kpWh3XLPd38dikcg8WC4zL1paZl1vtZs3gMElXwqwNmgzQYGy55EKwM5sK8AHOkR6wNQHjaX3Sa+ibtXaCFbcIy3oEyYti55wF0l0A2/lmhZeikBYMw9nukD12subreDeFM+rspNVhniXBwVTaYRPLDD5VFYULtbyRuaZiqm+8I4Z1To2C4HXdrYZogVQMDkiYFkvKGKq9R/Rd0JRCas6G/Sqx+QSZTvV7jmhLFfdxkyBokua1aZfg4bS20S9eRBU+rThaQu8YybTmKATSmhLjvqAsQmWTtdqgtgIbYXcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZnTmBpcXmFeYjGIbERR5JKbHEoWxFeYPOOaAyG/cHhA=; b=h8XoTBPo/E1xgqoLaSguLsEQwrGSqnFbMNFpljVIgDPu6C/NJDQDzZgc//m2YM8Ji4AjTLJDNo2cvmLfz4HJNQLvl9BdNOGpUPsOZ1Wmn9PoyCS0AyI9dwDyyXeRaGJ32BGLUqjZeuagTw29DtyBacBazd8L9C+oNjAozwHLu6sasyi37QLcuXe+9kynL4/Yz0J/lenFaHqd865uSByEjWI83r3elepmFTX3WDFnB/XbTanH91jAU+T2IA8wqEUD71XQIlbY34oEBbrC+tmoXMT1XqdLgPqf9vHBiOaLa4Zvs7Z0sEu7rZ5J2woIiPQuUxXg1Zoqgpr6V0pilcE7OQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZnTmBpcXmFeYjGIbERR5JKbHEoWxFeYPOOaAyG/cHhA=; b=TsT2ztsNMvAQr42jF9beMhegXnrOysShEFGZKN2fQbOUcJpM5YJCc5D3p5F5oolpQY9B5n1NffytPlZEdUPcjsA0VzghJE2gI6ZZi3+2sTJAcZg5xZrcCdJKMYidYQG3+sr85WA1oNoZANWmp2iK5hqcw+5di3hUym853Gujn1A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) by DM8PR12MB5430.namprd12.prod.outlook.com (2603:10b6:8:28::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.26; Mon, 10 Jul 2023 01:15:58 +0000 Received: from MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::bce4:716a:8303:efcf]) by MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::bce4:716a:8303:efcf%4]) with mapi id 15.20.6565.028; Mon, 10 Jul 2023 01:15:58 +0000 Message-ID: <6101a3bb-30eb-97fc-3a8e-6d15afc4efb5@amd.com> Date: Sun, 9 Jul 2023 20:15:53 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] init: Don't proxy console= to earlycon Content-Language: en-US To: Randy Dunlap , Raul E Rangel , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Petr Mladek Cc: kramasub@chromium.org, Alexander Potapenko , Andrew Morton , Ard Biesheuvel , "Jason A. Donenfeld" , Li Zhe , "Liam R. Howlett" , Mark Rutland , Will Deacon , Wolfram Sang , Zhou jie References: <20230707191721.1.Id08823b2f848237ae90ce5c5fa7e027e97c33ad3@changeid> From: Mario Limonciello In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0PR03CA0383.namprd03.prod.outlook.com (2603:10b6:a03:3a1::28) To MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN0PR12MB6101:EE_|DM8PR12MB5430:EE_ X-MS-Office365-Filtering-Correlation-Id: f8e325ff-b29d-4ee7-6bc9-08db80e337b2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: svhz4BBLr40rhRDIzt4SqOm0XZGf0ir6Z0lrda6kbsiRtyRc8/NJKhSAm85fGpJJ2tSqRiI6w9PqCxOLQ16RGjagwPe9Ei/N5/mE48Bq+DUbceb3GGJ9HDF+90GDW+ftVl4gtJFmu9zGW09zPsObQqjYO7gs586gQAZYNoIqwwNegHiZPiU64W3q4Kl1SNKi8vdKzFNRcKhn9ipZk+2qkwcdJftHx6DpU4+AVL630t5ypnc6ijJkLFkmhY3Fovkz3kt4HXWgAqpbORPPIm2ZDMQnCsB6LIibq2t3R+ygTg+1NnKbY2xZ9Y7jR2RZisU8oH2j11FF/mOKLn9thpOiIEuFnavRZWEfg8HvaZuc8pbI1Xs7hiwaSnjOe5p9LRY3Kh8ufoSzoEHPVf12kABpinbTKDKtU0rkPWyAWqVTp3O9qk3E4ZEZA9SwRz1Ivg5OAQpFKpJU/83lFN/S2RudvTaUuysa6rfEpH8+65uYSlwbc0h1NBRqYakf3Rb4uSaURbiitiGLRNeLFVLtaz7MloUAc9rawqhqfyMb3OVRn+Db6Wa92n/5hBSp6t5wWeXhEN9mAcaAa1ETW2dOUB+1WloK3PjWN/R/nElmEAUx8PReWEEwfZfC2w54N+PwNnszmPOMEVbD0KDA/FfF3H1vvAV93bKV2ZjMqxWyCOLnqeE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR12MB6101.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(366004)(346002)(136003)(39860400002)(376002)(451199021)(31686004)(53546011)(6506007)(38100700002)(186003)(86362001)(478600001)(8676002)(44832011)(41300700001)(31696002)(8936002)(66556008)(66476007)(4326008)(6512007)(54906003)(66946007)(316002)(110136005)(6666004)(6486002)(7416002)(2616005)(5660300002)(2906002)(36756003)(83380400001)(21314003)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Tm4vbUc1cUlDKzlUN21kdFBPeU5hQjZ6dnN6K0FwanQxSFhpa2dlcUZTaEtC?= =?utf-8?B?VzJUbGhhUldHeE1HcVZ6Witsb2RTNTVWanhuenBqSFZZRE9UK2V4RGxaemlF?= =?utf-8?B?NGJvc2lwbG1NekJTeFRMRXJNbzRNWFdpUjV1NXNLNVF5TGxUSm5EMHMrbVcv?= =?utf-8?B?OWI5TVY2Zmd6bnB2dmNRUHpaTjVTbG1YeTNycmd1WXZrQ2tNNmdDUWhtRVBO?= =?utf-8?B?eFJpbm1XSkw2VmFYOUw5REFwYVhqYUhHTUFTUUkzYUY2NzV6VnNZbTNtUU54?= =?utf-8?B?ZGJnOEM5U0QxZlZvcXBZS0R2U0hQcDRTcFhQeUJpbEhGNGhkM2QrbTNuSFdG?= =?utf-8?B?eXA4UDUvdkV6QlRIU29rUzNUdVkyS0g4ZzRZdm42NDFpdHFiVU5Zc2grWDJP?= =?utf-8?B?L1lrMm5K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id: f8e325ff-b29d-4ee7-6bc9-08db80e337b2 X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 01:15:58.5175 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UrLAOpP+toMbwUxiTh21iIA0PecVeTjYIPa9Ie6lA+PhkoRKKGhSpxN9OF49BoW432LY0SnAeN4UXkjqSoCwFA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5430 X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/9/23 18:46, Randy Dunlap wrote: > > > On 7/7/23 18:17, Raul E Rangel wrote: >> Right now we are proxying the `console=XXX` command line args to the >> param_setup_earlycon. This is done because the following are >> equivalent: >> >> console=uart[8250],mmio,[,options] >> earlycon=uart[8250],mmio,[,options] >> >> In addition, when `earlycon=` or just `earlycon` is specified on the >> command line, we look at the SPCR table or the DT to extract the device >> options. >> >> When `console=` is specified on the command line, it's intention is to >> disable the console. Right now since we are proxying the `console=` > > How do you figure this (its intention is to disable the console)? I read that as "it's intention is to disable the default console (tty0)". IE if I add console=ttyS0,115200,n8 to my kernel command line then I don't get the output on tty0 anymore. If I want it on both then I do console=ttyS0,115200,n8 console=tty0. > >> flag to the earlycon handler, we enable the earlycon_acpi_spcr_enable >> variable when an SPCR table is present. This means that we >> inadvertently enable the earlycon. >> >> This change makes it so we only proxy the console= command if it's >> value is not empty. This way we can correctly handle both cases. >> >> Signed-off-by: Raul E Rangel >> --- >> >> init/main.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/init/main.c b/init/main.c >> index aa21add5f7c54..f72bf644910c1 100644 >> --- a/init/main.c >> +++ b/init/main.c >> @@ -738,8 +738,7 @@ static int __init do_early_param(char *param, char *val, >> for (p = __setup_start; p < __setup_end; p++) { >> if ((p->early && parameq(param, p->str)) || >> (strcmp(param, "console") == 0 && >> - strcmp(p->str, "earlycon") == 0) >> - ) { >> + strcmp(p->str, "earlycon") == 0 && val && val[0])) { >> if (p->setup_func(val) != 0) >> pr_warn("Malformed early option '%s'\n", param); >> } >