Message ID | 20230103-dt-cmdline-fix-v1-0-7038e88b18b6@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4747398wrt; Tue, 3 Jan 2023 10:03:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXtMvbt5jD0Ex4Y3X3D4GtLO4PlHoZWRJPjCXknBIpchhAEfPrBkQxsvy4isxjTaZYqrphgV X-Received: by 2002:a17:906:704a:b0:83f:cbc0:1b30 with SMTP id r10-20020a170906704a00b0083fcbc01b30mr36420681ejj.10.1672768992951; Tue, 03 Jan 2023 10:03:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672768992; cv=none; d=google.com; s=arc-20160816; b=egCVik50Ohb3xK1JzsCRsO/j7cCrcom+zuSxa/guvnxlHSnsTulJO2az8W80fWBSfV 4f/N9fucb3jv0ZrKcYzCNj8kZ0xQ2p1n8xkmyIWp09PY39rsh6HLkBA/z9tBFmbM3jj9 EB4nLZiAiYk3rpo7oTs36emI9Tth+M5h7T37GM8ZGC8mwpiXbkMqokXftdnjBqNQuYMy lKvGLRTXYRC2Xi1pwXbUq4OB3AeXrzNBIQk4Uq1cOIHFzJayxm2BoHl5gdQ5M//O8zli EvqEZufu+OvAe9ZbjKDwgbw3fYGPnN/YPEg6/BVA8WeZ1/LqGrPAI1gaipq7qwln/1Cw P1jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from; bh=3U4kPXRDj8X/D/vbdLzUnOyXOpG/g/yFLv9I84Ua9eI=; b=Xs/2onHuMi/MmOOchc4ZCE5VuQFtWFcVsfOWaGAzB9Y1/S0yavL+GTPLLgzJ7ZejoE sn3lELp4sbzWUevbW8s/cLqRQziA0f583BNgcruQj65oa3yC2tW5FAqdOazXLSNHf4zP CYv/VihMRpkLxSbVQ3Te11/4cLFWeJKphmlEAKd5gzmhTnBW6IBjERU1u3jDXbCyYBWv jz6CJ1dVzxIU0dml1fKBOasE+RJxRFXWHJ2fvsw1NQB/fXlJ6lLfMxFvdaoILlHRd4a6 v8QfS/B52n/AfwAZMZvcAXp97YS3Ulj9b169mFy3FuNbvvhS41B83iKS280Q2koMikCB j0KQ== ARC-Authentication-Results: i=1; mx.google.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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e19-20020a17090658d300b0084c7b0977bcsi18238714ejs.462.2023.01.03.10.02.49; Tue, 03 Jan 2023 10:03:12 -0800 (PST) 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; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238487AbjACSBT (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Tue, 3 Jan 2023 13:01:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238496AbjACSAy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 3 Jan 2023 13:00:54 -0500 Received: from mail-il1-f177.google.com (mail-il1-f177.google.com [209.85.166.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D262260F3; Tue, 3 Jan 2023 10:00:53 -0800 (PST) Received: by mail-il1-f177.google.com with SMTP id h26so4135104ila.11; Tue, 03 Jan 2023 10:00:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3U4kPXRDj8X/D/vbdLzUnOyXOpG/g/yFLv9I84Ua9eI=; b=msi4v/2nXdDNRcSRGQCicecr1JhkOOQF6WqW2qEUSr/7yBI+IrnyvZfU4OOYX/B3KV q9ySObEwNuUsFqWJhwcI1lDz6rYgTbuhqbGJ+8xUOmS0P1azFHsGvp87FDRdhDFJb3Bu 2Aw+p5Mc0Kz8Ml7LXuVe5v6fZM7yFlCaEsGHRMj0VusIrKVjBGJbsvSysIgp8IRQ1Me9 KHTdEvlcx0eMu8FxGeuMEZAgSFTRASMrgKt2LLepCyQB8+QOntDTgjgBs0NTXvvKxTtK 6U4lX0YVd/vP5OMEbagRg9RySFggjvClq3Lmjg5jJln0fDbHkXcTukBp4vROAgzbSxlH bCKA== X-Gm-Message-State: AFqh2kp9tCFKP+ps1qtaOPSl5dQF+NqbEcpNhP0tyxQIQqB2r5LOMPD/ pXXC9ORScM0DxFvM4i2Wcw== X-Received: by 2002:a92:c60e:0:b0:304:b79a:5008 with SMTP id p14-20020a92c60e000000b00304b79a5008mr32921267ilm.29.1672768853018; Tue, 03 Jan 2023 10:00:53 -0800 (PST) Received: from robh_at_kernel.org ([64.188.179.248]) by smtp.gmail.com with ESMTPSA id v18-20020a92d252000000b0030c0217dde6sm7739103ilg.0.2023.01.03.10.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Jan 2023 10:00:52 -0800 (PST) Received: (nullmailer pid 3492165 invoked by uid 1000); Tue, 03 Jan 2023 18:00:51 -0000 From: Rob Herring <robh@kernel.org> Subject: [PATCH 0/2] of: Fix handling CONFIG_CMDLINE* even without /chosen node Date: Tue, 03 Jan 2023 12:00:31 -0600 Message-Id: <20230103-dt-cmdline-fix-v1-0-7038e88b18b6@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAD9ttGMC/x2NSwrCQBAFrxJ6bcMkgwl6leBiPs+kYWzDjIoQc ncbl1W84u3UUAWNrt1OFR9p8lSD/tRRWoMuYMnGNLjBu955zi9Oj1xEwXf5MvyIOMFf4nQmi2Jo 4FiDptUyfZdicquw7f9lvh3HD2TCtFx1AAAA To: Geoff Levand <geoff@infradead.org>, Alexander Sverdlin <alexander.sverdlin@gmail.com>, Frank Rowand <frowand.list@gmail.com> Cc: Linus Walleij <linus.walleij@linaro.org>, Arnd Bergmann <arnd@arndb.de>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.12-dev X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754025419590232379?= X-GMAIL-MSGID: =?utf-8?q?1754025419590232379?= |
Series |
of: Fix handling CONFIG_CMDLINE* even without /chosen node
|
|
Message
Rob Herring
Jan. 3, 2023, 6 p.m. UTC
Commit a7d550f82b445cf218b47a2c1a9c56e97ecb8c7a (of: fdt: Honor CONFIG_CMDLINE*
even without /chosen node) moved the processing of the kernel built-in command
line (CONFIG_CMDLINE) from the early_init_dt_scan_chosen routine to the
early_init_dt_scan_nodes routine.
The current powerpc startup code does not call into early_init_dt_scan_nodes, so
processing of CONFIG_CMDLINE never happens, even if CONFIG_CMDLINE_FORCE=y.
The result is an empty kernel command line, and mounting of the root file system
then fails with a kernel panic (not syncing: VFS: Unable to mount root fs).
Let's revert the above commit and redo the missing /chosen node handling
within early_init_dt_scan_chosen().
Signed-off-by: Rob Herring <robh@kernel.org>
---
Rob Herring (2):
Revert "of: fdt: Honor CONFIG_CMDLINE* even without /chosen node"
of: fdt: Honor CONFIG_CMDLINE* even without /chosen node, take 2
drivers/of/fdt.c | 54 ++++++++++++++++++++++++++++--------------------------
1 file changed, 28 insertions(+), 26 deletions(-)
---
base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
change-id: 20230103-dt-cmdline-fix-e36eb7e39b75
Best regards,
Comments
Hi Rob, On 1/3/23 10:00, Rob Herring wrote: > > Let's revert the above commit and redo the missing /chosen node handling > within early_init_dt_scan_chosen(). > > Signed-off-by: Rob Herring <robh@kernel.org> > --- > Rob Herring (2): > Revert "of: fdt: Honor CONFIG_CMDLINE* even without /chosen node" > of: fdt: Honor CONFIG_CMDLINE* even without /chosen node, take 2 > > drivers/of/fdt.c | 54 ++++++++++++++++++++++++++++-------------------------- > 1 file changed, 28 insertions(+), 26 deletions(-) I applied these two patches to v6.2-rc2 and tested on PS3. I used a kernel config file that had a CONFIG_CMDLINE, and CONFIG_CMDLINE_FORCE=y set. Everything seemed to work OK. Tested-by: Geoff Levand <geoff@infradead.org>
Hi Rob, thanks for looking into it! On Tue, 2023-01-03 at 12:00 -0600, Rob Herring wrote: > Commit a7d550f82b445cf218b47a2c1a9c56e97ecb8c7a (of: fdt: Honor CONFIG_CMDLINE* > even without /chosen node) moved the processing of the kernel built-in command > line (CONFIG_CMDLINE) from the early_init_dt_scan_chosen routine to the > early_init_dt_scan_nodes routine. > > The current powerpc startup code does not call into early_init_dt_scan_nodes, so > processing of CONFIG_CMDLINE never happens, even if CONFIG_CMDLINE_FORCE=y. > The result is an empty kernel command line, and mounting of the root file system > then fails with a kernel panic (not syncing: VFS: Unable to mount root fs). > > Let's revert the above commit and redo the missing /chosen node handling > within early_init_dt_scan_chosen(). > > Signed-off-by: Rob Herring <robh@kernel.org> The series looks good to me, Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>