Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1239110pxb; Thu, 4 Mar 2021 06:51:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwVILl5lvqSwnWbL0XsprRK4LGl+ghCJlTs9SiEi7haRTF5YAExHtIVN6ivFs4sHYtD3Ed+ X-Received: by 2002:a05:6402:6cb:: with SMTP id n11mr4858290edy.198.1614869494967; Thu, 04 Mar 2021 06:51:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614869494; cv=none; d=google.com; s=arc-20160816; b=aC8IuI6lbQQX6rg5bGAi8agOBmgmoPrFndKvbXP9p3HwTjdogJa2e74O+D6Vw6kJDj CtehgS0NoqX1su3MF2E+7GPf1oI/GHFMHWQBap/b7DSsPaK4Fv7b0P4BJcp9fx4j0+cn P+vD9iOrmpOb5y6ZBDAHFy+ODKtR3PXl7aBsNE/XW87HST13P8tVwZWZSF7SNWvtEtd/ RPPLRB07ojic3KNZHHyAHlLntGyv9dWApW0z73DLHekCPbj43ebvi1ktIcoIBg89kKw1 oTYZedZ+GQYJaOvG30VidX6BfaF/QmAe/cr/duqcoCGzSkxkBwH+orrR2Vn9fVNNwyNS 3aZw== 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:subject:cc:to:from:dkim-signature; bh=AMPd/UpnKi3m/TKh3NutiX9iGeUZoVwJFDbGBIo9ZZk=; b=0jwsU+k0sIUIlPmme+1OhoC4Vcq24udeae/MFzWm7Y6jkvLx9bRbXnLzbU8P1uf3N/ Mctgy/boyAQKbfYAT1ot3aa3gWSskTQXTI/2thrcu2/TyzA8GpM+DISpaUzhxtUucIKq yb+gMWZIbjehAUgDDJn6KSVbT5TjIM/vnm2Wz47aAZtdHd9xwM36QLuJ28g+T8EjqEUi ygniS3rh55epGosyIO4nmrvaAqo1MerN+Gkno4LUPHuD4Faw56DgfcHEaLkTL4DmxIHx dbOmDih9+r0+88fTrUKL4eU77NSRFIG5LptjWJJNmdrs6xhudF/IJm8UYnTdw4ID958U aVJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b=N0ANiY6T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j2si17149436ejx.646.2021.03.04.06.51.12; Thu, 04 Mar 2021 06:51:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b=N0ANiY6T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233954AbhCDEt1 (ORCPT + 99 others); Wed, 3 Mar 2021 23:49:27 -0500 Received: from rcdn-iport-4.cisco.com ([173.37.86.75]:47892 "EHLO rcdn-iport-4.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233923AbhCDEs5 (ORCPT ); Wed, 3 Mar 2021 23:48:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1665; q=dns/txt; s=iport; t=1614833337; x=1616042937; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=JPxIpWSiHwMYUhrJK0/YYj5eo6XXFdrmnrzClDHMFxg=; b=N0ANiY6TVQLeOKcOKmFfBWhwllS0V9rYGC8wT3VuW952KBtcqupvYL+p 3Ba3k2ICkgfPdbS5GSY05InDnTq9CxS3GOF83rPEZwuTdTozPJoif1MJQ fEe/YqwiEz4SENtEVUb8v9HQEAqghzT45lhWCxWL0AuedSDDFZxSR4d+r E=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CaBABRZkBg/40NJK1iHQEBAQEJARI?= =?us-ascii?q?BBQUBgg+CK4FMATkxsmkLAQEBDzQEAQGETYF8AiU4EwIDAQELAQEFAQEBAgE?= =?us-ascii?q?GBHGFboZ9AUaBPgESgnCDCK4cgiiJH4FEFIEkiFx0hBkcgUlCgRGDWIozBIJ?= =?us-ascii?q?AB4EOgigSnimbe4MGgR+acg8io1aUVaJGgWsjgVczGggbFYMkUBkNnCsBXCA?= =?us-ascii?q?DLzgCBgoBAQMJjBMBAQ?= X-IronPort-AV: E=Sophos;i="5.81,221,1610409600"; d="scan'208";a="844460945" Received: from alln-core-8.cisco.com ([173.36.13.141]) by rcdn-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 04 Mar 2021 04:48:10 +0000 Received: from zorba.cisco.com ([10.24.7.178]) by alln-core-8.cisco.com (8.15.2/8.15.2) with ESMTP id 1244m4Ww015988; Thu, 4 Mar 2021 04:48:09 GMT From: Daniel Walker To: Will Deacon , Christophe Leroy , ob Herring , Daniel Gimpelevich , Andrew Morton , x86@kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Rob Herring , Frank Rowand Cc: xe-linux-external@cisco.com, Ruslan Ruslichenko , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] CMDLINE: drivers: of: ifdef out cmdline section Date: Wed, 3 Mar 2021 20:47:59 -0800 Message-Id: <20210304044803.812204-2-danielwa@cisco.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Auto-Response-Suppress: DR, OOF, AutoReply X-Outbound-SMTP-Client: 10.24.7.178, [10.24.7.178] X-Outbound-Node: alln-core-8.cisco.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It looks like there's some seepage of cmdline stuff into the generic device tree code. This conflicts with the generic cmdline implementation so I remove it in the case when that's enabled. Cc: xe-linux-external@cisco.com Signed-off-by: Ruslan Ruslichenko Signed-off-by: Daniel Walker --- drivers/of/fdt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index feb0f2d67fc5..cfe4f8d3c9f5 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -25,6 +25,7 @@ #include #include #include +#include #include /* for COMMAND_LINE_SIZE */ #include @@ -1048,8 +1049,18 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, early_init_dt_check_for_initrd(node); +#ifdef CONFIG_GENERIC_CMDLINE /* Retrieve command line */ p = of_get_flat_dt_prop(node, "bootargs", &l); + + /* + * The builtin command line will be added here, or it can override + * with the DT bootargs. + */ + cmdline_add_builtin(data, + ((p != NULL && l > 0) ? p : NULL), /* This is sanity checking */ + COMMAND_LINE_SIZE); +#else if (p != NULL && l > 0) strlcpy(data, p, min(l, COMMAND_LINE_SIZE)); @@ -1070,6 +1081,7 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE); #endif #endif /* CONFIG_CMDLINE */ +#endif /* CONFIG_GENERIC_CMDLINE */ pr_debug("Command line is: %s\n", (char *)data); -- 2.25.1