Ensure NO_IRQ is appropriately defined on all architectures
PATCH 1/1 Ensure NO_IRQ is appropriately defined on all architectures
Add a default definition of NO_IRQ to <linux/hardirq.h> and move the definition from <asm/irq.h> to <asm/hardirq.h> for all architectures which override it.
Signed-off-by Matthew Wilcox <[email protected]>
include/asm-arm/hardirq.h +3 -0
@@ -13,6 +13,9 @@ typedef struct {#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ +/* Device has no interrupt */ +#define NO_IRQ ((unsigned int)(-1)) +#if NR_IRQS >256 #define HARDIRQ_BITS 9#else
include/asm-arm/irq.h +0 -8
@@ -11,14 +11,6 @@#define NR_IRQS 128#endif -/* -* Use this value to indicate lack of interrupt -* capability -*/ -#ifndef NO_IRQ -#define NO_IRQ ((unsigned int)(-1)) -#endif -struct irqaction ;extern void disable_irq_nosync (unsigned int );
include/asm-arm26/hardirq.h +3 -0
@@ -11,6 +11,9 @@ typedef struct {#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ +/* Device has no interrupt */ +#define NO_IRQ ((unsigned int)(-1)) +#define HARDIRQ_BITS 8/*
include/asm-arm26/irq.h +0 -9
@@ -13,15 +13,6 @@#define irq_canonicalize (i) (i)#endif - -/* -* Use this value to indicate lack of interrupt -* capability -*/ -#ifndef NO_IRQ -#define NO_IRQ ((unsigned int)(-1)) -#endif -struct irqaction ;#define disable_irq_nosync (i) disable_irq(i)
include/asm-frv/hardirq.h +3 -0
@@ -22,6 +22,9 @@ typedef struct {#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ +/* Device has no interrupt */ +#define NO_IRQ ((unsigned int)(-1)) +#ifdef CONFIG_SMP #error SMP not available on FR-V#endif /* CONFIG_SMP */
include/asm-frv/irq.h +0 -3
@@ -20,9 +20,6 @@* drivers */ -/* this number is used when no interrupt has been assigned */ -#define NO_IRQ (-1) -#define NR_IRQ_LOG2_ACTIONS_PER_GROUP 5#define NR_IRQ_ACTIONS_PER_GROUP (1 << NR_IRQ_LOG2_ACTIONS_PER_GROUP)#define NR_IRQ_GROUPS 4
include/asm-parisc/hardirq.h +3 -0
@@ -24,6 +24,9 @@ typedef struct {#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ +/* Device has no interrupt */ +#define NO_IRQ ((unsigned int)(-1)) +void ack_bad_irq (unsigned int irq);#endif /* _PARISC_HARDIRQ_H */
include/asm-parisc/irq.h +0 -2
@@ -11,8 +11,6 @@#include <linux/cpumask.h> #include <asm/types.h> -#define NO_IRQ (-1) -#ifdef CONFIG_GSC #define GSC_IRQ_BASE 16#define GSC_IRQ_MAX 63
include/asm-powerpc/hardirq.h +3 -0
@@ -18,6 +18,9 @@ typedef struct {#define last_jiffy_stamp (cpu) __IRQ_STAT((cpu), __last_jiffy_stamp) +/* Device has no interrupt */ +#define NO_IRQ ((unsigned int)(-1)) +static inline void ack_bad_irq (int irq) {printk (KERN_CRIT "illegal vector %d received!\n" , irq);
include/asm-powerpc/irq.h +0 -3
@@ -15,9 +15,6 @@#include <asm/types.h> #include <asm/atomic.h> -/* this number is used when no interrupt has been assigned */ -#define NO_IRQ (-1) -/* * These constants are used for passing information about interrupt * signal polarity and level/edge sensing to the low-level PIC chip
include/linux/hardirq.h +9 -0
@@ -87,6 +87,15 @@ extern void synchronize_irq(unsigned int# define synchronize_irq (irq) barrier()#endif +/* +* This value means "Device has no interrupt". The value 0 has +* historically been used, but it's a legal interrupt number on some +* architectures. These architectures typically define it to be -1 instead. +*/ +#ifndef NO_IRQ +#define NO_IRQ ((unsigned int)0) +#endif +#define nmi_enter () irq_enter()#define nmi_exit () sub_preempt_count(HARDIRQ_OFFSET)