Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1466841/?format=api
{ "id": 1466841, "url": "http://patchwork.ozlabs.org/api/patches/1466841/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210416040924.2882771-8-danielwa@cisco.com/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<20210416040924.2882771-8-danielwa@cisco.com>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20210416040924.2882771-8-danielwa@cisco.com/", "date": "2021-04-16T04:09:18", "name": "[7/8] of: allow sending a NULL value to early_init_dt_scan_chosen", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "8acfe334d5e08c910798202e0d034588f392c0c2", "submitter": { "id": 67374, "url": "http://patchwork.ozlabs.org/api/people/67374/?format=api", "name": "Daniel Walker (danielwa)", "email": "danielwa@cisco.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210416040924.2882771-8-danielwa@cisco.com/mbox/", "series": [ { "id": 239425, "url": "http://patchwork.ozlabs.org/api/series/239425/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=239425", "date": "2021-04-16T04:09:11", "name": "generic command line v4", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/239425/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1466841/comments/", "check": "warning", "checks": "http://patchwork.ozlabs.org/api/patches/1466841/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Authentication-Results": [ "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=112.213.38.117; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org;\n receiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=cisco.com header.i=@cisco.com header.a=rsa-sha256\n header.s=iport header.b=KdO6oPwx;\n\tdkim-atps=neutral", "lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=cisco.com header.i=@cisco.com header.a=rsa-sha256\n header.s=iport header.b=KdO6oPwx;\n\tdkim-atps=neutral", "lists.ozlabs.org; spf=pass (sender SPF authorized)\n smtp.mailfrom=cisco.com (client-ip=173.37.86.78; helo=rcdn-iport-7.cisco.com;\n envelope-from=danielwa@cisco.com; receiver=<UNKNOWN>)", "lists.ozlabs.org; dkim=pass (1024-bit key;\n unprotected) header.d=cisco.com header.i=@cisco.com header.a=rsa-sha256\n header.s=iport header.b=KdO6oPwx; dkim-atps=neutral" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4FM2r55p4bz9sVv\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 16 Apr 2021 14:13:09 +1000 (AEST)", "from boromir.ozlabs.org (localhost [IPv6:::1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4FM2r54wklz3c9t\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 16 Apr 2021 14:13:09 +1000 (AEST)", "from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n bits)) (No client certificate requested)\n by lists.ozlabs.org (Postfix) with ESMTPS id 4FM2m768Npz3br1\n for <linuxppc-dev@lists.ozlabs.org>; Fri, 16 Apr 2021 14:09:43 +1000 (AEST)", "from alln-core-6.cisco.com ([173.36.13.139])\n by rcdn-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA;\n 16 Apr 2021 04:09:40 +0000", "from zorba.cisco.com ([10.24.7.67])\n by alln-core-6.cisco.com (8.15.2/8.15.2) with ESMTP id 13G49OHm016753;\n Fri, 16 Apr 2021 04:09:39 GMT" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=cisco.com; i=@cisco.com; l=3912; q=dns/txt; s=iport;\n t=1618546183; x=1619755783;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=VP7PAoaR3l2w3et6aEwl6bAiAhFA9JKl6Z/MedxCeK8=;\n b=KdO6oPwx6NgLC3SBQsSM8Teex/WenXlC05iTRxTTt8VYQtqEGD/clB9o\n 8orrc5czKbyK0aLVgsa2dMKFeQEtqimKexhIdEOcSRiRVwcSMRd4RjDBT\n iBb70Y/wraTfUnIulKNDR5p1YqHUteYSKdsCZjSUreJCxrAl06VYWNtUb 4=;", "IronPort-HdrOrdr": "\n A9a23:fmS0yqCf5eLAQ2PlHejxsceALOonbusQ8zAX/mp6ICY4TuWzkceykPMHkSLugDEKV3063fyGMq+MQXTTnKQFhbU5EL++UGDd1leAA5pl6eLZqQHIOyq7zeJF0LclTq4WMqySMXFfreLXpDa1CMwhxt7vytHMuc77w212RQ9nL4Fshj0ZNi+hHkd7RBZLCPMCffL22uN9qzWtYngRZMigb0N1PdTrncHBl57tfHc9aCIP1Q/mt16VwY+/OwSE2FMkXylXx7A5/Sz+jxXh/am4qZiAu3jh/l6Wy5xXndf7o+EiOOW8zu4INz7rlgGkIKNmVrHqhkFNnMifrHA3jdLLvxAse/5W1kqUVGS0rRzxsjOQtgoT1w==", "X-IronPort-Anti-Spam-Filtered": "true", "X-IronPort-Anti-Spam-Result": "\n A0BMAABLDXlg/4sNJK1aHAEBAQEBAQcBARIBAQQEAQGBfgcBAQsBAYF6L4FNATkxjGeJTYEMlCyFNoF8CwEBAQ80BAEBhFACgXMCJTQJDgIDAQEMAQEFAQEBAgEGBHEThV1DFgGFawYyAUYQHTRJDgYBEoJxgwisB4IrgQGIM4FEFIElAYhrdIN1JxyBSUKBE4JsdIo5BIJABwaBCII6IwGRG41TnC2DFoEmm1EPI6R8LZRro2KBVDqBWTMaCBsVgyRQGQ6OKxaBAgECjGYBWyEDLzgCBgoBAQMJiU6DQAEB", "X-IronPort-AV": "E=Sophos;i=\"5.82,226,1613433600\"; d=\"scan'208\";a=\"871030791\"", "From": "Daniel Walker <danielwa@cisco.com>", "To": "Will Deacon <will@kernel.org>,\n Christophe Leroy <christophe.leroy@csgroup.eu>,\n Rob Herring <robh@kernel.org>,\n Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>,\n Andrew Morton <akpm@linux-foundation.org>, x86@kernel.org,\n linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,\n Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>", "Subject": "[PATCH 7/8] of: allow sending a NULL value to\n early_init_dt_scan_chosen", "Date": "Thu, 15 Apr 2021 21:09:18 -0700", "Message-Id": "<20210416040924.2882771-8-danielwa@cisco.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210416040924.2882771-1-danielwa@cisco.com>", "References": "<20210416040924.2882771-1-danielwa@cisco.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Auto-Response-Suppress": "DR, OOF, AutoReply", "X-Outbound-SMTP-Client": "10.24.7.67, [10.24.7.67]", "X-Outbound-Node": "alln-core-6.cisco.com", "X-BeenThere": "linuxppc-dev@lists.ozlabs.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "Linux on PowerPC Developers Mail List <linuxppc-dev.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>", "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>", "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>", "Cc": "devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,\n xe-linux-external@cisco.com", "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org", "Sender": "\"Linuxppc-dev\"\n <linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>" }, "content": "It's possible that an architecture may want to populate\nboot_command_line before calling the device tree code.\nCurrently, early_init_dt_scan_chosen won't accept a NULL\nin the data parameter and it returns immediately if you\nsend one.\n\nI changed early_init_dt_scan_nodes() to send a NULL into\nearly_init_dt_scan_chosen() , then I made\nearly_init_dt_scan_chosen() to do the initrd checking, and\nthe rng-seed checking and skip all the command line related\ncode.\n\nGiven lots of changes to the command line, I think it makes sense\nto allow the initrd code and rng-seed code to be run without\nforcing the command line handling. I'm also submitting changes\nto arm64 which populate boot_command_line much early and this\ndevice tree code overwrites boot_command_line in that case.\n\nThis code depends on all architecture to have a NULL\nboot_command_line at boot up when this function runs, unless\nit's already populated.\n\nThis code was boot tested on powerpc 32bit, x86, and arm64.\n\nCc: xe-linux-external@cisco.com\nSigned-off-by: Daniel Walker <danielwa@cisco.com>\n---\n drivers/of/fdt.c | 44 +++++++++++++++++++++++++-------------------\n 1 file changed, 25 insertions(+), 19 deletions(-)", "diff": "diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c\nindex adb26aff481d..a1fda952ce60 100644\n--- a/drivers/of/fdt.c\n+++ b/drivers/of/fdt.c\n@@ -1052,36 +1052,38 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,\n \n \tpr_debug(\"search \\\"chosen\\\", depth: %d, uname: %s\\n\", depth, uname);\n \n-\tif (depth != 1 || !data ||\n-\t (strcmp(uname, \"chosen\") != 0 && strcmp(uname, \"chosen@0\") != 0))\n+\tif (depth != 1 || (strcmp(uname, \"chosen\") != 0\n+\t\t\t\t&& strcmp(uname, \"chosen@0\") != 0))\n \t\treturn 0;\n \n \tearly_init_dt_check_for_initrd(node);\n \n-\t/* Retrieve command line */\n-\tp = of_get_flat_dt_prop(node, \"bootargs\", &l);\n-\tif (p != NULL && l > 0)\n-\t\tstrlcpy(data, p, min(l, COMMAND_LINE_SIZE));\n+\tif (data) {\n+\t\t/* Retrieve command line */\n+\t\tp = of_get_flat_dt_prop(node, \"bootargs\", &l);\n+\t\tif (p != NULL && l > 0)\n+\t\t\tstrlcpy(data, p, min(l, COMMAND_LINE_SIZE));\n \n-\t/*\n-\t * CONFIG_CMDLINE is meant to be a default in case nothing else\n-\t * managed to set the command line, unless CONFIG_CMDLINE_FORCE\n-\t * is set in which case we override whatever was found earlier.\n-\t */\n+\t\t/*\n+\t\t * CONFIG_CMDLINE is meant to be a default in case nothing else\n+\t\t * managed to set the command line, unless CONFIG_CMDLINE_FORCE\n+\t\t * is set in which case we override whatever was found earlier.\n+\t\t */\n #ifdef CONFIG_CMDLINE\n #if defined(CONFIG_CMDLINE_EXTEND)\n-\tstrlcat(data, \" \", COMMAND_LINE_SIZE);\n-\tstrlcat(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);\n+\t\tstrlcat(data, \" \", COMMAND_LINE_SIZE);\n+\t\tstrlcat(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);\n #elif defined(CONFIG_CMDLINE_FORCE)\n-\tstrlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);\n-#else\n-\t/* No arguments from boot loader, use kernel's cmdl*/\n-\tif (!((char *)data)[0])\n \t\tstrlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);\n+#else\n+\t\t/* No arguments from boot loader, use kernel's cmdl*/\n+\t\tif (!((char *)data)[0])\n+\t\t\tstrlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);\n #endif\n #endif /* CONFIG_CMDLINE */\n \n-\tpr_debug(\"Command line is: %s\\n\", (char *)data);\n+\t\tpr_debug(\"Command line is: %s\\n\", (char *)data);\n+\t}\n \n \trng_seed = of_get_flat_dt_prop(node, \"rng-seed\", &l);\n \tif (rng_seed && l > 0) {\n@@ -1202,7 +1204,11 @@ void __init early_init_dt_scan_nodes(void)\n \tint rc = 0;\n \n \t/* Retrieve various information from the /chosen node */\n-\trc = of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line);\n+\tif (boot_command_line[0])\n+\t\trc = of_scan_flat_dt(early_init_dt_scan_chosen, NULL);\n+\telse\n+\t\trc = of_scan_flat_dt(early_init_dt_scan_chosen,\n+\t\t\t\t\tboot_command_line);\n \tif (!rc)\n \t\tpr_warn(\"No chosen node found, continuing without\\n\");\n \n", "prefixes": [ "7/8" ] }