Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1035060/?format=api
{ "id": 1035060, "url": "http://patchwork.ozlabs.org/api/patches/1035060/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1549048453-3584-5-git-send-email-megha.dey@linux.intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1549048453-3584-5-git-send-email-megha.dey@linux.intel.com>", "list_archive_url": null, "date": "2019-02-01T19:14:11", "name": "[RFC,v4,4/6] PCI/MSI: Introduce new structure to manage MSI-x entries", "commit_ref": null, "pull_url": null, "state": "rfc", "archived": false, "hash": "a800a12e564b26fa951c37198185fa22c9d55f58", "submitter": { "id": 75876, "url": "http://patchwork.ozlabs.org/api/people/75876/?format=api", "name": "Dey, Megha", "email": "megha.dey@linux.intel.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1549048453-3584-5-git-send-email-megha.dey@linux.intel.com/mbox/", "series": [ { "id": 89594, "url": "http://patchwork.ozlabs.org/api/series/89594/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=89594", "date": "2019-02-01T19:14:07", "name": "Introduce dynamic allocation/freeing of MSI-X vectors", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/89594/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1035060/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1035060/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=linux.intel.com" ], "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 43rmzm3LrXz9s6w\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 2 Feb 2019 06:16:19 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 96CC688362;\n\tFri, 1 Feb 2019 19:16:18 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id t9m9isHStlhp; Fri, 1 Feb 2019 19:16:18 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 247B188359;\n\tFri, 1 Feb 2019 19:16:18 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 449381BF369\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Feb 2019 18:52:40 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id F158E82033\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Feb 2019 18:52:39 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id LFSyZVs6jfHa for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Feb 2019 18:52:27 +0000 (UTC)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 699D888273\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Feb 2019 18:52:26 +0000 (UTC)", "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t01 Feb 2019 10:50:53 -0800", "from megha-z97x-ud7-th.sc.intel.com ([143.183.85.162])\n\tby orsmga003.jf.intel.com with ESMTP; 01 Feb 2019 10:50:53 -0800" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.56,549,1539673200\"; d=\"scan'208\";a=\"123233693\"", "From": "Megha Dey <megha.dey@linux.intel.com>", "To": "linux-drivers-review@linux.intel.com,\n\tintel-wired-lan@lists.osuosl.org", "Date": "Fri, 1 Feb 2019 11:14:11 -0800", "Message-Id": "<1549048453-3584-5-git-send-email-megha.dey@linux.intel.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1549048453-3584-1-git-send-email-megha.dey@linux.intel.com>", "References": "<1549048453-3584-1-git-send-email-megha.dey@linux.intel.com>", "X-Mailman-Approved-At": "Fri, 01 Feb 2019 19:16:15 +0000", "Subject": "[Intel-wired-lan] [RFC v4 4/6] PCI/MSI: Introduce new structure to\n\tmanage MSI-x entries", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Cc": "ravi.v.shankar@intel.com, ashok.raj@intel.com, kyung.min.park@intel.com, \n\tjacob.jun.pan@intel.com, Megha Dey <megha.dey@linux.intel.com>,\n\tmegha.dey@intel.com", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "This is a preparatory patch to introduce disabling of MSI-X vectors\nbelonging to a particular group. In this patch, we introduce a new\nstructure msix_sysfs, which manages sysfs entries for dynamically\nallocated MSI-X vectors belonging to a particular group.\n\nSigned-off-by: Megha Dey <megha.dey@linux.intel.com>\n---\n drivers/pci/msi.c | 15 ++++++++++++++-\n drivers/pci/probe.c | 1 +\n include/linux/pci.h | 9 +++++++++\n 3 files changed, 24 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c\nindex 5e4f452..e7bbd21 100644\n--- a/drivers/pci/msi.c\n+++ b/drivers/pci/msi.c\n@@ -481,10 +481,11 @@ static int populate_msi_sysfs(struct pci_dev *pdev)\n \tstruct device_attribute *msi_dev_attr;\n \tstruct attribute_group *msi_irq_group;\n \tconst struct attribute_group **msi_irq_groups;\n+\tstruct msix_sysfs *msix_sysfs_entry;\n \tstruct msi_desc *entry;\n \tint ret = -ENOMEM;\n \tint num_msi = 0;\n-\tint count = 0;\n+\tint count = 0, *group = NULL;\n \tint i;\n \n \t/* Determine how many msi entries we have */\n@@ -511,6 +512,10 @@ static int populate_msi_sysfs(struct pci_dev *pdev)\n \t\t\t\tgoto error_attrs;\n \t\t\tmsi_dev_attr->attr.mode = S_IRUGO;\n \t\t\tmsi_dev_attr->show = msi_mode_show;\n+\t\t\tif (!i)\n+\t\t\t\tgroup = idr_find(\n+\t\t\t\t\tpdev->dev.msix_dev_idr->entry_idr,\n+\t\t\t\t\t\tentry->msi_attrib.entry_nr);\n \t\t\t++count;\n \t\t}\n \t}\n@@ -526,6 +531,14 @@ static int populate_msi_sysfs(struct pci_dev *pdev)\n \t\tgoto error_irq_group;\n \tmsi_irq_groups[0] = msi_irq_group;\n \n+\tmsix_sysfs_entry = kzalloc(sizeof(*msix_sysfs_entry) * 2, GFP_KERNEL);\n+\tmsix_sysfs_entry->msi_irq_group = msi_irq_group;\n+\tif (group)\n+\t\tmsix_sysfs_entry->group_id = *group;\n+\tmsix_sysfs_entry->vecs_in_grp = count;\n+\tINIT_LIST_HEAD(&msix_sysfs_entry->list);\n+\tlist_add_tail(&msix_sysfs_entry->list, &pdev->msix_sysfs);\n+\n \tif (!pdev->msix_enabled)\n \t\tret = sysfs_create_group(&pdev->dev.kobj, msi_irq_group);\n \telse\ndiff --git a/drivers/pci/probe.c b/drivers/pci/probe.c\nindex dd4a6ef..02f5d88 100644\n--- a/drivers/pci/probe.c\n+++ b/drivers/pci/probe.c\n@@ -2208,6 +2208,7 @@ struct pci_dev *pci_alloc_dev(struct pci_bus *bus)\n \tidr_init(dev->dev.msix_dev_idr->entry_idr);\n \n \tINIT_LIST_HEAD(&dev->bus_list);\n+\tINIT_LIST_HEAD(&dev->msix_sysfs);\n \tdev->dev.type = &pci_dev_type;\n \tdev->bus = pci_bus_get(bus);\n \ndiff --git a/include/linux/pci.h b/include/linux/pci.h\nindex 28eab4a..2e2f4c9 100644\n--- a/include/linux/pci.h\n+++ b/include/linux/pci.h\n@@ -461,6 +461,7 @@ struct pci_dev {\n \tunsigned long\tpriv_flags;\t/* Private flags for the PCI driver */\n \tunsigned int\tnum_msix;\t/* Number of MSI-X vectors supported */\n \tvoid __iomem\t*base;\t\t/* Base address of MSI-X table */\n+\tstruct list_head msix_sysfs; /* Manage sysfs entries for each MSI-x group */\n };\n \n static inline struct pci_dev *pci_physfn(struct pci_dev *dev)\n@@ -1375,6 +1376,14 @@ struct msix_entry {\n \tu16\tentry;\t/* Driver uses to specify entry, OS writes */\n };\n \n+/* Manage sysfs entries for dynamically allocated MSI-X vectors */\n+struct msix_sysfs {\n+\tstruct\tattribute_group *msi_irq_group;\n+\tstruct\tlist_head list;\n+\tint\tgroup_id;\n+\tint\tvecs_in_grp;\n+};\n+\n #ifdef CONFIG_PCI_MSI\n int pci_msi_vec_count(struct pci_dev *dev);\n void pci_disable_msi(struct pci_dev *dev);\n", "prefixes": [ "RFC", "v4", "4/6" ] }