From patchwork Fri Feb 8 19:28:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 2117801 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 7979AE00C6 for ; Fri, 8 Feb 2013 19:30:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760468Ab3BHT3j (ORCPT ); Fri, 8 Feb 2013 14:29:39 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:33663 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760463Ab3BHT3h (ORCPT ); Fri, 8 Feb 2013 14:29:37 -0500 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r18JSS5K022931 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 Feb 2013 19:28:28 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r18JSRQJ021727 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Feb 2013 19:28:27 GMT Received: from abhmt112.oracle.com (abhmt112.oracle.com [141.146.116.64]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r18JSRpV026386; Fri, 8 Feb 2013 13:28:27 -0600 Received: from linux-siqj.site (/10.132.127.230) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 08 Feb 2013 11:28:27 -0800 From: Yinghai Lu To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Bjorn Helgaas , "Rafael J. Wysocki" Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Yinghai Lu , Joerg Roedel , Konrad Rzeszutek Wilk , Sebastian Andrzej Siewior Subject: [PATCH v2 04/26] x86, irq: Show MSI-X in /proc/interrupt Date: Fri, 8 Feb 2013 11:28:01 -0800 Message-Id: <1360351703-20571-5-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360351703-20571-1-git-send-email-yinghai@kernel.org> References: <1360351703-20571-1-git-send-email-yinghai@kernel.org> X-Source-IP: acsinet21.oracle.com [141.146.126.237] Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Now MSI-X is shown as MSI in /proc/interrupt. We could use new added irq_print_chip() interface to append -X for MSI-X. -v2: do not need to check if msi_desc is null in msi_irq_print_chip(). Signed-off-by: Yinghai Lu Cc: Joerg Roedel Cc: Konrad Rzeszutek Wilk Cc: Sebastian Andrzej Siewior --- arch/x86/kernel/apic/io_apic.c | 7 +++++++ drivers/iommu/irq_remapping.c | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 059589f..f8d4d8d 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -3087,6 +3087,12 @@ msi_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force) return IRQ_SET_MASK_OK_NOCOPY; } +static void msi_irq_print_chip(struct irq_data *data, struct seq_file *p) +{ + seq_printf(p, " %s%s", data->chip->name, + data->msi_desc->msi_attrib.is_msix ? "-X" : ""); +} + /* * IRQ Chip for MSI PCI/PCI-X/PCI-Express Devices, * which implement the MSI or MSI-X Capability Structure. @@ -3098,6 +3104,7 @@ struct irq_chip msi_chip = { .irq_ack = ack_apic_edge, .irq_set_affinity = msi_set_affinity, .irq_retrigger = ioapic_retrigger_irq, + .irq_print_chip = msi_irq_print_chip, }; int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c index 33918c3..e245ab0 100644 --- a/drivers/iommu/irq_remapping.c +++ b/drivers/iommu/irq_remapping.c @@ -365,7 +365,10 @@ static void ir_ack_apic_level(struct irq_data *data) static void ir_print_prefix(struct irq_data *data, struct seq_file *p) { - seq_printf(p, " IR-%s", data->chip->name); + seq_printf(p, " IR-%s%s", data->chip->name, + data->msi_desc ? + (data->msi_desc->msi_attrib.is_msix ? "-X" : "") + : ""); } static void __init irq_remap_modify_chip_defaults(struct irq_chip *chip)