irq handling code consolidation, second try (alpha part)
RFC 1/1 irq handling code consolidation, second try (alpha part)
Hi all,
attached patch is a second try of IRQ handling code consolidation. This is a alpha specific patch (compiled successfuly).
Best regards.
Signature · 2 lines
Andrey Panin | Embedded systems software developer [email protected] | PGP key: wwwkeys.pgp.net
arch/alpha/Kconfig +4 -0
@@ -20,6 +20,10 @@ bool default y +config GENERIC_IRQ + bool + default y + config UID16 bool
arch/alpha/kernel/irq.c +5 -479
532 lines not on this page · raw message
arch/alpha/kernel/irq_alpha.c +2 -2
@@ -26,7 +26,7 @@static void dummy_perf (unsigned long vector,struct pt_regs *regs) { - irq_err_count++; +atomic_inc (&irq_err_count);printk (KERN_CRIT "Performance counter interrupt!\n" ); }
@@ -46,7 +46,7 @@handle_ipi (regs);return ;#else - irq_err_count++; +atomic_inc (&irq_err_count);printk (KERN_CRIT "Interprocessor interrupt? " "You must be kidding!\n" );#endif
arch/alpha/kernel/smp.c +1 -1
@@ -432,7 +432,7 @@/* Don't care about the contents of regs since we'll never reschedule the forked task. */ struct pt_regs regs; -return do_fork (CLONE_VM |CLONE_IDLETASK ,0 , ®s,0 ,NULL ); +return do_fork (CLONE_VM |CLONE_IDLETASK ,0 , ®s,0 ,NULL ,NULL ); }/*
include/asm-alpha/hw_irq.h +26 -1
@@ -2,15 +2,40 @@#define _ALPHA_HW_IRQ_H#include <linux/config.h> +#include <asm/machvec.h> static inline void hw_resend_irq (struct hw_interrupt_type *h,unsigned int i) {} -extern volatile unsigned long irq_err_count; +extern atomic_t irq_err_count; + +extern void select_smp_affinity (int irq); + +extern irq_desc_t irq_desc[NR_IRQS ];#ifdef CONFIG_ALPHA_GENERIC #define ACTUAL_NR_IRQS alpha_mv.nr_irqs#else #define ACTUAL_NR_IRQS NR_IRQS#endif + +#define arch_ack_bad_irq (irq) do { } while (0) + +/* Return a pointer to the irq descriptor for IRQ. */ +#define irq_desc (irq) (irq_desc + (irq)) + +/* Check irq number */ +#define arch_check_irq (irq) ((irq) >= ACTUAL_NR_IRQS) + +/* Arch specific hook for setup_irq() */ +#ifdef CONFIG_SMP +#define arch_setup_irq (irq, desc, irqaction) select_smp_affinity(irq) +#else +#define arch_setup_irq (irq, desc, irqaction) do { } while (0) +#endif + +/* Used in setup_irq() */ +#define ARCH_NONSHARED_IRQ_MASK ~IRQ_DISABLED + +#define ARCH_PROC_SMP_AFF_WIDTH 16#endif