Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/633501/?format=api
{ "id": 633501, "url": "http://patchwork.ozlabs.org/api/patches/633501/?format=api", "web_url": "http://patchwork.ozlabs.org/project/skiboot/patch/1465535032-26749-7-git-send-email-gwshan@linux.vnet.ibm.com/", "project": { "id": 44, "url": "http://patchwork.ozlabs.org/api/projects/44/?format=api", "name": "skiboot firmware development", "link_name": "skiboot", "list_id": "skiboot.lists.ozlabs.org", "list_email": "skiboot@lists.ozlabs.org", "web_url": "http://github.com/open-power/skiboot", "scm_url": "http://github.com/open-power/skiboot", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1465535032-26749-7-git-send-email-gwshan@linux.vnet.ibm.com>", "list_archive_url": null, "date": "2016-06-10T05:03:35", "name": "[v12,06/23] core/fdt: Allow to exclude root node", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "effbde6d8b715fc723e895899a2317f33e1a4641", "submitter": { "id": 63923, "url": "http://patchwork.ozlabs.org/api/people/63923/?format=api", "name": "Gavin Shan", "email": "gwshan@linux.vnet.ibm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/skiboot/patch/1465535032-26749-7-git-send-email-gwshan@linux.vnet.ibm.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/633501/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/633501/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "skiboot@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "skiboot@lists.ozlabs.org" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3rQqqN2cs8z9s5w\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 10 Jun 2016 15:05:04 +1000 (AEST)", "from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3rQqqM6q5wzDqPS\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 10 Jun 2016 15:05:03 +1000 (AEST)", "from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n\t[148.163.156.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3rQqqD4xRGzDq5s\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 15:04:56 +1000 (AEST)", "from pps.filterd (m0048827.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id\n\tu5A53tIP042596\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 01:04:54 -0400", "from e23smtp03.au.ibm.com (e23smtp03.au.ibm.com [202.81.31.145])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 23f9vdg1k0-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 01:04:54 -0400", "from localhost\n\tby e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <skiboot@lists.ozlabs.org> from <gwshan@linux.vnet.ibm.com>;\n\tFri, 10 Jun 2016 15:04:52 +1000", "from d23dlp03.au.ibm.com (202.81.31.214)\n\tby e23smtp03.au.ibm.com (202.81.31.209) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tFri, 10 Jun 2016 15:04:51 +1000", "from d23relay06.au.ibm.com (d23relay06.au.ibm.com [9.185.63.219])\n\tby d23dlp03.au.ibm.com (Postfix) with ESMTP id D8E0E3578067\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 15:04:38 +1000 (EST)", "from d23av06.au.ibm.com (d23av06.au.ibm.com [9.190.235.151])\n\tby d23relay06.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n\tu5A54Xdd13173160\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 15:04:33 +1000", "from d23av06.au.ibm.com (localhost [127.0.0.1])\n\tby d23av06.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id\n\tu5A54M0b013893\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 15:04:23 +1000", "from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.192.253.14])\n\tby d23av06.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id\n\tu5A54MBi013734; Fri, 10 Jun 2016 15:04:22 +1000", "from bran.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114])\n\tby ozlabs.au.ibm.com (Postfix) with ESMTP id 99C1DA0188;\n\tFri, 10 Jun 2016 15:03:56 +1000 (AEST)", "from gwshan (shangw.ozlabs.ibm.com [10.61.2.199])\n\tby bran.ozlabs.ibm.com (Postfix) with ESMTP id 971BCE3B1A;\n\tFri, 10 Jun 2016 15:03:56 +1000 (AEST)", "by gwshan (Postfix, from userid 1000)\n\tid 76F39942CA3; Fri, 10 Jun 2016 15:03:56 +1000 (AEST)" ], "X-IBM-Helo": "d23dlp03.au.ibm.com", "X-IBM-MailFrom": "gwshan@linux.vnet.ibm.com", "X-IBM-RcptTo": "skiboot@lists.ozlabs.org", "From": "Gavin Shan <gwshan@linux.vnet.ibm.com>", "To": "skiboot@lists.ozlabs.org", "Date": "Fri, 10 Jun 2016 15:03:35 +1000", "X-Mailer": "git-send-email 2.1.0", "In-Reply-To": "<1465535032-26749-1-git-send-email-gwshan@linux.vnet.ibm.com>", "References": "<1465535032-26749-1-git-send-email-gwshan@linux.vnet.ibm.com>", "X-TM-AS-MML": "disable", "X-Content-Scanned": "Fidelis XPS MAILER", "x-cbid": "16061005-0008-0000-0000-0000009716E6", "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused", "x-cbparentid": "16061005-0009-0000-0000-0000076DBD29", "Message-Id": "<1465535032-26749-7-git-send-email-gwshan@linux.vnet.ibm.com>", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2016-06-10_04:, , signatures=0", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=3\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000\n\tdefinitions=main-1606100058", "Subject": "[Skiboot] [PATCH v12 06/23] core/fdt: Allow to exclude root node", "X-BeenThere": "skiboot@lists.ozlabs.org", "X-Mailman-Version": "2.1.22", "Precedence": "list", "List-Id": "Mailing list for skiboot development <skiboot.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/skiboot/>", "List-Post": "<mailto:skiboot@lists.ozlabs.org>", "List-Help": "<mailto:skiboot-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=subscribe>", "Cc": "alistair@popple.id.au", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org", "Sender": "\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>" }, "content": "The root node is excluded in the device sub-tree created during\nPCI hot add time. This adds one extra argument @exclusive to\nflatten_dt_node(), __create_dtb() and create_dtb() to indicate\nthe root node should be excluded or not. The changes are going\nto be used by PCI hot add path and it's not affecting anything\nat present.\n\nSigned-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>\n---\n core/fdt.c | 29 ++++++++++++++++++-----------\n core/init.c | 2 +-\n include/skiboot.h | 2 +-\n 3 files changed, 20 insertions(+), 13 deletions(-)", "diff": "diff --git a/core/fdt.c b/core/fdt.c\nindex fbfbac6..71149fe 100644\n--- a/core/fdt.c\n+++ b/core/fdt.c\n@@ -130,17 +130,22 @@ static void flatten_dt_properties(void *fdt, const struct dt_node *dn)\n \t}\n }\n \n-static void flatten_dt_node(void *fdt, const struct dt_node *root)\n+static void flatten_dt_node(void *fdt, const struct dt_node *root,\n+\t\t\t bool exclusive)\n {\n \tconst struct dt_node *i;\n \n-\tFDT_DBG(\"node: %s\\n\", root->name);\n-\tdt_begin_node(fdt, root);\n-\tflatten_dt_properties(fdt, root);\n+\tif (!exclusive) {\n+\t\tFDT_DBG(\"node: %s\\n\", root->name);\n+\t\tdt_begin_node(fdt, root);\n+\t\tflatten_dt_properties(fdt, root);\n+\t}\n+\n \tlist_for_each(&root->children, i, list)\n-\t\tflatten_dt_node(fdt, i);\n+\t\tflatten_dt_node(fdt, i, false);\n \n-\tdt_end_node(fdt);\n+\tif (!exclusive)\n+\t\tdt_end_node(fdt);\n }\n \n static void create_dtb_reservemap(void *fdt, const struct dt_node *root)\n@@ -166,11 +171,13 @@ static void create_dtb_reservemap(void *fdt, const struct dt_node *root)\n }\n \n static int __create_dtb(void *fdt, size_t len,\n-\t\t\tconst struct dt_node *root)\n+\t\t\tconst struct dt_node *root,\n+\t\t\tbool exclusive)\n {\n \tfdt_create(fdt, len);\n-\tcreate_dtb_reservemap(fdt, root);\n-\tflatten_dt_node(fdt, root);\n+\tif (root == dt_root && !exclusive)\n+\t\tcreate_dtb_reservemap(fdt, root);\n+\tflatten_dt_node(fdt, root, exclusive);\n \n \tsave_err(fdt_finish(fdt));\n \tif (fdt_error) {\n@@ -182,7 +189,7 @@ static int __create_dtb(void *fdt, size_t len,\n \treturn 0;\n }\n \n-void *create_dtb(const struct dt_node *root)\n+void *create_dtb(const struct dt_node *root, bool exclusive)\n {\n \tvoid *fdt = NULL;\n \tsize_t len = DEVICE_TREE_MAX_SIZE;\n@@ -198,7 +205,7 @@ void *create_dtb(const struct dt_node *root)\n \t\t\treturn NULL;\n \t\t}\n \n-\t\tret = __create_dtb(fdt, len, root);\n+\t\tret = __create_dtb(fdt, len, root, exclusive);\n \t\tif (ret) {\n \t\t\tfree(fdt);\n \t\t\tfdt = NULL;\ndiff --git a/core/init.c b/core/init.c\nindex 4542a1d..67b539b 100644\n--- a/core/init.c\n+++ b/core/init.c\n@@ -452,7 +452,7 @@ void __noreturn load_and_boot_kernel(bool is_reboot)\n \top_display(OP_LOG, OP_MOD_INIT, 0x000B);\n \n \t/* Create the device tree blob to boot OS. */\n-\tfdt = create_dtb(dt_root);\n+\tfdt = create_dtb(dt_root, false);\n \tif (!fdt) {\n \t\top_display(OP_FATAL, OP_MOD_INIT, 2);\n \t\tabort();\ndiff --git a/include/skiboot.h b/include/skiboot.h\nindex a878d21..ded6bb8 100644\n--- a/include/skiboot.h\n+++ b/include/skiboot.h\n@@ -251,7 +251,7 @@ extern void prd_init(void);\n extern void prd_register_reserved_memory(void);\n \n /* Flatten device-tree */\n-extern void *create_dtb(const struct dt_node *root);\n+extern void *create_dtb(const struct dt_node *root, bool exclusive);\n \n /* SLW reinit function for switching core settings */\n extern int64_t slw_reinit(uint64_t flags);\n", "prefixes": [ "v12", "06/23" ] }