@@ -934,7 +934,7 @@ void gic_dump_info(struct vcpu *v)
void __cpuinit init_maintenance_interrupt(void)
{
- request_irq(gic.maintenance_irq, maintenance_interrupt,
+ request_irq(gic.maintenance_irq, 0, maintenance_interrupt,
"irq-maintenance", NULL);
}
@@ -114,7 +114,7 @@ static inline struct domain *irq_get_domain(struct irq_desc *desc)
return desc->action->dev_id;
}
-int request_irq(unsigned int irq,
+int request_irq(unsigned int irq, unsigned int irqflags,
void (*handler)(int, void *, struct cpu_user_regs *),
const char *devname, void *dev_id)
{
@@ -141,7 +141,7 @@ int request_irq(unsigned int irq,
action->dev_id = dev_id;
action->free_on_release = 1;
- retval = setup_irq(irq, action);
+ retval = setup_irq(irq, irqflags, action);
if ( retval )
xfree(action);
@@ -249,7 +249,7 @@ static int __setup_irq(struct irq_desc *desc, struct irqaction *new)
return 0;
}
-int setup_irq(unsigned int irq, struct irqaction *new)
+int setup_irq(unsigned int irq, unsigned int irqflags, struct irqaction *new)
{
int rc;
unsigned long flags;
@@ -235,11 +235,11 @@ void __cpuinit init_timer_interrupt(void)
WRITE_SYSREG32(0, CNTHP_CTL_EL2); /* Hypervisor's timer disabled */
isb();
- request_irq(timer_irq[TIMER_HYP_PPI], timer_interrupt,
+ request_irq(timer_irq[TIMER_HYP_PPI], 0, timer_interrupt,
"hyptimer", NULL);
- request_irq(timer_irq[TIMER_VIRT_PPI], vtimer_interrupt,
+ request_irq(timer_irq[TIMER_VIRT_PPI], 0, vtimer_interrupt,
"virtimer", NULL);
- request_irq(timer_irq[TIMER_PHYS_NONSECURE_PPI], timer_interrupt,
+ request_irq(timer_irq[TIMER_PHYS_NONSECURE_PPI], 0, timer_interrupt,
"phytimer", NULL);
}
@@ -355,7 +355,7 @@ static int __init hpet_setup_msi_irq(struct hpet_event_channel *ch)
hpet_write32(cfg, HPET_Tn_CFG(ch->idx));
desc->handler = &hpet_msi_type;
- ret = request_irq(ch->msi.irq, hpet_interrupt_handler, "HPET", ch);
+ ret = request_irq(ch->msi.irq, 0, hpet_interrupt_handler, "HPET", ch);
if ( ret >= 0 )
ret = __hpet_setup_msi_irq(desc);
if ( ret < 0 )
@@ -435,6 +435,6 @@ void __init init_IRQ(void)
outb_p(LATCH & 0xff, PIT_CH0); /* LSB */
outb(LATCH >> 8, PIT_CH0); /* MSB */
- setup_irq(2, &cascade);
+ setup_irq(2, 0, &cascade);
}
@@ -949,7 +949,7 @@ static int __init irq_ratelimit_init(void)
}
__initcall(irq_ratelimit_init);
-int __init request_irq(unsigned int irq,
+int __init request_irq(unsigned int irq, unsigned int irqflags,
void (*handler)(int, void *, struct cpu_user_regs *),
const char * devname, void *dev_id)
{
@@ -976,7 +976,7 @@ int __init request_irq(unsigned int irq,
action->dev_id = dev_id;
action->free_on_release = 1;
- retval = setup_irq(irq, action);
+ retval = setup_irq(irq, 0, action);
if (retval)
xfree(action);
@@ -1005,11 +1005,14 @@ void __init release_irq(unsigned int irq, const void *dev_id)
xfree(action);
}
-int __init setup_irq(unsigned int irq, struct irqaction *new)
+int __init setup_irq(unsigned int irq, unsigned int irqflags,
+ struct irqaction *new)
{
struct irq_desc *desc;
unsigned long flags;
+ ASSERT(irqflags == 0);
+
desc = irq_to_desc(irq);
spin_lock_irqsave(&desc->lock,flags);
@@ -1464,7 +1464,7 @@ void __init early_time_init(void)
printk("Detected %lu.%03lu MHz processor.\n",
cpu_khz / 1000, cpu_khz % 1000);
- setup_irq(0, &irq0);
+ setup_irq(0, 0, &irq0);
}
/* keep pit enabled for pit_broadcast working while cpuidle enabled */
@@ -197,7 +197,7 @@ static void __init exynos4210_uart_init_postirq(struct serial_port *port)
uart->irqaction.name = "exynos4210_uart";
uart->irqaction.dev_id = port;
- if ( (rc = setup_irq(uart->irq, &uart->irqaction)) != 0 )
+ if ( (rc = setup_irq(uart->irq, 0, &uart->irqaction)) != 0 )
dprintk(XENLOG_ERR, "Failed to allocated exynos4210_uart IRQ %d\n",
uart->irq);
@@ -586,7 +586,7 @@ static void __init ns16550_init_postirq(struct serial_port *port)
uart->irqaction.handler = ns16550_interrupt;
uart->irqaction.name = "ns16550";
uart->irqaction.dev_id = port;
- if ( (rc = setup_irq(uart->irq, &uart->irqaction)) != 0 )
+ if ( (rc = setup_irq(uart->irq, 0, &uart->irqaction)) != 0 )
printk("ERROR: Failed to allocate ns16550 IRQ %d\n", uart->irq);
}
@@ -205,7 +205,7 @@ static void __init omap_uart_init_postirq(struct serial_port *port)
uart->irqaction.name = "omap_uart";
uart->irqaction.dev_id = port;
- if ( setup_irq(uart->irq, &uart->irqaction) != 0 )
+ if ( setup_irq(uart->irq, 0, &uart->irqaction) != 0 )
{
dprintk(XENLOG_ERR, "Failed to allocated omap_uart IRQ %d\n",
uart->irq);
@@ -137,7 +137,7 @@ static void __init pl011_init_postirq(struct serial_port *port)
uart->irqaction.handler = pl011_interrupt;
uart->irqaction.name = "pl011";
uart->irqaction.dev_id = port;
- if ( (rc = setup_irq(uart->irq, &uart->irqaction)) != 0 )
+ if ( (rc = setup_irq(uart->irq, 0, &uart->irqaction)) != 0 )
printk("ERROR: Failed to allocate pl011 IRQ %d\n", uart->irq);
}
@@ -815,7 +815,7 @@ static bool_t __init set_iommu_interrupt_handler(struct amd_iommu *iommu)
handler = &iommu_msi_type;
ret = __setup_msi_irq(irq_to_desc(irq), &iommu->msi, handler);
if ( !ret )
- ret = request_irq(irq, iommu_interrupt_handler, "amd_iommu", iommu);
+ ret = request_irq(irq, 0, iommu_interrupt_handler, "amd_iommu", iommu);
if ( ret )
{
destroy_irq(irq);
@@ -1082,7 +1082,7 @@ static int __init iommu_set_interrupt(struct acpi_drhd_unit *drhd)
desc = irq_to_desc(irq);
desc->handler = &dma_msi_type;
- ret = request_irq(irq, iommu_page_fault, "dmar", iommu);
+ ret = request_irq(irq, 0, iommu_page_fault, "dmar", iommu);
if ( ret )
{
desc->handler = &no_irq_type;
@@ -89,9 +89,10 @@ int arch_init_one_irq_desc(struct irq_desc *);
#define irq_desc_initialized(desc) ((desc)->handler != NULL)
-extern int setup_irq(unsigned int irq, struct irqaction *);
+extern int setup_irq(unsigned int irq, unsigned int irqflags,
+ struct irqaction *);
extern void release_irq(unsigned int irq, const void *dev_id);
-extern int request_irq(unsigned int irq,
+extern int request_irq(unsigned int irq, unsigned int irqflags,
void (*handler)(int, void *, struct cpu_user_regs *),
const char * devname, void *dev_id);
The irqflags will be used later on ARM to know if we can shared the IRQ or not. On x86, the irqflags should always be 0. Signed-off-by: Julien Grall <julien.grall@linaro.org> Cc: Keir Fraser <keir@xen.org> Cc: Jan Beulich <jbeulich@suse.com> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Cc: Xiantao Zhang <xiantao.zhang@intel.com> --- Changes in v3: - Patch added --- xen/arch/arm/gic.c | 2 +- xen/arch/arm/irq.c | 6 +++--- xen/arch/arm/time.c | 6 +++--- xen/arch/x86/hpet.c | 2 +- xen/arch/x86/i8259.c | 2 +- xen/arch/x86/irq.c | 9 ++++++--- xen/arch/x86/time.c | 2 +- xen/drivers/char/exynos4210-uart.c | 2 +- xen/drivers/char/ns16550.c | 2 +- xen/drivers/char/omap-uart.c | 2 +- xen/drivers/char/pl011.c | 2 +- xen/drivers/passthrough/amd/iommu_init.c | 2 +- xen/drivers/passthrough/vtd/iommu.c | 2 +- xen/include/xen/irq.h | 5 +++-- 14 files changed, 25 insertions(+), 21 deletions(-)