Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/818769/?format=api
{ "id": 818769, "url": "http://patchwork.ozlabs.org/api/patches/818769/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/1506448161-30961-2-git-send-email-kdinh@apm.com/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api", "name": "Linux PCI development", "link_name": "linux-pci", "list_id": "linux-pci.vger.kernel.org", "list_email": "linux-pci@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1506448161-30961-2-git-send-email-kdinh@apm.com>", "list_archive_url": null, "date": "2017-09-26T17:49:20", "name": "[v4,pci,1/2] PCI/MSI: pci-xgene-msi: Enable MSI support in ACPI boot for X-Gene v1", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "0dfae3584d4e4c79f78c6a1496f3b609d415fec1", "submitter": { "id": 71514, "url": "http://patchwork.ozlabs.org/api/people/71514/?format=api", "name": "Khuong Dinh", "email": "kdinh@apm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/1506448161-30961-2-git-send-email-kdinh@apm.com/mbox/", "series": [ { "id": 5205, "url": "http://patchwork.ozlabs.org/api/series/5205/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=5205", "date": "2017-09-26T17:49:19", "name": "PCI/MSI: pci-xgene-msi: Enable MSI support in ACPI boot for X-Gene v1", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/5205/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/818769/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/818769/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-pci-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-pci-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y1pw71t4pz9t3x\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 27 Sep 2017 04:12:55 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1031342AbdIZSM3 (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tTue, 26 Sep 2017 14:12:29 -0400", "from [198.137.200.161] ([198.137.200.161]:58415 \"EHLO\n\tdenmail01.amcc.com\" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org\n\twith ESMTP id S1031301AbdIZSM0 (ORCPT\n\t<rfc822; linux-pci@vger.kernel.org>); Tue, 26 Sep 2017 14:12:26 -0400", "from apm.com (denlwv018.amcc.com [10.88.160.121])\n\tby denmail01.amcc.com (8.13.8/8.13.8) with ESMTP id v8QHnbDv001998;\n\tTue, 26 Sep 2017 11:49:37 -0600", "(from kdinh@localhost)\n\tby apm.com (8.14.4/8.14.4/Submit) id v8QHnbKp031009;\n\tTue, 26 Sep 2017 11:49:37 -0600" ], "From": "Khuong Dinh <kdinh@apm.com>", "To": "lorenzo.pieralisi@arm.com, marc.zyngier@arm.com,\n\tmsalter@redhat.com, bhelgaas@google.com, linux-pci@vger.kernel.org,\n\tjcm@redhat.com", "Cc": "patches@apm.com, linux-kernel@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org, rjw@rjwysocki.net,\n\tKhuong Dinh <kdinh@apm.com>", "Subject": "[PATCH v4 pci 1/2] PCI/MSI: pci-xgene-msi: Enable MSI support in\n\tACPI boot for X-Gene v1", "Date": "Tue, 26 Sep 2017 11:49:20 -0600", "Message-Id": "<1506448161-30961-2-git-send-email-kdinh@apm.com>", "X-Mailer": "git-send-email 1.7.1", "In-Reply-To": "<1506448161-30961-1-git-send-email-kdinh@apm.com>", "References": "<1506448161-30961-1-git-send-email-kdinh@apm.com>", "Sender": "linux-pci-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-pci.vger.kernel.org>", "X-Mailing-List": "linux-pci@vger.kernel.org" }, "content": "This patch makes pci-xgene-msi driver ACPI-aware and provides\nMSI capability for X-Gene v1 PCIe controllers in ACPI boot mode.\n\nSigned-off-by: Khuong Dinh <kdinh@apm.com>\n [Take over from Duc Dang]\n---\n drivers/pci/host/pci-xgene-msi.c | 38 +++++++++++++++++++++++++++++++++++---\n 1 files changed, 35 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/pci/host/pci-xgene-msi.c b/drivers/pci/host/pci-xgene-msi.c\nindex 1f42a20..d657248 100644\n--- a/drivers/pci/host/pci-xgene-msi.c\n+++ b/drivers/pci/host/pci-xgene-msi.c\n@@ -4,6 +4,7 @@\n * Copyright (c) 2014, Applied Micro Circuits Corporation\n * Author: Tanmay Inamdar <tinamdar@apm.com>\n *\t Duc Dang <dhdang@apm.com>\n+ *\t Khuong Dinh <kdinh@apm.com>\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the\n@@ -24,6 +25,7 @@\n #include <linux/pci.h>\n #include <linux/platform_device.h>\n #include <linux/of_pci.h>\n+#include <linux/acpi.h>\n \n #define MSI_IR0\t\t\t0x000000\n #define MSI_INT0\t\t0x800000\n@@ -39,7 +41,7 @@ struct xgene_msi_group {\n };\n \n struct xgene_msi {\n-\tstruct device_node\t*node;\n+\tstruct fwnode_handle\t*fwnode;\n \tstruct irq_domain\t*inner_domain;\n \tstruct irq_domain\t*msi_domain;\n \tu64\t\t\tmsi_addr;\n@@ -249,6 +251,13 @@ static void xgene_irq_domain_free(struct irq_domain *domain,\n \t.free = xgene_irq_domain_free,\n };\n \n+#ifdef CONFIG_ACPI\n+static struct fwnode_handle *xgene_msi_get_fwnode(struct device *dev)\n+{\n+\treturn xgene_msi_ctrl.fwnode;\n+}\n+#endif\n+\n static int xgene_allocate_domains(struct xgene_msi *msi)\n {\n \tmsi->inner_domain = irq_domain_add_linear(NULL, NR_MSI_VEC,\n@@ -256,7 +265,7 @@ static int xgene_allocate_domains(struct xgene_msi *msi)\n \tif (!msi->inner_domain)\n \t\treturn -ENOMEM;\n \n-\tmsi->msi_domain = pci_msi_create_irq_domain(of_node_to_fwnode(msi->node),\n+\tmsi->msi_domain = pci_msi_create_irq_domain(msi->fwnode,\n \t\t\t\t\t\t &xgene_msi_domain_info,\n \t\t\t\t\t\t msi->inner_domain);\n \n@@ -265,6 +274,9 @@ static int xgene_allocate_domains(struct xgene_msi *msi)\n \t\treturn -ENOMEM;\n \t}\n \n+#ifdef CONFIG_ACPI\n+\tpci_msi_register_fwnode_provider(&xgene_msi_get_fwnode);\n+#endif\n \treturn 0;\n }\n \n@@ -449,6 +461,14 @@ static int xgene_msi_hwirq_free(unsigned int cpu)\n \t{},\n };\n \n+#ifdef CONFIG_ACPI\n+static const struct acpi_device_id xgene_msi_acpi_ids[] = {\n+\t{\"APMC0D0E\", 0},\n+\t{ },\n+};\n+MODULE_DEVICE_TABLE(acpi, xgene_msi_acpi_ids);\n+#endif\n+\n static int xgene_msi_probe(struct platform_device *pdev)\n {\n \tstruct resource *res;\n@@ -469,7 +489,18 @@ static int xgene_msi_probe(struct platform_device *pdev)\n \t\tgoto error;\n \t}\n \txgene_msi->msi_addr = res->start;\n-\txgene_msi->node = pdev->dev.of_node;\n+\n+\txgene_msi->fwnode = of_node_to_fwnode(pdev->dev.of_node);\n+\tif (!xgene_msi->fwnode) {\n+\t\txgene_msi->fwnode =\n+\t\t\tirq_domain_alloc_fwnode((void *)xgene_msi->msi_addr);\n+\t\tif (!xgene_msi->fwnode) {\n+\t\t\tdev_err(&pdev->dev, \"Failed to create fwnode\\n\");\n+\t\t\trc = ENOMEM;\n+\t\t\tgoto error;\n+\t\t}\n+\t}\n+\n \txgene_msi->num_cpus = num_possible_cpus();\n \n \trc = xgene_msi_init_allocator(xgene_msi);\n@@ -540,6 +571,7 @@ static int xgene_msi_probe(struct platform_device *pdev)\n \t.driver = {\n \t\t.name = \"xgene-msi\",\n \t\t.of_match_table = xgene_msi_match_table,\n+\t\t.acpi_match_table = ACPI_PTR(xgene_msi_acpi_ids),\n \t},\n \t.probe = xgene_msi_probe,\n \t.remove = xgene_msi_remove,\n", "prefixes": [ "v4", "pci", "1/2" ] }