提交 0d7012a9 编写于 作者: I Ingo Molnar 提交者: Linus Torvalds

[PATCH] genirq: cleanup: turn ARCH_HAS_IRQ_PER_CPU into CONFIG_IRQ_PER_CPU

Cleanup: change ARCH_HAS_IRQ_PER_CPU into a Kconfig method.
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 cd916d31
...@@ -28,6 +28,10 @@ config GENERIC_CALIBRATE_DELAY ...@@ -28,6 +28,10 @@ config GENERIC_CALIBRATE_DELAY
bool bool
default y default y
config IRQ_PER_CPU
bool
default y
config CRIS config CRIS
bool bool
default y default y
......
...@@ -492,6 +492,10 @@ config GENERIC_PENDING_IRQ ...@@ -492,6 +492,10 @@ config GENERIC_PENDING_IRQ
depends on GENERIC_HARDIRQS && SMP depends on GENERIC_HARDIRQS && SMP
default y default y
config IRQ_PER_CPU
bool
default y
source "arch/ia64/hp/sim/Kconfig" source "arch/ia64/hp/sim/Kconfig"
menu "Instrumentation Support" menu "Instrumentation Support"
......
...@@ -1618,6 +1618,11 @@ config GENERIC_IRQ_PROBE ...@@ -1618,6 +1618,11 @@ config GENERIC_IRQ_PROBE
bool bool
default y default y
config IRQ_PER_CPU
depends on SMP
bool
default y
# #
# - Highmem only makes sense for the 32-bit kernel. # - Highmem only makes sense for the 32-bit kernel.
# - The current highmem code will only work properly on physically indexed # - The current highmem code will only work properly on physically indexed
......
...@@ -51,6 +51,10 @@ config GENERIC_HARDIRQS ...@@ -51,6 +51,10 @@ config GENERIC_HARDIRQS
config GENERIC_IRQ_PROBE config GENERIC_IRQ_PROBE
def_bool y def_bool y
config IRQ_PER_CPU
bool
default y
# unless you want to implement ACPI on PA-RISC ... ;-) # unless you want to implement ACPI on PA-RISC ... ;-)
config PM config PM
bool bool
......
...@@ -30,6 +30,10 @@ config GENERIC_HARDIRQS ...@@ -30,6 +30,10 @@ config GENERIC_HARDIRQS
bool bool
default y default y
config IRQ_PER_CPU
bool
default y
config RWSEM_GENERIC_SPINLOCK config RWSEM_GENERIC_SPINLOCK
bool bool
......
#ifndef _ASM_IRQ_H #ifndef _ASM_IRQ_H
#define _ASM_IRQ_H #define _ASM_IRQ_H
/*
* IRQ line status macro IRQ_PER_CPU is used
*/
#define ARCH_HAS_IRQ_PER_CPU
#include <asm/arch/irq.h> #include <asm/arch/irq.h>
static inline int irq_canonicalize(int irq) static inline int irq_canonicalize(int irq)
......
...@@ -14,11 +14,6 @@ ...@@ -14,11 +14,6 @@
#define NR_IRQS 256 #define NR_IRQS 256
#define NR_IRQ_VECTORS NR_IRQS #define NR_IRQ_VECTORS NR_IRQS
/*
* IRQ line status macro IRQ_PER_CPU is used
*/
#define ARCH_HAS_IRQ_PER_CPU
static __inline__ int static __inline__ int
irq_canonicalize (int irq) irq_canonicalize (int irq)
{ {
......
...@@ -4,10 +4,4 @@ ...@@ -4,10 +4,4 @@
#define NR_IRQS 256 #define NR_IRQS 256
#ifdef CONFIG_SMP
#define ARCH_HAS_IRQ_PER_CPU
#endif
#endif /* __ASM_MACH_MIPS_IRQ_H */ #endif /* __ASM_MACH_MIPS_IRQ_H */
...@@ -26,11 +26,6 @@ ...@@ -26,11 +26,6 @@
#define NR_IRQS (CPU_IRQ_MAX + 1) #define NR_IRQS (CPU_IRQ_MAX + 1)
/*
* IRQ line status macro IRQ_PER_CPU is used
*/
#define ARCH_HAS_IRQ_PER_CPU
static __inline__ int irq_canonicalize(int irq) static __inline__ int irq_canonicalize(int irq)
{ {
return (irq == 2) ? 9 : irq; return (irq == 2) ? 9 : irq;
......
...@@ -30,11 +30,6 @@ ...@@ -30,11 +30,6 @@
#define IRQ_POLARITY_POSITIVE 0x2 /* high level or low->high edge */ #define IRQ_POLARITY_POSITIVE 0x2 /* high level or low->high edge */
#define IRQ_POLARITY_NEGATIVE 0x0 /* low level or high->low edge */ #define IRQ_POLARITY_NEGATIVE 0x0 /* low level or high->low edge */
/*
* IRQ line status macro IRQ_PER_CPU is used
*/
#define ARCH_HAS_IRQ_PER_CPU
#define get_irq_desc(irq) (&irq_desc[(irq)]) #define get_irq_desc(irq) (&irq_desc[(irq)])
/* Define a way to iterate across irqs. */ /* Define a way to iterate across irqs. */
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */ #define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */
#define IRQ_LEVEL 64 /* IRQ level triggered */ #define IRQ_LEVEL 64 /* IRQ level triggered */
#define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */ #define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */
#ifdef ARCH_HAS_IRQ_PER_CPU #ifdef CONFIG_IRQ_PER_CPU
# define IRQ_PER_CPU 256 /* IRQ is per CPU */ # define IRQ_PER_CPU 256 /* IRQ is per CPU */
# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
#else #else
......
...@@ -198,7 +198,7 @@ int setup_irq(unsigned int irq, struct irqaction *new) ...@@ -198,7 +198,7 @@ int setup_irq(unsigned int irq, struct irqaction *new)
if (!(old->flags & new->flags & SA_SHIRQ)) if (!(old->flags & new->flags & SA_SHIRQ))
goto mismatch; goto mismatch;
#if defined(ARCH_HAS_IRQ_PER_CPU) && defined(SA_PERCPU_IRQ) #if defined(CONFIG_IRQ_PER_CPU) && defined(SA_PERCPU_IRQ)
/* All handlers must agree on per-cpuness */ /* All handlers must agree on per-cpuness */
if ((old->flags & IRQ_PER_CPU) != (new->flags & IRQ_PER_CPU)) if ((old->flags & IRQ_PER_CPU) != (new->flags & IRQ_PER_CPU))
goto mismatch; goto mismatch;
...@@ -213,7 +213,7 @@ int setup_irq(unsigned int irq, struct irqaction *new) ...@@ -213,7 +213,7 @@ int setup_irq(unsigned int irq, struct irqaction *new)
} }
*p = new; *p = new;
#if defined(ARCH_HAS_IRQ_PER_CPU) && defined(SA_PERCPU_IRQ) #if defined(CONFIG_IRQ_PER_CPU) && defined(SA_PERCPU_IRQ)
if (new->flags & SA_PERCPU_IRQ) if (new->flags & SA_PERCPU_IRQ)
desc->status |= IRQ_PER_CPU; desc->status |= IRQ_PER_CPU;
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册