lkml.org 
[lkml]   [2012]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/7] x86, irq: Let msi-x to shown as MSI-X in /proc/interrupt
Date
Use new added irq_print_chip() to append -X after MSI for msi-x.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
---
arch/x86/kernel/apic/io_apic.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index f5c77ff..52618ad 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2628,7 +2628,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 irq_remap_modify_chip_defaults(struct irq_chip *chip)
@@ -3214,6 +3217,14 @@ msi_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force)
}
#endif /* CONFIG_SMP */

+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 ?
+ (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.
@@ -3227,6 +3238,7 @@ static struct irq_chip msi_chip = {
.irq_set_affinity = msi_set_affinity,
#endif
.irq_retrigger = ioapic_retrigger_irq,
+ .irq_print_chip = msi_irq_print_chip,
};

/*
--
1.7.7


\
 
 \ /
  Last update: 2012-01-27 08:29    [W:0.055 / U:1.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site