Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp891454rwi; Mon, 10 Oct 2022 08:28:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7G2jDF0BW1REie71tm4vYEBm5g8HcBo4oSuVzr6eSCLYiLcwPxZ2A17fsIvVSPhSjxjnxR X-Received: by 2002:a05:6402:2b8d:b0:43a:5410:a9fc with SMTP id fj13-20020a0564022b8d00b0043a5410a9fcmr18685774edb.99.1665415733507; Mon, 10 Oct 2022 08:28:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665415733; cv=none; d=google.com; s=arc-20160816; b=PqEgR0NhqnaZvNc+a4xnDjY6qtjRdNNBkZpeZGKAlsIE0zIp9rgcJNjEU0ut+VncP7 1/M9C7XXxL3lHBgAtTNbfxlgJXNpMSZsFcwCoQYQGRewtep1HquRRTMvaOgZkAuFwkLV WIkFjxBm/oOhDhy5DVVVvF5kx1Geqm1EqDqM0ejrQWTI84GdMewlP9Z8fr9EtfDyYsj7 gWrfzvK/K9kfJBH0+vHJcmDubeaiYsNNxvHaZlp1PHNAEb2ONLx5m0I3GACagS9b04tZ hyL6vv5ric1OpHLTnfTn7I+cbu1vwXgXe6ImqRoiM4IVqA0ytLjBW8PvfxQSld6Hhnwq gXHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=ldhbd4gbQEFA+pTqtSmtstrcNM+Qhq7eBd95J2vIhdA=; b=xVgaDLlEOCUHAOT7QtQV6b9pM/nLcjVfUwE/f0wHs0tsYKUdetoIkd4XYLdd0gRahz GiQHcfrQ5kwzmyCrWnq8ceIDCan81y48x2xvySBXtleQ9KpCzXMfNvGZIS7dl7TcZNXU cXSeLGjJDclg1OEJIUmpODpdYsGCn8G26ni5HLQ3rbhPSyGDMmYo2XnZhHGmbSer86qa IismFO6YqjVsMAQDWVPVhFBna1fW5z9+nLtvptF+gPXGTIAknKLy2PGDi2PAkCQB6zqT 5Sawkdy/VEuMMY5e2tbmeTR1eYzEALVV+lc8joZTRM+hCAlM6+U2z6EpHnGS4dyDHqYj Hy5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UBia0qRg; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hu8-20020a170907a08800b007418e87eea8si10871472ejc.770.2022.10.10.08.28.27; Mon, 10 Oct 2022 08:28:53 -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=@kernel.org header.s=k20201202 header.b=UBia0qRg; 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 S229968AbiJJPKl (ORCPT + 99 others); Mon, 10 Oct 2022 11:10:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbiJJPKi (ORCPT ); Mon, 10 Oct 2022 11:10:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 689382408F for ; Mon, 10 Oct 2022 08:10:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D539D60F77 for ; Mon, 10 Oct 2022 15:10:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7C2DC433D6; Mon, 10 Oct 2022 15:10:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665414636; bh=ldhbd4gbQEFA+pTqtSmtstrcNM+Qhq7eBd95J2vIhdA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=UBia0qRg3uM2Fv6m57jcY4VKFldyUhPNfLQHomhUvx5AQ+4IACfN6SN5vBoZZn2dS hLFmjgW010B0xxT2620tnnbPBMUpyLMx9Q/HKXtKZTmdtxUlx8D0GpBaDrVE4ZZ+aa KcxuK9bpHNnamZc4fNQO241zMTiJh3CHpKexGqq12qTbJmx0RjbmGEbYZr1NIPdNRA 0GZk9DljKVM6t3uc0sA/STL8FHZbwK+27mw195sqJXJWiYDt1Pix79mzhsVkIl7UF/ drOtb0itKvE7Ou7bGMiqAYyLdhXIw3WVXo6LMTYXECmJ8PgMDTOUAfljt3WagetiKe 74qKmzXLyIxmw== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Wenting Zhang , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: Wenting Zhang , Palmer Dabbelt , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] riscv: always honor the CONFIG_CMDLINE_FORCE when parsing dtb In-Reply-To: References: Date: Mon, 10 Oct 2022 17:10:33 +0200 Message-ID: <87bkqjk93q.fsf@smulpajen.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Wenting Zhang writes: > When CONFIG_CMDLINE_FORCE is enabled, cmdline provided by > CONFIG_CMDLINE are always used. This allows CONFIG_CMDLINE to be > used regardless of the result of device tree scanning. > > This especially fixes the case where a device tree without the > chosen node is supplied to the kernel. In such cases, > early_init_dt_scan would return true. But inside > early_init_dt_scan_chosen, the cmdline won't be updated as there > is no chosen node in the device tree. As a result, CONFIG_CMDLINE > is not copied into boot_command_line even if CONFIG_CMDLINE_FORCE > is enabled. This commit allows properly update boot_command_line > in this situation. > > Fixes: 8fd6e05c7463 ("arch: riscv: support kernel command line forcing wh= en no DTB passed") > Signed-off-by: Wenting Zhang Reviewed-by: Bj=C3=B6rn T=C3=B6pel