Commit 62ac1780 authored by Jiang Liu's avatar Jiang Liu Committed by Thomas Gleixner

x86/irq: Implement irq_chip.irq_write_msi_msg for MSI/DMAR/HPET irq_chips

Implement irq_chip.irq_write_msi_msg for MSI/DMAR/HPET irq_chips, they
will be used to replace duplicated code.
Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: David Cohen <david.a.cohen@linux.intel.com>
Cc: Sander Eikelenboom <linux@eikelenboom.it>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dimitri Sivanich <sivanich@sgi.com>
Link: http://lkml.kernel.org/r/1428905519-23704-27-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 90d84fe9
...@@ -192,6 +192,11 @@ dmar_msi_set_affinity(struct irq_data *data, const struct cpumask *mask, ...@@ -192,6 +192,11 @@ dmar_msi_set_affinity(struct irq_data *data, const struct cpumask *mask,
return ret; return ret;
} }
static void dmar_msi_write_msg(struct irq_data *data, struct msi_msg *msg)
{
dmar_msi_write(data->irq, msg);
}
static struct irq_chip dmar_msi_controller = { static struct irq_chip dmar_msi_controller = {
.name = "DMAR-MSI", .name = "DMAR-MSI",
.irq_unmask = dmar_msi_unmask, .irq_unmask = dmar_msi_unmask,
...@@ -200,6 +205,7 @@ static struct irq_chip dmar_msi_controller = { ...@@ -200,6 +205,7 @@ static struct irq_chip dmar_msi_controller = {
.irq_set_affinity = dmar_msi_set_affinity, .irq_set_affinity = dmar_msi_set_affinity,
.irq_retrigger = irq_chip_retrigger_hierarchy, .irq_retrigger = irq_chip_retrigger_hierarchy,
.irq_compose_msi_msg = irq_msi_compose_msg, .irq_compose_msi_msg = irq_msi_compose_msg,
.irq_write_msi_msg = dmar_msi_write_msg,
.flags = IRQCHIP_SKIP_SET_WAKE, .flags = IRQCHIP_SKIP_SET_WAKE,
}; };
...@@ -322,6 +328,11 @@ static int hpet_msi_set_affinity(struct irq_data *data, ...@@ -322,6 +328,11 @@ static int hpet_msi_set_affinity(struct irq_data *data,
return ret; return ret;
} }
static void hpet_msi_write_msg(struct irq_data *data, struct msi_msg *msg)
{
hpet_msi_write(data->handler_data, msg);
}
static struct irq_chip hpet_msi_controller = { static struct irq_chip hpet_msi_controller = {
.name = "HPET-MSI", .name = "HPET-MSI",
.irq_unmask = hpet_msi_unmask, .irq_unmask = hpet_msi_unmask,
...@@ -330,6 +341,7 @@ static struct irq_chip hpet_msi_controller = { ...@@ -330,6 +341,7 @@ static struct irq_chip hpet_msi_controller = {
.irq_set_affinity = hpet_msi_set_affinity, .irq_set_affinity = hpet_msi_set_affinity,
.irq_retrigger = irq_chip_retrigger_hierarchy, .irq_retrigger = irq_chip_retrigger_hierarchy,
.irq_compose_msi_msg = irq_msi_compose_msg, .irq_compose_msi_msg = irq_msi_compose_msg,
.irq_write_msi_msg = hpet_msi_write_msg,
.flags = IRQCHIP_SKIP_SET_WAKE, .flags = IRQCHIP_SKIP_SET_WAKE,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment