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

Commit d2287f5e authored by Mike Travis's avatar Mike Travis Committed by Ingo Molnar
Browse files

irq: update all arches for new irq_desc, fix



Impact: fix build errors

Since the SPARSE IRQS changes redefined how the kstat irqs are
organized, arch's must use the new accessor function:

	kstat_incr_irqs_this_cpu(irq, DESC);

If CONFIG_SPARSE_IRQS is set, then DESC is a pointer to the
irq_desc which has a pointer to the kstat_irqs.  If not, then
the .irqs field of struct kernel_stat is used instead.

Signed-off-by: default avatarMike Travis <travis@sgi.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent e46d5178
Loading
Loading
Loading
Loading
+8 −4
Original line number Original line Diff line number Diff line
@@ -493,11 +493,13 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
	saved_tpr = ia64_getreg(_IA64_REG_CR_TPR);
	saved_tpr = ia64_getreg(_IA64_REG_CR_TPR);
	ia64_srlz_d();
	ia64_srlz_d();
	while (vector != IA64_SPURIOUS_INT_VECTOR) {
	while (vector != IA64_SPURIOUS_INT_VECTOR) {
		struct irq_desc *desc = irq_to_desc(vector);

		if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) {
		if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) {
			smp_local_flush_tlb();
			smp_local_flush_tlb();
			kstat_this_cpu.irqs[vector]++;
			kstat_incr_irqs_this_cpu(vector, desc);
		} else if (unlikely(IS_RESCHEDULE(vector)))
		} else if (unlikely(IS_RESCHEDULE(vector)))
			kstat_this_cpu.irqs[vector]++;
			kstat_incr_irqs_this_cpu(vector, desc);
		else {
		else {
			int irq = local_vector_to_irq(vector);
			int irq = local_vector_to_irq(vector);


@@ -551,11 +553,13 @@ void ia64_process_pending_intr(void)
	  * Perform normal interrupt style processing
	  * Perform normal interrupt style processing
	  */
	  */
	while (vector != IA64_SPURIOUS_INT_VECTOR) {
	while (vector != IA64_SPURIOUS_INT_VECTOR) {
		struct irq_desc *desc = irq_to_desc(vector);

		if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) {
		if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) {
			smp_local_flush_tlb();
			smp_local_flush_tlb();
			kstat_this_cpu.irqs[vector]++;
			kstat_incr_irqs_this_cpu(vector, desc);
		} else if (unlikely(IS_RESCHEDULE(vector)))
		} else if (unlikely(IS_RESCHEDULE(vector)))
			kstat_this_cpu.irqs[vector]++;
			kstat_incr_irqs_this_cpu(vector, desc);
		else {
		else {
			struct pt_regs *old_regs = set_irq_regs(NULL);
			struct pt_regs *old_regs = set_irq_regs(NULL);
			int irq = local_vector_to_irq(vector);
			int irq = local_vector_to_irq(vector);
+3 −1
Original line number Original line Diff line number Diff line
@@ -921,11 +921,13 @@ void ipi_decode(struct smtc_ipi *pipi)
	struct clock_event_device *cd;
	struct clock_event_device *cd;
	void *arg_copy = pipi->arg;
	void *arg_copy = pipi->arg;
	int type_copy = pipi->type;
	int type_copy = pipi->type;
	int irq = MIPS_CPU_IRQ_BASE + 1;

	smtc_ipi_nq(&freeIPIq, pipi);
	smtc_ipi_nq(&freeIPIq, pipi);
	switch (type_copy) {
	switch (type_copy) {
	case SMTC_CLOCK_TICK:
	case SMTC_CLOCK_TICK:
		irq_enter();
		irq_enter();
		kstat_this_cpu.irqs[MIPS_CPU_IRQ_BASE + 1]++;
		kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq));
		cd = &per_cpu(mips_clockevent_device, cpu);
		cd = &per_cpu(mips_clockevent_device, cpu);
		cd->event_handler(cd);
		cd->event_handler(cd);
		irq_exit();
		irq_exit();
+1 −1
Original line number Original line Diff line number Diff line
@@ -155,7 +155,7 @@ static void indy_buserror_irq(void)
	int irq = SGI_BUSERR_IRQ;
	int irq = SGI_BUSERR_IRQ;


	irq_enter();
	irq_enter();
	kstat_this_cpu.irqs[irq]++;
	kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq));
	ip22_be_interrupt(irq);
	ip22_be_interrupt(irq);
	irq_exit();
	irq_exit();
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -122,7 +122,7 @@ void indy_8254timer_irq(void)
	char c;
	char c;


	irq_enter();
	irq_enter();
	kstat_this_cpu.irqs[irq]++;
	kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq));
	printk(KERN_ALERT "Oops, got 8254 interrupt.\n");
	printk(KERN_ALERT "Oops, got 8254 interrupt.\n");
	ArcRead(0, &c, 1, &cnt);
	ArcRead(0, &c, 1, &cnt);
	ArcEnterInteractiveMode();
	ArcEnterInteractiveMode();
+2 −1
Original line number Original line Diff line number Diff line
@@ -178,9 +178,10 @@ struct plat_smp_ops bcm1480_smp_ops = {
void bcm1480_mailbox_interrupt(void)
void bcm1480_mailbox_interrupt(void)
{
{
	int cpu = smp_processor_id();
	int cpu = smp_processor_id();
	int irq = K_BCM1480_INT_MBOX_0_0;
	unsigned int action;
	unsigned int action;


	kstat_this_cpu.irqs[K_BCM1480_INT_MBOX_0_0]++;
	kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq));
	/* Load the mailbox register to figure out what we're supposed to do */
	/* Load the mailbox register to figure out what we're supposed to do */
	action = (__raw_readq(mailbox_0_regs[cpu]) >> 48) & 0xffff;
	action = (__raw_readq(mailbox_0_regs[cpu]) >> 48) & 0xffff;


Loading