m68k/irq: Rename irq_node to irq_data
Make it more similar to the genirq version: - Add an irq field Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Родитель
0dde595be6
Коммит
6549d53792
|
@ -75,10 +75,11 @@ struct pt_regs;
|
||||||
* This structure is used to chain together the ISRs for a particular
|
* This structure is used to chain together the ISRs for a particular
|
||||||
* interrupt source (if it supports chaining).
|
* interrupt source (if it supports chaining).
|
||||||
*/
|
*/
|
||||||
struct irq_node {
|
struct irq_data {
|
||||||
|
unsigned int irq;
|
||||||
irqreturn_t (*handler)(int, void *);
|
irqreturn_t (*handler)(int, void *);
|
||||||
void *dev_id;
|
void *dev_id;
|
||||||
struct irq_node *next;
|
struct irq_data *next;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
const char *devname;
|
const char *devname;
|
||||||
};
|
};
|
||||||
|
@ -105,9 +106,9 @@ extern unsigned int m68k_irq_startup(unsigned int);
|
||||||
extern void m68k_irq_shutdown(unsigned int);
|
extern void m68k_irq_shutdown(unsigned int);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function returns a new struct irq_node
|
* This function returns a new struct irq_data
|
||||||
*/
|
*/
|
||||||
extern struct irq_node *new_irq_node(void);
|
extern struct irq_data *new_irq_node(void);
|
||||||
|
|
||||||
extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *));
|
extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *));
|
||||||
extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
|
extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
|
||||||
|
|
|
@ -51,7 +51,7 @@ extern u32 user_irqhandler_fixup[];
|
||||||
extern u16 user_irqvec_fixup[];
|
extern u16 user_irqvec_fixup[];
|
||||||
|
|
||||||
/* table for system interrupt handlers */
|
/* table for system interrupt handlers */
|
||||||
static struct irq_node *irq_list[NR_IRQS];
|
static struct irq_data *irq_list[NR_IRQS];
|
||||||
static struct irq_chip *irq_chip[NR_IRQS];
|
static struct irq_chip *irq_chip[NR_IRQS];
|
||||||
static int irq_depth[NR_IRQS];
|
static int irq_depth[NR_IRQS];
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ static struct irq_chip user_irq_chip = {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NUM_IRQ_NODES 100
|
#define NUM_IRQ_NODES 100
|
||||||
static struct irq_node nodes[NUM_IRQ_NODES];
|
static struct irq_data nodes[NUM_IRQ_NODES];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* void init_IRQ(void)
|
* void init_IRQ(void)
|
||||||
|
@ -160,9 +160,9 @@ void m68k_setup_irq_chip(struct irq_chip *contr, unsigned int irq,
|
||||||
irq_chip[irq + i] = contr;
|
irq_chip[irq + i] = contr;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct irq_node *new_irq_node(void)
|
struct irq_data *new_irq_node(void)
|
||||||
{
|
{
|
||||||
struct irq_node *node;
|
struct irq_data *node;
|
||||||
short i;
|
short i;
|
||||||
|
|
||||||
for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--) {
|
for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--) {
|
||||||
|
@ -176,10 +176,10 @@ struct irq_node *new_irq_node(void)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int setup_irq(unsigned int irq, struct irq_node *node)
|
int setup_irq(unsigned int irq, struct irq_data *node)
|
||||||
{
|
{
|
||||||
struct irq_chip *contr;
|
struct irq_chip *contr;
|
||||||
struct irq_node **prev;
|
struct irq_data **prev;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
|
if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
|
||||||
|
@ -219,13 +219,14 @@ int request_irq(unsigned int irq,
|
||||||
irq_handler_t handler,
|
irq_handler_t handler,
|
||||||
unsigned long flags, const char *devname, void *dev_id)
|
unsigned long flags, const char *devname, void *dev_id)
|
||||||
{
|
{
|
||||||
struct irq_node *node;
|
struct irq_data *node;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
node = new_irq_node();
|
node = new_irq_node();
|
||||||
if (!node)
|
if (!node)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
node->irq = irq;
|
||||||
node->handler = handler;
|
node->handler = handler;
|
||||||
node->flags = flags;
|
node->flags = flags;
|
||||||
node->dev_id = dev_id;
|
node->dev_id = dev_id;
|
||||||
|
@ -243,7 +244,7 @@ EXPORT_SYMBOL(request_irq);
|
||||||
void free_irq(unsigned int irq, void *dev_id)
|
void free_irq(unsigned int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct irq_chip *contr;
|
struct irq_chip *contr;
|
||||||
struct irq_node **p, *node;
|
struct irq_data **p, *node;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
|
if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
|
||||||
|
@ -386,7 +387,7 @@ EXPORT_SYMBOL(irq_canonicalize);
|
||||||
|
|
||||||
asmlinkage void m68k_handle_int(unsigned int irq)
|
asmlinkage void m68k_handle_int(unsigned int irq)
|
||||||
{
|
{
|
||||||
struct irq_node *node;
|
struct irq_data *node;
|
||||||
kstat_cpu(0).irqs[irq]++;
|
kstat_cpu(0).irqs[irq]++;
|
||||||
node = irq_list[irq];
|
node = irq_list[irq];
|
||||||
do {
|
do {
|
||||||
|
@ -412,7 +413,7 @@ asmlinkage void handle_badint(struct pt_regs *regs)
|
||||||
int show_interrupts(struct seq_file *p, void *v)
|
int show_interrupts(struct seq_file *p, void *v)
|
||||||
{
|
{
|
||||||
struct irq_chip *contr;
|
struct irq_chip *contr;
|
||||||
struct irq_node *node;
|
struct irq_data *node;
|
||||||
int i = *(loff_t *) v;
|
int i = *(loff_t *) v;
|
||||||
|
|
||||||
/* autovector interrupts */
|
/* autovector interrupts */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче