Release 4.14 arch/mips/vr41xx/common/irq.c
/*
* Interrupt handing routines for NEC VR4100 series.
*
* Copyright (C) 2005-2007 Yoichi Yuasa <yuasa@linux-mips.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/export.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <asm/irq_cpu.h>
#include <asm/vr41xx/irq.h>
typedef struct irq_cascade {
int (*get_irq)(unsigned int);
} irq_cascade_t;
static irq_cascade_t irq_cascade[NR_IRQS] __cacheline_aligned;
static struct irqaction cascade_irqaction = {
.handler = no_action,
.name = "cascade",
.flags = IRQF_NO_THREAD,
};
int cascade_irq(unsigned int irq, int (*get_irq)(unsigned int))
{
int retval = 0;
if (irq >= NR_IRQS)
return -EINVAL;
if (irq_cascade[irq].get_irq != NULL)
free_irq(irq, NULL);
irq_cascade[irq].get_irq = get_irq;
if (get_irq != NULL) {
retval = setup_irq(irq, &cascade_irqaction);
if (retval < 0)
irq_cascade[irq].get_irq = NULL;
}
return retval;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yoichi Yuasa | 97 | 100.00% | 1 | 100.00% |
Total | 97 | 100.00% | 1 | 100.00% |
EXPORT_SYMBOL_GPL(cascade_irq);
static void irq_dispatch(unsigned int irq)
{
irq_cascade_t *cascade;
if (irq >= NR_IRQS) {
atomic_inc(&irq_err_count);
return;
}
cascade = irq_cascade + irq;
if (cascade->get_irq != NULL) {
struct irq_desc *desc = irq_to_desc(irq);
struct irq_data *idata = irq_desc_get_irq_data(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);
int ret;
if (chip->irq_mask_ack)
chip->irq_mask_ack(idata);
else {
chip->irq_mask(idata);
chip->irq_ack(idata);
}
ret = cascade->get_irq(irq);
irq = ret;
if (ret < 0)
atomic_inc(&irq_err_count);
else
irq_dispatch(irq);
if (!irqd_irq_disabled(idata) && chip->irq_unmask)
chip->irq_unmask(idata);
} else
do_IRQ(irq);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yoichi Yuasa | 111 | 67.68% | 2 | 28.57% |
Thomas Gleixner | 41 | 25.00% | 2 | 28.57% |
Roel Kluin | 9 | 5.49% | 1 | 14.29% |
Ingo Molnar | 2 | 1.22% | 1 | 14.29% |
Ralf Bächle | 1 | 0.61% | 1 | 14.29% |
Total | 164 | 100.00% | 7 | 100.00% |
asmlinkage void plat_irq_dispatch(void)
{
unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
if (pending & CAUSEF_IP7)
do_IRQ(TIMER_IRQ);
else if (pending & 0x7800) {
if (pending & CAUSEF_IP3)
irq_dispatch(INT1_IRQ);
else if (pending & CAUSEF_IP4)
irq_dispatch(INT2_IRQ);
else if (pending & CAUSEF_IP5)
irq_dispatch(INT3_IRQ);
else if (pending & CAUSEF_IP6)
irq_dispatch(INT4_IRQ);
} else if (pending & CAUSEF_IP2)
irq_dispatch(INT0_IRQ);
else if (pending & CAUSEF_IP0)
do_IRQ(MIPS_SOFTINT0_IRQ);
else if (pending & CAUSEF_IP1)
do_IRQ(MIPS_SOFTINT1_IRQ);
else
spurious_interrupt();
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ralf Bächle | 115 | 90.55% | 2 | 50.00% |
Yoichi Yuasa | 12 | 9.45% | 2 | 50.00% |
Total | 127 | 100.00% | 4 | 100.00% |
void __init arch_init_irq(void)
{
mips_cpu_irq_init();
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yoichi Yuasa | 10 | 90.91% | 1 | 50.00% |
Atsushi Nemoto | 1 | 9.09% | 1 | 50.00% |
Total | 11 | 100.00% | 2 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yoichi Yuasa | 288 | 61.67% | 5 | 33.33% |
Ralf Bächle | 116 | 24.84% | 2 | 13.33% |
Thomas Gleixner | 41 | 8.78% | 2 | 13.33% |
Roel Kluin | 9 | 1.93% | 1 | 6.67% |
Wu Zhangjin | 5 | 1.07% | 1 | 6.67% |
David Howells | 3 | 0.64% | 1 | 6.67% |
Paul Gortmaker | 2 | 0.43% | 1 | 6.67% |
Ingo Molnar | 2 | 0.43% | 1 | 6.67% |
Atsushi Nemoto | 1 | 0.21% | 1 | 6.67% |
Total | 467 | 100.00% | 15 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.