#ifdef CONFIG_MMU
-#include <linux/linkage.h>
-#include <linux/hardirq.h>
-#include <linux/irqreturn.h>
-#include <linux/spinlock_types.h>
-
/*
* Interrupt source definitions
* General interrupt sources are the level 1-7.
#define IRQ_USER 8
-extern unsigned int irq_canonicalize(unsigned int irq);
-
-struct pt_regs;
-
/*
* various flags for request_irq() - the Amiga now uses the standard
* mechanism like all other architectures - IRQF_DISABLED and
#define IRQ_FLG_STD (0x8000) /* internally used */
#endif
+#ifndef CONFIG_GENERIC_HARDIRQS
+
+#include <linux/linkage.h>
+#include <linux/hardirq.h>
+#include <linux/irqreturn.h>
+#include <linux/spinlock_types.h>
+
+struct pt_regs;
+
/*
* This structure is used to chain together the ISRs for a particular
* interrupt source (if it supports chaining).
extern void generic_handle_irq(unsigned int);
asmlinkage void do_IRQ(int irq, struct pt_regs *regs);
+#else /* CONFIG_GENERIC_HARDIRQS */
+
+struct irq_data;
+struct irq_chip;
+struct irq_desc;
+extern unsigned int m68k_irq_startup(struct irq_data *data);
+extern unsigned int m68k_irq_startup_irq(unsigned int irq);
+extern void m68k_irq_shutdown(struct irq_data *data);
+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,
+ void (*handler)(unsigned int,
+ struct pt_regs *));
+extern void m68k_setup_irq_controller(struct irq_chip *,
+ void (*handle)(unsigned int irq,
+ struct irq_desc *desc),
+ unsigned int irq, unsigned int cnt);
+
+#endif /* CONFIG_GENERIC_HARDIRQS */
+
+extern unsigned int irq_canonicalize(unsigned int irq);
+
#else
#define irq_canonicalize(irq) (irq)
#endif /* CONFIG_MMU */
asmlinkage void do_IRQ(int irq, struct pt_regs *regs);
+extern atomic_t irq_err_count;
#endif /* _M68K_IRQ_H_ */
extern u32 user_irqhandler_fixup[];
extern u16 user_irqvec_fixup[];
+#ifndef CONFIG_GENERIC_HARDIRQS
/* table for system interrupt handlers */
static struct irq_data *irq_list[NR_IRQS];
static struct irq_chip *irq_chip[NR_IRQS];
irq_chip[irq] = chip;
return 0;
}
+#define irq_set_chip_and_handler(irq, chip, dummy) irq_set_chip(irq, chip)
+#endif /* !CONFIG_GENERIC_HARDIRQS */
static int m68k_first_user_vec;
.irq_shutdown = m68k_irq_shutdown,
};
+#ifndef CONFIG_GENERIC_HARDIRQS
#define NUM_IRQ_NODES 100
static struct irq_data nodes[NUM_IRQ_NODES];
+#endif /* !CONFIG_GENERIC_HARDIRQS */
/*
* void init_IRQ(void)
}
for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++)
- irq_set_chip(i, &auto_irq_chip);
+ irq_set_chip_and_handler(i, &auto_irq_chip, handle_simple_irq);
mach_init_IRQ();
}
flush_icache();
}
+#ifdef CONFIG_GENERIC_HARDIRQS
+
+/**
+ * m68k_setup_irq_controller
+ * @chip: irq chip which controls specified irq
+ * @handle: flow handler which handles specified irq
+ * @irq: first irq to be managed by the controller
+ * @cnt: number of irqs to be managed by the controller
+ *
+ * Change the controller for the specified range of irq, which will be used to
+ * manage these irq. auto/user irq already have a default controller, which can
+ * be changed as well, but the controller probably should use m68k_irq_startup/
+ * m68k_irq_shutdown.
+ */
+void m68k_setup_irq_controller(struct irq_chip *chip,
+ irq_flow_handler_t handle, unsigned int irq,
+ unsigned int cnt)
+{
+ int i;
+
+ for (i = 0; i < cnt; i++) {
+ irq_set_chip(irq + i, chip);
+ if (handle)
+ irq_set_handler(irq + i, handle);
+ }
+}
+
+#else /* !CONFIG_GENERIC_HARDIRQS */
+
/**
* m68k_setup_irq_chip
* @contr: irq controller which controls specified irq
EXPORT_SYMBOL(disable_irq_nosync);
+#endif /* !CONFIG_GENERIC_HARDIRQS */
+
unsigned int m68k_irq_startup_irq(unsigned int irq)
{
if (irq <= IRQ_AUTO_7)
}
+#ifndef CONFIG_GENERIC_HARDIRQS
+
/*
* Do we need these probe functions on the m68k?
*
}
EXPORT_SYMBOL(probe_irq_off);
+#endif /* CONFIG_GENERIC_HARDIRQS */
unsigned int irq_canonicalize(unsigned int irq)
{
EXPORT_SYMBOL(irq_canonicalize);
+#ifndef CONFIG_GENERIC_HARDIRQS
void generic_handle_irq(unsigned int irq)
{
struct irq_data *node;
/* Insert /proc/irq driver here */
}
#endif
+
+#else /* CONFIG_GENERIC_HARDIRQS */
+
+asmlinkage void handle_badint(struct pt_regs *regs)
+{
+ atomic_inc(&irq_err_count);
+ pr_warn("unexpected interrupt from %u\n", regs->vector);
+}
+
+#endif /* CONFIG_GENERIC_HARDIRQS */