Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1522447lqo; Sun, 12 May 2024 06:26:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUN7/iuPB8iNPsL4hg4D+xvbcw/PqU+i81LPIk7+a13REEVgh/sZepOH/79foQRLJxq7mTB4fVT96xc2guTTeMFrsZrhuxVoRC9FSVZpg== X-Google-Smtp-Source: AGHT+IHVvpvWyyqmBIZGHKEJQdZGBF3XpqSrBm/67XoAYv2+j8bPr8DRjCzYHznoNYK3GCnC781O X-Received: by 2002:a9d:7844:0:b0:6f0:37af:2b61 with SMTP id 46e09a7af769-6f0e91228bbmr7970831a34.9.1715520372655; Sun, 12 May 2024 06:26:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715520372; cv=pass; d=google.com; s=arc-20160816; b=Qdtt/imSjH4b3L56a8jqAhx6OpsdSP94+P8tbOPV7eRb//S3VFbMM7FPe3Mt7EIo4V FAEIzRqu+JT/s1Hp7Df64R24EFgzTTXoyWOtir7L2IHCGjjJn2dq+nH0Y1ZFwr/2bwkr PZovsbOY8WPM6zfS8SB7dTzUQL8tTrmEcrEy6zIXKiWgJTqoQPUAHbBCP9afHhRV2MAA UpeRvalrZjcIkOA4/BtfkALP4tQNQpv6JPVENooVBDohjWsBpgcs14EDgfK8TkhjgqpW S2YfnSQNm/1pZvDKx959/pPCD3BcYMXoFhQQyjZaElHxjR7iIhsYWVpLOy6qsADSFP76 JQPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=G276tR2DWdT7pXfSzU9VYLXPeNqUlLbGdFn/8pm75Rk=; fh=Gjowag+FXjgppk1K7u0Dj2Eaa391U3amuV84fn9UxZM=; b=YrdkBsBGB1O5yGa+1jxA4vBtil+KtC9RcjPg+j6/VG8Z5DVF0lVrI6mXQWpqmlns8/ tdoj4jKLy/mKFr+EX8sqf68GsNqVufOGd8ucT0ACT/valMl7U6E/OjefH8e2fwtPH7b7 aX+6ruF/pd+Nq65FHeT+zoHIgEplj4EbN95Ee+1MHpOBlLPJ0WZZM1HB/ZdqO/oYMpk6 GAuhIO2KmNb5gsSJfHPPYQ1fCjkqegCC/8SFTtzGjBxxhVzKWqDUZWF9hWs3xp1/0fUv DJ8kT4ZIJdb0SYPQI5rqoAP5mz0vKoQzIPYrZIg9hR9MCDfJyfU/1FqVohcgKn6VXbyj U4MQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=A9Q+hvH1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-176888-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176888-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792bf29aa03si726278685a.224.2024.05.12.06.26.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 06:26:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176888-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=A9Q+hvH1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-176888-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176888-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4F5781C20F8B for ; Sun, 12 May 2024 13:26:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E18B4597A; Sun, 12 May 2024 13:25:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="A9Q+hvH1" Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 1E31F28E17; Sun, 12 May 2024 13:25:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715520330; cv=none; b=ea61avFJaSipmV3KIrV4ul9WTLdZdrMlj1dc0hPcYjmnW1aZ+5NkQNhUMA3FA58lfE4DmvtMM5tFnk+44XEVFnG195aPk0/SQsDUjk2NukdxKiKD78GWM4m5QRGv1y75BRd0uQMfATtxyC2Q7B1dI+KolSQZE+SkSnbv2uOKE3k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715520330; c=relaxed/simple; bh=y5X0OWXz5ws3bAHMfoYFwbP2pMMbDn947glAeZm8OpY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CZGZwBJyTVxHKMxzXODUoLXJ8NyPuy/eIp8IjgMnUVN1MXTRpZ4QsYQlccIAm7kWjbRwvxDHTLyoCa6r3+0czgjZ/6saUGUQCRQjGXDgc38x+RC0+3Y6a02/oOF4JGUD0IfmZygHsG4rwRRdyNcmwa48YA/xQs5x4WNjNt42oeo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=A9Q+hvH1; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-34db6a299b2so2838581f8f.3; Sun, 12 May 2024 06:25:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715520327; x=1716125127; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=G276tR2DWdT7pXfSzU9VYLXPeNqUlLbGdFn/8pm75Rk=; b=A9Q+hvH1F8+WLk5zIzY8u4izwu3X1eNDxHp/xcDPz8hR/R08hbeQk5NLTBgCXuwKwP t0vUajJrEC5UBtdLk3DbUWENSNxs8ZNuJVB2MmEiU8+woAas5nTlDR5uHlMdOk5db4MI n8MbNMR4iXEvO92XIlb5kEByOeeLazkUMyEvx79m4xJZbHzktUCYp2C1wlmr2Uzsi0tq /qComxJJubY+XRZs05CNdvy2UoLoW589scNsmuYM27YVRlt1erP5nHdv1icwkrc8Xnwk 6oBLieVoC0fEHAsdagoYsFv7OLI6FjF1Ixx7xcZgVQlC3qVl5Lf/AhR4NuhzlfyLXNAc 4VVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715520327; x=1716125127; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G276tR2DWdT7pXfSzU9VYLXPeNqUlLbGdFn/8pm75Rk=; b=lrMPZ++O2f7+ejKQ4Oa4s1rqSLARLhEAb2JKT3s5huby29vspFKYFqpiul5+xyg8uX G/l4vCz4gE9umAxowYsEOHq81AY2mCpG1e0PK4JZlEIjcjflXhsKEpfLQKqvM+rxkX6y NWRz64lsyYIXrHEDhIsvg3o18KIrnFpLyIqMCoQO5q7WuQ9mMHtbMWbBN/rVZ0u5Etpv RgwN7Vgo9k21R+B1zahD5Yo/9LQp4l93+YTfO7FTXtbfIByxIxcB1Y9FyuyiX/dBoA1E KBEp35GZJIsc1bfmZfqQ6cmFBQYNWLoSSWksfKL7NYQNa/XV7gjaIdAlTMqKgPUFb0Ux 16LQ== X-Forwarded-Encrypted: i=1; AJvYcCVx4y4L1Y6+hx+QA4AVVQQEqJnc/+kEIpVEVSvmkubKjM9mQXF5gTfQBBDXadzvbGm/TUh6W6IHj9Kyns4yy3a97vqT1CPVz4T2r8QaO/4V7tnycSxRevw472y/0zAmZLB93WnYJDsLBdsyRWmbShIFNOQdWxHScepAQaFNZA2JfzNYVrU= X-Gm-Message-State: AOJu0Yytq/GCNEceJ2w1Rw/UobsUn2fSYwS+LqZ7hYJGiDlrd5S/r1Dr FsBosLPLPGjLAAhocMILdBxVdpPhczixnG4yWtwtyZpQITqvZWhK X-Received: by 2002:adf:e851:0:b0:34d:9fc2:4a81 with SMTP id ffacd0b85a97d-3504a61c5c6mr5321553f8f.5.1715520327427; Sun, 12 May 2024 06:25:27 -0700 (PDT) Received: from localhost.localdomain (93-34-90-105.ip49.fastwebnet.it. [93.34.90.105]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-3502b79bd09sm8822468f8f.14.2024.05.12.06.25.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 06:25:27 -0700 (PDT) From: Christian Marangi To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thomas Bogendoerfer , Saravana Kannan , Arnd Bergmann , Helge Deller , Javier Martinez Canillas , Baoquan He , Thomas Gleixner , Jiaxun Yang , David Bauer , Liviu Dudau , Serge Semin , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Cc: Christian Marangi Subject: [PATCH 3/4] of: add support for bootargs-append chosen property Date: Sun, 12 May 2024 15:25:10 +0200 Message-ID: <20240512132513.2831-4-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240512132513.2831-1-ansuelsmth@gmail.com> References: <20240512132513.2831-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add support for bootargs-append chosen property. The bootargs-append can be used to append additional kernel arguments to the bootargs property. This can be useful in the context of a bootargs overridden by the bootloader that contains correct that but the kernel require additional one to be correctly setup. Signed-off-by: Christian Marangi --- drivers/of/fdt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 253315421591..cc99958872e4 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -1080,6 +1080,9 @@ int __init early_init_dt_scan_chosen(char *cmdline) p = of_get_flat_dt_prop(node, "bootargs", &l); if (p != NULL && l > 0) strscpy(cmdline, p, min(l, COMMAND_LINE_SIZE)); + p = of_get_flat_dt_prop(node, "bootargs-append", &l); + if (p != NULL && l > 0) + strlcat(cmdline, p, min_t(int, strlen(cmdline) + l, COMMAND_LINE_SIZE)); handle_cmdline: /* -- 2.43.0