[PATCH 3/7] x86, irq: Let msi-x to shown as MSI-X in /proc/interrupt

From: Yinghai Lu
Date: Fri Jan 27 2012 - 02:26:33 EST


Use new added irq_print_chip() to append -X after MSI for msi-x.

Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
Cc: Suresh Siddha <suresh.b.siddha@xxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/