Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/810988/?format=api
{ "id": 810988, "url": "http://patchwork.ozlabs.org/api/patches/810988/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/1504784522-26841-5-git-send-email-yamada.masahiro@socionext.com/", "project": { "id": 42, "url": "http://patchwork.ozlabs.org/api/projects/42/?format=api", "name": "Linux GPIO development", "link_name": "linux-gpio", "list_id": "linux-gpio.vger.kernel.org", "list_email": "linux-gpio@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1504784522-26841-5-git-send-email-yamada.masahiro@socionext.com>", "list_archive_url": null, "date": "2017-09-07T11:42:00", "name": "[v4,4/6] irqdomain: set irq domain flags before the irq domain becomes visible", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "0b1c9289a6051a6dc9500d89ab55eaf3931d854b", "submitter": { "id": 65882, "url": "http://patchwork.ozlabs.org/api/people/65882/?format=api", "name": "Masahiro Yamada", "email": "yamada.masahiro@socionext.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/1504784522-26841-5-git-send-email-yamada.masahiro@socionext.com/mbox/", "series": [ { "id": 1983, "url": "http://patchwork.ozlabs.org/api/series/1983/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=1983", "date": "2017-09-07T11:41:57", "name": "irqdomain, gpio: expand irq_domain_push_irq() for DT use and use it for GPIO", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/1983/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/810988/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/810988/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-gpio-owner@vger.kernel.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-gpio-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=nifty.com header.i=@nifty.com\n\theader.b=\"DFUkWbNO\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnzDg0Bv2z9s2G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 7 Sep 2017 21:46:11 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1755182AbdIGLn6 (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tThu, 7 Sep 2017 07:43:58 -0400", "from conuserg-09.nifty.com ([210.131.2.76]:17180 \"EHLO\n\tconuserg-09.nifty.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1755163AbdIGLn5 (ORCPT\n\t<rfc822; linux-gpio@vger.kernel.org>); Thu, 7 Sep 2017 07:43:57 -0400", "from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp\n\t[153.142.97.92]) (authenticated)\n\tby conuserg-09.nifty.com with ESMTP id v87BgcP2021413;\n\tThu, 7 Sep 2017 20:42:44 +0900" ], "DKIM-Filter": "OpenDKIM Filter v2.10.3 conuserg-09.nifty.com v87BgcP2021413", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com;\n\ts=dec2015msa; t=1504784564;\n\tbh=K0SPZy6FWHXrck+Vg0x5IlSdYX0byZWh3KRufW7XNwU=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=DFUkWbNOt4HSvjairCylmMN+cLgJJsBwn6PlYMg+BkcAaZae0W0+DmfYRsqt1dEHS\n\ttjN09t/To+FciSbxZViapTFTtEiqvFzT4tZN4nRH/8PIz7zsdmYV1vsGvnkRc84W1+\n\tt18G04RSo1qzAD3wL388GZHrLdkSLMWh2YWj+NKl9jCvMOvuKCBxjeO/C+3T4F88j1\n\tCUYCyP21asMpZHu6ksOSR8EEP6CZ8/Bg7f+5u3HS6N5AuWsr7brMzkw70Sjzc3Plkg\n\t+9vPDwbhtVh5r82O4h1ejAnwZ/aDD0DLAydXp3FS+sv7+IgJEN415RJIJ96eLxyO1u\n\t5ADB/LNhyYGqQ==", "X-Nifty-SrcIP": "[153.142.97.92]", "From": "Masahiro Yamada <yamada.masahiro@socionext.com>", "To": "Marc Zyngier <marc.zyngier@arm.com>,\n\tThomas Gleixner <tglx@linutronix.de>,\n\tLinus Walleij <linus.walleij@linaro.org>,\n\tlinux-gpio@vger.kernel.org, Rob Herring <robh+dt@kernel.org>", "Cc": "Jassi Brar <jaswinder.singh@linaro.org>,\n\tdevicetree@vger.kernel.org, Jason Cooper <jason@lakedaemon.net>,\n\tMasami Hiramatsu <mhiramat@kernel.org>,\n\tDavid Daney <david.daney@cavium.com>,\n\tMasahiro Yamada <yamada.masahiro@socionext.com>,\n\tlinux-kernel@vger.kernel.org", "Subject": "[PATCH v4 4/6] irqdomain: set irq domain flags before the irq\n\tdomain becomes visible", "Date": "Thu, 7 Sep 2017 20:42:00 +0900", "Message-Id": "<1504784522-26841-5-git-send-email-yamada.masahiro@socionext.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1504784522-26841-1-git-send-email-yamada.masahiro@socionext.com>", "References": "<1504784522-26841-1-git-send-email-yamada.masahiro@socionext.com>", "Sender": "linux-gpio-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-gpio.vger.kernel.org>", "X-Mailing-List": "linux-gpio@vger.kernel.org" }, "content": "irq_domain_create_hierarchy() sets additional flags after the domain\nis successfully allocated, but the domain becomes visible when it is\nadded to irq_domain_list. When a consumer gets the domain, the flags\nmay not have been set yet.\n\nMove \"domain->flags |= flags;\" into __irq_domain_add().\n\nSigned-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>\n---\n\nChanges in v4:\n - Newly added\n\n\n include/linux/irqdomain.h | 13 +++++++------\n kernel/irq/irqdomain.c | 19 +++++++++----------\n 2 files changed, 16 insertions(+), 16 deletions(-)", "diff": "diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h\nindex 31be32d..7609807 100644\n--- a/include/linux/irqdomain.h\n+++ b/include/linux/irqdomain.h\n@@ -237,7 +237,8 @@ static inline struct fwnode_handle *irq_domain_alloc_fwnode(void *data)\n }\n \n void irq_domain_free_fwnode(struct fwnode_handle *fwnode);\n-struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size,\n+struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode,\n+\t\t\t\t unsigned int flags, int size,\n \t\t\t\t irq_hw_number_t hwirq_max, int direct_max,\n \t\t\t\t const struct irq_domain_ops *ops,\n \t\t\t\t void *host_data);\n@@ -309,14 +310,14 @@ static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_no\n \t\t\t\t\t const struct irq_domain_ops *ops,\n \t\t\t\t\t void *host_data)\n {\n-\treturn __irq_domain_add(of_node_to_fwnode(of_node), size, size, 0, ops, host_data);\n+\treturn __irq_domain_add(of_node_to_fwnode(of_node), 0, size, size, 0, ops, host_data);\n }\n static inline struct irq_domain *irq_domain_add_nomap(struct device_node *of_node,\n \t\t\t\t\t unsigned int max_irq,\n \t\t\t\t\t const struct irq_domain_ops *ops,\n \t\t\t\t\t void *host_data)\n {\n-\treturn __irq_domain_add(of_node_to_fwnode(of_node), 0, max_irq, max_irq, ops, host_data);\n+\treturn __irq_domain_add(of_node_to_fwnode(of_node), 0, 0, max_irq, max_irq, ops, host_data);\n }\n static inline struct irq_domain *irq_domain_add_legacy_isa(\n \t\t\t\tstruct device_node *of_node,\n@@ -330,7 +331,7 @@ static inline struct irq_domain *irq_domain_add_tree(struct device_node *of_node\n \t\t\t\t\t const struct irq_domain_ops *ops,\n \t\t\t\t\t void *host_data)\n {\n-\treturn __irq_domain_add(of_node_to_fwnode(of_node), 0, ~0, 0, ops, host_data);\n+\treturn __irq_domain_add(of_node_to_fwnode(of_node), 0, 0, ~0, 0, ops, host_data);\n }\n \n static inline struct irq_domain *irq_domain_create_linear(struct fwnode_handle *fwnode,\n@@ -338,14 +339,14 @@ static inline struct irq_domain *irq_domain_create_linear(struct fwnode_handle *\n \t\t\t\t\t const struct irq_domain_ops *ops,\n \t\t\t\t\t void *host_data)\n {\n-\treturn __irq_domain_add(fwnode, size, size, 0, ops, host_data);\n+\treturn __irq_domain_add(fwnode, 0, size, size, 0, ops, host_data);\n }\n \n static inline struct irq_domain *irq_domain_create_tree(struct fwnode_handle *fwnode,\n \t\t\t\t\t const struct irq_domain_ops *ops,\n \t\t\t\t\t void *host_data)\n {\n-\treturn __irq_domain_add(fwnode, 0, ~0, 0, ops, host_data);\n+\treturn __irq_domain_add(fwnode, 0, 0, ~0, 0, ops, host_data);\n }\n \n extern void irq_domain_remove(struct irq_domain *host);\ndiff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c\nindex 18d11b9..b317a64 100644\n--- a/kernel/irq/irqdomain.c\n+++ b/kernel/irq/irqdomain.c\n@@ -115,6 +115,7 @@ EXPORT_SYMBOL_GPL(irq_domain_free_fwnode);\n /**\n * __irq_domain_add() - Allocate a new irq_domain data structure\n * @fwnode: firmware node for the interrupt controller\n+ * @flags:\tIrq domain flags associated to the domain\n * @size: Size of linear map; 0 for radix mapping only\n * @hwirq_max: Maximum number of interrupts supported by controller\n * @direct_max: Maximum value of direct maps; Use ~0 for no limit; 0 for no\n@@ -125,7 +126,8 @@ EXPORT_SYMBOL_GPL(irq_domain_free_fwnode);\n * Allocates and initialize and irq_domain structure.\n * Returns pointer to IRQ domain, or NULL on failure.\n */\n-struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size,\n+struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode,\n+\t\t\t\t unsigned int flags, int size,\n \t\t\t\t irq_hw_number_t hwirq_max, int direct_max,\n \t\t\t\t const struct irq_domain_ops *ops,\n \t\t\t\t void *host_data)\n@@ -213,6 +215,7 @@ struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size,\n \tINIT_RADIX_TREE(&domain->revmap_tree, GFP_KERNEL);\n \tdomain->ops = ops;\n \tdomain->host_data = host_data;\n+\tdomain->flags |= flags;\n \tdomain->hwirq_max = hwirq_max;\n \tdomain->revmap_size = size;\n \tdomain->revmap_direct_max_irq = direct_max;\n@@ -319,7 +322,7 @@ struct irq_domain *irq_domain_add_simple(struct device_node *of_node,\n {\n \tstruct irq_domain *domain;\n \n-\tdomain = __irq_domain_add(of_node_to_fwnode(of_node), size, size, 0, ops, host_data);\n+\tdomain = __irq_domain_add(of_node_to_fwnode(of_node), 0, size, size, 0, ops, host_data);\n \tif (!domain)\n \t\treturn NULL;\n \n@@ -363,7 +366,7 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,\n {\n \tstruct irq_domain *domain;\n \n-\tdomain = __irq_domain_add(of_node_to_fwnode(of_node), first_hwirq + size,\n+\tdomain = __irq_domain_add(of_node_to_fwnode(of_node), 0, first_hwirq + size,\n \t\t\t\t first_hwirq + size, 0, ops, host_data);\n \tif (domain)\n \t\tirq_domain_associate_many(domain, first_irq, first_hwirq, size);\n@@ -1133,14 +1136,10 @@ struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent,\n {\n \tstruct irq_domain *domain;\n \n-\tif (size)\n-\t\tdomain = irq_domain_create_linear(fwnode, size, ops, host_data);\n-\telse\n-\t\tdomain = irq_domain_create_tree(fwnode, ops, host_data);\n-\tif (domain) {\n+\tdomain = __irq_domain_add(fwnode, flags, size, size ? size : ~0, 0,\n+\t\t\t\t ops, host_data);\n+\tif (domain)\n \t\tdomain->parent = parent;\n-\t\tdomain->flags |= flags;\n-\t}\n \n \treturn domain;\n }\n", "prefixes": [ "v4", "4/6" ] }