Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/806991/?format=api
{ "id": 806991, "url": "http://patchwork.ozlabs.org/api/patches/806991/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170829073404.8885-7-aik@ozlabs.ru/", "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": "<20170829073404.8885-7-aik@ozlabs.ru>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20170829073404.8885-7-aik@ozlabs.ru/", "date": "2017-08-29T07:34:04", "name": "[kernel,v2,6/6] powerpc/pci: Remove OF node back pointer from pci_dn", "commit_ref": "f1e08232ede8d1888d51e94940645f93a8462d75", "pull_url": null, "state": "accepted", "archived": false, "hash": "3fd5fe9dc91aa0aa687bc4697ea0bef610f0c902", "submitter": { "id": 7621, "url": "http://patchwork.ozlabs.org/api/people/7621/?format=api", "name": "Alexey Kardashevskiy", "email": "aik@ozlabs.ru" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170829073404.8885-7-aik@ozlabs.ru/mbox/", "series": [ { "id": 322, "url": "http://patchwork.ozlabs.org/api/series/322/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=322", "date": "2017-08-29T07:34:01", "name": "powerpc/eeh: Some cleanups", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/322/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/806991/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/806991/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<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" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xhL8Q4SGJz9t33\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 29 Aug 2017 17:37:58 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xhL8Q3ZcpzDrL5\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 29 Aug 2017 17:37:58 +1000 (AEST)", "from ozlabs.ru (ozlabs.ru [107.173.13.209])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xhL493gKyzDqTt\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue, 29 Aug 2017 17:34:17 +1000 (AEST)", "from vpl1.ozlabs.ibm.com (localhost [IPv6:::1])\n\tby ozlabs.ru (Postfix) with ESMTP id 04A103A60054;\n\tTue, 29 Aug 2017 03:35:23 -0400 (EDT)" ], "From": "Alexey Kardashevskiy <aik@ozlabs.ru>", "To": "linuxppc-dev@lists.ozlabs.org", "Subject": "[PATCH kernel v2 6/6] powerpc/pci: Remove OF node back pointer from\n\tpci_dn", "Date": "Tue, 29 Aug 2017 17:34:04 +1000", "Message-Id": "<20170829073404.8885-7-aik@ozlabs.ru>", "X-Mailer": "git-send-email 2.11.0", "In-Reply-To": "<20170829073404.8885-1-aik@ozlabs.ru>", "References": "<20170829073404.8885-1-aik@ozlabs.ru>", "X-BeenThere": "linuxppc-dev@lists.ozlabs.org", "X-Mailman-Version": "2.1.23", "Precedence": "list", "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<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\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>", "Cc": "Alexey Kardashevskiy <aik@ozlabs.ru>,\n\tAndrew Donnellan <andrew.donnellan@au1.ibm.com>", "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org", "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>" }, "content": "The check_req() helper uses pci_get_pdn() to get an OF node pointer.\npci_get_pdn() returns a pci_dn pointer which either:\n1) from the OF node returned by pci_device_to_OF_node();\n2) from the parent child_list where entries don't have OF node pointers.\nSince check_req() does not care about 2), it can call\npci_device_to_OF_node() directly, hence the change.\n\nThe find_pe_dn() helper uses embedded pci_dn to get an OF node which is\nalso stored in edev->pdev so let's take a shortcut and call\npci_device_to_OF_node() directly.\n\nWith these 2 changes, we can finally get rid of the OF node back pointer.\n\nSigned-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>\n---\nChangelog:\nv2:\n* fixed pseries platform\n---\n arch/powerpc/include/asm/pci-bridge.h | 1 -\n arch/powerpc/kernel/pci_dn.c | 1 -\n arch/powerpc/platforms/pseries/msi.c | 11 ++---------\n 3 files changed, 2 insertions(+), 11 deletions(-)", "diff": "diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h\nindex 56c67d3f0108..0b8aa1fe2d5f 100644\n--- a/arch/powerpc/include/asm/pci-bridge.h\n+++ b/arch/powerpc/include/asm/pci-bridge.h\n@@ -195,7 +195,6 @@ struct pci_dn {\n \tstruct pci_dn *parent;\n \tstruct pci_controller *phb;\t/* for pci devices */\n \tstruct\tiommu_table_group *table_group;\t/* for phb's or bridges */\n-\tstruct\tdevice_node *node;\t/* back-pointer to the device_node */\n \n \tint\tpci_ext_config_space;\t/* for pci devices */\n \ndiff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c\nindex dfb107631116..0e395afbf0f4 100644\n--- a/arch/powerpc/kernel/pci_dn.c\n+++ b/arch/powerpc/kernel/pci_dn.c\n@@ -293,7 +293,6 @@ struct pci_dn *pci_add_device_node_info(struct pci_controller *hose,\n \tif (pdn == NULL)\n \t\treturn NULL;\n \tdn->data = pdn;\n-\tpdn->node = dn;\n \tpdn->phb = hose;\n #ifdef CONFIG_PPC_POWERNV\n \tpdn->pe_number = IODA_INVALID_PE;\ndiff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c\nindex 326ef0dd6038..70b7aeff8139 100644\n--- a/arch/powerpc/platforms/pseries/msi.c\n+++ b/arch/powerpc/platforms/pseries/msi.c\n@@ -132,15 +132,10 @@ static void rtas_teardown_msi_irqs(struct pci_dev *pdev)\n static int check_req(struct pci_dev *pdev, int nvec, char *prop_name)\n {\n \tstruct device_node *dn;\n-\tstruct pci_dn *pdn;\n \tconst __be32 *p;\n \tu32 req_msi;\n \n-\tpdn = pci_get_pdn(pdev);\n-\tif (!pdn)\n-\t\treturn -ENODEV;\n-\n-\tdn = pdn->node;\n+\tdn = pci_device_to_OF_node(pdev);\n \n \tp = of_get_property(dn, prop_name, NULL);\n \tif (!p) {\n@@ -197,7 +192,6 @@ static struct device_node *find_pe_total_msi(struct pci_dev *dev, int *total)\n static struct device_node *find_pe_dn(struct pci_dev *dev, int *total)\n {\n \tstruct device_node *dn;\n-\tstruct pci_dn *pdn;\n \tstruct eeh_dev *edev;\n \n \t/* Found our PE and assume 8 at that point. */\n@@ -210,8 +204,7 @@ static struct device_node *find_pe_dn(struct pci_dev *dev, int *total)\n \tedev = pdn_to_eeh_dev(PCI_DN(dn));\n \tif (edev->pe)\n \t\tedev = list_first_entry(&edev->pe->edevs, struct eeh_dev, list);\n-\tpdn = eeh_dev_to_pdn(edev);\n-\tdn = pdn ? pdn->node : NULL;\n+\tdn = pci_device_to_OF_node(edev->pdev);\n \tif (!dn)\n \t\treturn NULL;\n \n", "prefixes": [ "kernel", "v2", "6/6" ] }