From patchwork Sun Aug 2 00:54:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jake Oshins X-Patchwork-Id: 6924681 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A4036C05AC for ; Sun, 2 Aug 2015 01:06:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B34242047B for ; Sun, 2 Aug 2015 01:06:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1B46320461 for ; Sun, 2 Aug 2015 01:06:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754162AbbHBBGe (ORCPT ); Sat, 1 Aug 2015 21:06:34 -0400 Received: from o1.f.az.sendgrid.net ([208.117.55.132]:28183 "EHLO o1.f.az.sendgrid.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753486AbbHBBGd (ORCPT ); Sat, 1 Aug 2015 21:06:33 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:cc:subject:in-reply-to:references; s=smtpapi; bh=+Bmc6NhCsB3nr/tRFbv0hZq+QZo=; b=Z9s8WEmYOnZfYJ6cqjqBVteVADRGP 0dkGQ8+nJQcxBRlDwyfqrJ0ks+KqghN+GQVHrHGwQzTCgCA9lwurLOEVGbyVc01e clRb0/mrG22rnmnO3kvrGg+Jui+8nKz7zGLpSR2C6Tjz+5T/catWLZrhSjLDYdM8 jjk+O7/VRInHLM= Received: by filter-135.sjc1.sendgrid.net with SMTP id filter-135.10715.55BD6AD513 2015-08-02 00:56:53.574378397 +0000 UTC Received: from jakeoshinsu2.jakeoshinsu2.d1.internal.cloudapp.net (unknown [104.210.40.47]) by ismtpd-078 (SG) with ESMTP id 14eebe95208.7ac.7473d7 Sun, 02 Aug 2015 00:56:53 +0000 (UTC) From: jakeo@microsoft.com To: gregkh@linuxfoundation.org, kys@microsoft.com, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, linux-pci@vger.kernel.org, bhelgaas@google.com, tglx@linutronix.de Cc: Jake Oshins Subject: [PATCH 3/4] drivers:x86:pci: Make it possible to implement a PCI MSI IRQ Domain in a module. Date: Sun, 2 Aug 2015 00:54:48 +0000 Message-Id: <1438476889-19220-4-git-send-email-jakeo@microsoft.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438476889-19220-1-git-send-email-jakeo@microsoft.com> References: <1438476889-19220-1-git-send-email-jakeo@microsoft.com> X-SG-EID: lfnueJVzSjg1mfuVqqukVH7tZvRy9mfCIcBnfbfzaMM4z6BYalqVm8OibXVn180VocOSDoDhvrRWG3 XAqKN/5gEsJRmq6Sz2IShFnyvIhhe41jsYlJb67EhDrMALyB68yimdwCo1MsvFAVGloJb7JUkPDMsv XrjM+/aG/tZegOY= Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY, URIBL_GREY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jake Oshins The Linux kernel already has the concept of IRQ domain, wherein a component can expose a set of IRQs which are managed by a particular interrupt controller chip or other subsystem. The PCI driver exposes the notion of an IRQ domain for Message-Signaled Interrupts (MSI) from PCI Express devices. This patch exposes the functions which are necessary to do this within a module, rather than just linked into the kernel itself. I felt it made more sense to deliver an MSI IRQ domain as a module both so that the code wouldn't be loaded except when needed and also because the driver which needs this (which is the next patch in this series) is a module and itself depends on another module. Signed-off-by: Jake Oshins --- arch/x86/kernel/apic/vector.c | 2 ++ drivers/pci/msi.c | 1 + kernel/irq/chip.c | 1 + 3 files changed, 4 insertions(+) diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index f47069e..67f7e68 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c @@ -29,6 +29,7 @@ struct apic_chip_data { }; struct irq_domain *x86_vector_domain; +EXPORT_SYMBOL_GPL(x86_vector_domain); static DEFINE_RAW_SPINLOCK(vector_lock); static cpumask_var_t vector_cpumask; static struct irq_chip lapic_controller; @@ -66,6 +67,7 @@ struct irq_cfg *irqd_cfg(struct irq_data *irq_data) return data ? &data->cfg : NULL; } +EXPORT_SYMBOL_GPL(irqd_cfg); struct irq_cfg *irq_cfg(unsigned int irq) { diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 566de05..b118be1 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -1276,6 +1276,7 @@ struct irq_domain *pci_msi_create_irq_domain(struct device_node *node, return msi_create_irq_domain(node, info, parent); } +EXPORT_SYMBOL_GPL(pci_msi_create_irq_domain); /** * pci_msi_domain_alloc_irqs - Allocate interrupts for @dev in @domain diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 76f199d..3c82c44 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -935,6 +935,7 @@ void irq_chip_ack_parent(struct irq_data *data) data = data->parent_data; data->chip->irq_ack(data); } +EXPORT_SYMBOL_GPL(irq_chip_ack_parent); /** * irq_chip_mask_parent - Mask the parent interrupt