diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-08 09:40:05 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-19 06:58:19 -0500 |
commit | 6a58fb3bad099076f36f0f30f44507bc3275cdb6 (patch) | |
tree | 9a40117c941d914b1ef13463436657ae9721fea3 | |
parent | f230b6d5c48f8d12f4dfa1f8b5ab0b0320076d21 (diff) |
genirq: Remove CONFIG_IRQ_PER_CPU
The saving of this switch is minimal versus the ifdef mess it
creates. Simple enable PER_CPU unconditionally and remove the config
switch.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | include/linux/irq.h | 5 | ||||
-rw-r--r-- | kernel/irq/Kconfig | 3 | ||||
-rw-r--r-- | kernel/irq/internals.h | 2 | ||||
-rw-r--r-- | kernel/irq/manage.c | 9 |
4 files changed, 3 insertions, 16 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 2899905bfac7..ab708f27a33b 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -78,13 +78,8 @@ typedef void (*irq_flow_handler_t)(unsigned int irq, | |||
78 | IRQ_NOAUTOEN | IRQ_MOVE_PCNTXT | IRQ_LEVEL | IRQ_NO_BALANCING | \ | 78 | IRQ_NOAUTOEN | IRQ_MOVE_PCNTXT | IRQ_LEVEL | IRQ_NO_BALANCING | \ |
79 | IRQ_PER_CPU | IRQ_NESTED_THREAD) | 79 | IRQ_PER_CPU | IRQ_NESTED_THREAD) |
80 | 80 | ||
81 | #ifdef CONFIG_IRQ_PER_CPU | ||
82 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | 81 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) |
83 | # define IRQ_NO_BALANCING_MASK (IRQ_PER_CPU | IRQ_NO_BALANCING) | 82 | # define IRQ_NO_BALANCING_MASK (IRQ_PER_CPU | IRQ_NO_BALANCING) |
84 | #else | ||
85 | # define CHECK_IRQ_PER_CPU(var) 0 | ||
86 | # define IRQ_NO_BALANCING_MASK IRQ_NO_BALANCING | ||
87 | #endif | ||
88 | 83 | ||
89 | /* | 84 | /* |
90 | * Return value for chip->irq_set_affinity() | 85 | * Return value for chip->irq_set_affinity() |
diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig index 9e2256de1d1a..48ad25f5fa59 100644 --- a/kernel/irq/Kconfig +++ b/kernel/irq/Kconfig | |||
@@ -32,9 +32,6 @@ config GENERIC_PENDING_IRQ | |||
32 | config AUTO_IRQ_AFFINITY | 32 | config AUTO_IRQ_AFFINITY |
33 | def_bool n | 33 | def_bool n |
34 | 34 | ||
35 | config IRQ_PER_CPU | ||
36 | def_bool n | ||
37 | |||
38 | config HARDIRQS_SW_RESEND | 35 | config HARDIRQS_SW_RESEND |
39 | def_bool n | 36 | def_bool n |
40 | 37 | ||
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index e93e6090cd47..9e32b3d35d35 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h | |||
@@ -163,9 +163,7 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc) | |||
163 | } | 163 | } |
164 | 164 | ||
165 | P(IRQ_LEVEL); | 165 | P(IRQ_LEVEL); |
166 | #ifdef CONFIG_IRQ_PER_CPU | ||
167 | P(IRQ_PER_CPU); | 166 | P(IRQ_PER_CPU); |
168 | #endif | ||
169 | P(IRQ_NOPROBE); | 167 | P(IRQ_NOPROBE); |
170 | P(IRQ_NOREQUEST); | 168 | P(IRQ_NOREQUEST); |
171 | P(IRQ_NOAUTOEN); | 169 | P(IRQ_NOAUTOEN); |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 9a99c471d470..056aa49698b4 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -865,12 +865,10 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | |||
865 | goto mismatch; | 865 | goto mismatch; |
866 | } | 866 | } |
867 | 867 | ||
868 | #if defined(CONFIG_IRQ_PER_CPU) | ||
869 | /* All handlers must agree on per-cpuness */ | 868 | /* All handlers must agree on per-cpuness */ |
870 | if ((old->flags & IRQF_PERCPU) != | 869 | if ((old->flags & IRQF_PERCPU) != |
871 | (new->flags & IRQF_PERCPU)) | 870 | (new->flags & IRQF_PERCPU)) |
872 | goto mismatch; | 871 | goto mismatch; |
873 | #endif | ||
874 | 872 | ||
875 | /* add new interrupt at end of irq queue */ | 873 | /* add new interrupt at end of irq queue */ |
876 | do { | 874 | do { |
@@ -894,15 +892,14 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | |||
894 | goto out_mask; | 892 | goto out_mask; |
895 | } else | 893 | } else |
896 | compat_irq_chip_set_default_handler(desc); | 894 | compat_irq_chip_set_default_handler(desc); |
897 | #if defined(CONFIG_IRQ_PER_CPU) | ||
898 | if (new->flags & IRQF_PERCPU) | ||
899 | desc->status |= IRQ_PER_CPU; | ||
900 | #endif | ||
901 | 895 | ||
902 | desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED | \ | 896 | desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED | \ |
903 | IRQS_INPROGRESS | IRQS_ONESHOT | \ | 897 | IRQS_INPROGRESS | IRQS_ONESHOT | \ |
904 | IRQS_WAITING); | 898 | IRQS_WAITING); |
905 | 899 | ||
900 | if (new->flags & IRQF_PERCPU) | ||
901 | desc->status |= IRQ_PER_CPU; | ||
902 | |||
906 | if (new->flags & IRQF_ONESHOT) | 903 | if (new->flags & IRQF_ONESHOT) |
907 | desc->istate |= IRQS_ONESHOT; | 904 | desc->istate |= IRQS_ONESHOT; |
908 | 905 | ||