Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0ad90a3 authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds
Browse files

[PATCH] genirq: add ->retrigger() irq op to consolidate hw_irq_resend()



Add ->retrigger() irq op to consolidate hw_irq_resend() implementations.
(Most architectures had it defined to NOP anyway.)

NOTE: ia64 needs testing. i386 and x86_64 tested.

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 096c8131
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2071,6 +2071,13 @@ static void set_ioapic_affinity_vector (unsigned int vector,
#endif
#endif

static int ioapic_retrigger(unsigned int irq)
{
	send_IPI_self(IO_APIC_VECTOR(irq));

	return 1;
}

/*
 * Level and edge triggered IO-APIC interrupts need different handling,
 * so we use two separate IRQ descriptors. Edge triggered IRQs can be
@@ -2090,6 +2097,7 @@ static struct hw_interrupt_type ioapic_edge_type __read_mostly = {
#ifdef CONFIG_SMP
	.set_affinity 	= set_ioapic_affinity,
#endif
	.retrigger	= ioapic_retrigger,
};

static struct hw_interrupt_type ioapic_level_type __read_mostly = {
@@ -2103,6 +2111,7 @@ static struct hw_interrupt_type ioapic_level_type __read_mostly = {
#ifdef CONFIG_SMP
	.set_affinity 	= set_ioapic_affinity,
#endif
	.retrigger	= ioapic_retrigger,
};

static inline void init_IO_APIC_traps(void)
+9 −1
Original line number Diff line number Diff line
@@ -26,6 +26,13 @@ lsapic_noop (unsigned int irq)
	/* nuthing to do... */
}

static int lsapic_retrigger(unsigned int irq)
{
	ia64_resend_irq(irq);

	return 1;
}

struct hw_interrupt_type irq_type_ia64_lsapic = {
	.typename =	"LSAPIC",
	.startup =	lsapic_noop_startup,
@@ -33,5 +40,6 @@ struct hw_interrupt_type irq_type_ia64_lsapic = {
	.enable =	lsapic_noop,
	.disable =	lsapic_noop,
	.ack =		lsapic_noop,
	.end =		lsapic_noop
	.end =		lsapic_noop,
	.retrigger =	lsapic_retrigger,
};
+2 −2
Original line number Diff line number Diff line
@@ -6165,7 +6165,7 @@ pfm_load_regs (struct task_struct *task)
		/*
		 * will replay the PMU interrupt
		 */
		if (need_irq_resend) hw_resend_irq(NULL, IA64_PERFMON_VECTOR);
		if (need_irq_resend) ia64_resend_irq(IA64_PERFMON_VECTOR);

		pfm_stats[smp_processor_id()].pfm_replay_ovfl_intr_count++;
	}
@@ -6305,7 +6305,7 @@ pfm_load_regs (struct task_struct *task)
		/*
		 * will replay the PMU interrupt
		 */
		if (need_irq_resend) hw_resend_irq(NULL, IA64_PERFMON_VECTOR);
		if (need_irq_resend) ia64_resend_irq(IA64_PERFMON_VECTOR);

		pfm_stats[smp_processor_id()].pfm_replay_ovfl_intr_count++;
	}
+4 −7
Original line number Diff line number Diff line
@@ -125,6 +125,10 @@ static struct hw_interrupt_type cpu_interrupt_type = {
#ifdef CONFIG_SMP
	.set_affinity	= cpu_set_affinity_irq,
#endif
	/* XXX: Needs to be written.  We managed without it so far, but
	 * we really ought to write it.
	 */
	.retrigger	= NULL,
};

int show_interrupts(struct seq_file *p, void *v)
@@ -404,13 +408,6 @@ void __init init_IRQ(void)

}

void hw_resend_irq(struct hw_interrupt_type *type, unsigned int irq)
{
	/* XXX: Needs to be written.  We managed without it so far, but
	 * we really ought to write it.
	 */
}

void ack_bad_irq(unsigned int irq)
{
	printk("unexpected IRQ %d\n", irq);
+9 −0
Original line number Diff line number Diff line
@@ -1618,6 +1618,13 @@ static void set_ioapic_affinity_vector (unsigned int vector,
#endif // CONFIG_SMP
#endif // CONFIG_PCI_MSI

static int ioapic_retrigger(unsigned int irq)
{
	send_IPI_self(IO_APIC_VECTOR(irq));

	return 1;
}

/*
 * Level and edge triggered IO-APIC interrupts need different handling,
 * so we use two separate IRQ descriptors. Edge triggered IRQs can be
@@ -1638,6 +1645,7 @@ static struct hw_interrupt_type ioapic_edge_type __read_mostly = {
#ifdef CONFIG_SMP
	.set_affinity = set_ioapic_affinity,
#endif
	.retrigger	= ioapic_retrigger,
};

static struct hw_interrupt_type ioapic_level_type __read_mostly = {
@@ -1651,6 +1659,7 @@ static struct hw_interrupt_type ioapic_level_type __read_mostly = {
#ifdef CONFIG_SMP
	.set_affinity = set_ioapic_affinity,
#endif
	.retrigger	= ioapic_retrigger,
};

static inline void init_IO_APIC_traps(void)
Loading