diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-08-30 03:39:53 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-09-13 09:09:52 -0400 |
commit | 0244ad004a54e39308d495fee0a2e637f8b5c317 (patch) | |
tree | b59152dc7cf57e7ffb9c8388ae9095e665406633 /include | |
parent | 5a7d8a28080caed7fd4cb1b81d092adac4445e8e (diff) |
Remove GENERIC_HARDIRQ config option
After the last architecture switched to generic hard irqs the config
options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code
for !CONFIG_GENERIC_HARDIRQS can be removed.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cpu_rmap.h | 3 | ||||
-rw-r--r-- | include/linux/hardirq.h | 4 | ||||
-rw-r--r-- | include/linux/interrupt.h | 75 | ||||
-rw-r--r-- | include/linux/irq.h | 9 | ||||
-rw-r--r-- | include/linux/irqdesc.h | 3 | ||||
-rw-r--r-- | include/linux/irqnr.h | 19 | ||||
-rw-r--r-- | include/linux/kernel_stat.h | 34 |
7 files changed, 3 insertions, 144 deletions
diff --git a/include/linux/cpu_rmap.h b/include/linux/cpu_rmap.h index 1739510d8994..bdd18caa6c94 100644 --- a/include/linux/cpu_rmap.h +++ b/include/linux/cpu_rmap.h | |||
@@ -52,8 +52,6 @@ static inline void *cpu_rmap_lookup_obj(struct cpu_rmap *rmap, unsigned int cpu) | |||
52 | return rmap->obj[rmap->near[cpu].index]; | 52 | return rmap->obj[rmap->near[cpu].index]; |
53 | } | 53 | } |
54 | 54 | ||
55 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
56 | |||
57 | /** | 55 | /** |
58 | * alloc_irq_cpu_rmap - allocate CPU affinity reverse-map for IRQs | 56 | * alloc_irq_cpu_rmap - allocate CPU affinity reverse-map for IRQs |
59 | * @size: Number of objects to be mapped | 57 | * @size: Number of objects to be mapped |
@@ -68,5 +66,4 @@ extern void free_irq_cpu_rmap(struct cpu_rmap *rmap); | |||
68 | 66 | ||
69 | extern int irq_cpu_rmap_add(struct cpu_rmap *rmap, int irq); | 67 | extern int irq_cpu_rmap_add(struct cpu_rmap *rmap, int irq); |
70 | 68 | ||
71 | #endif | ||
72 | #endif /* __LINUX_CPU_RMAP_H */ | 69 | #endif /* __LINUX_CPU_RMAP_H */ |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index ccfe17c5c8da..1e041063b226 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -7,11 +7,7 @@ | |||
7 | #include <linux/vtime.h> | 7 | #include <linux/vtime.h> |
8 | 8 | ||
9 | 9 | ||
10 | #if defined(CONFIG_SMP) || defined(CONFIG_GENERIC_HARDIRQS) | ||
11 | extern void synchronize_irq(unsigned int irq); | 10 | extern void synchronize_irq(unsigned int irq); |
12 | #else | ||
13 | # define synchronize_irq(irq) barrier() | ||
14 | #endif | ||
15 | 11 | ||
16 | #if defined(CONFIG_TINY_RCU) | 12 | #if defined(CONFIG_TINY_RCU) |
17 | 13 | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 5fa5afeeb759..5e865b554940 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -120,7 +120,6 @@ struct irqaction { | |||
120 | 120 | ||
121 | extern irqreturn_t no_action(int cpl, void *dev_id); | 121 | extern irqreturn_t no_action(int cpl, void *dev_id); |
122 | 122 | ||
123 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
124 | extern int __must_check | 123 | extern int __must_check |
125 | request_threaded_irq(unsigned int irq, irq_handler_t handler, | 124 | request_threaded_irq(unsigned int irq, irq_handler_t handler, |
126 | irq_handler_t thread_fn, | 125 | irq_handler_t thread_fn, |
@@ -140,40 +139,6 @@ request_any_context_irq(unsigned int irq, irq_handler_t handler, | |||
140 | extern int __must_check | 139 | extern int __must_check |
141 | request_percpu_irq(unsigned int irq, irq_handler_t handler, | 140 | request_percpu_irq(unsigned int irq, irq_handler_t handler, |
142 | const char *devname, void __percpu *percpu_dev_id); | 141 | const char *devname, void __percpu *percpu_dev_id); |
143 | #else | ||
144 | |||
145 | extern int __must_check | ||
146 | request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, | ||
147 | const char *name, void *dev); | ||
148 | |||
149 | /* | ||
150 | * Special function to avoid ifdeffery in kernel/irq/devres.c which | ||
151 | * gets magically built by GENERIC_HARDIRQS=n architectures (sparc, | ||
152 | * m68k). I really love these $@%#!* obvious Makefile references: | ||
153 | * ../../../kernel/irq/devres.o | ||
154 | */ | ||
155 | static inline int __must_check | ||
156 | request_threaded_irq(unsigned int irq, irq_handler_t handler, | ||
157 | irq_handler_t thread_fn, | ||
158 | unsigned long flags, const char *name, void *dev) | ||
159 | { | ||
160 | return request_irq(irq, handler, flags, name, dev); | ||
161 | } | ||
162 | |||
163 | static inline int __must_check | ||
164 | request_any_context_irq(unsigned int irq, irq_handler_t handler, | ||
165 | unsigned long flags, const char *name, void *dev_id) | ||
166 | { | ||
167 | return request_irq(irq, handler, flags, name, dev_id); | ||
168 | } | ||
169 | |||
170 | static inline int __must_check | ||
171 | request_percpu_irq(unsigned int irq, irq_handler_t handler, | ||
172 | const char *devname, void __percpu *percpu_dev_id) | ||
173 | { | ||
174 | return request_irq(irq, handler, 0, devname, percpu_dev_id); | ||
175 | } | ||
176 | #endif | ||
177 | 142 | ||
178 | extern void free_irq(unsigned int, void *); | 143 | extern void free_irq(unsigned int, void *); |
179 | extern void free_percpu_irq(unsigned int, void __percpu *); | 144 | extern void free_percpu_irq(unsigned int, void __percpu *); |
@@ -221,7 +186,6 @@ extern void enable_irq(unsigned int irq); | |||
221 | extern void enable_percpu_irq(unsigned int irq, unsigned int type); | 186 | extern void enable_percpu_irq(unsigned int irq, unsigned int type); |
222 | 187 | ||
223 | /* The following three functions are for the core kernel use only. */ | 188 | /* The following three functions are for the core kernel use only. */ |
224 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
225 | extern void suspend_device_irqs(void); | 189 | extern void suspend_device_irqs(void); |
226 | extern void resume_device_irqs(void); | 190 | extern void resume_device_irqs(void); |
227 | #ifdef CONFIG_PM_SLEEP | 191 | #ifdef CONFIG_PM_SLEEP |
@@ -229,13 +193,8 @@ extern int check_wakeup_irqs(void); | |||
229 | #else | 193 | #else |
230 | static inline int check_wakeup_irqs(void) { return 0; } | 194 | static inline int check_wakeup_irqs(void) { return 0; } |
231 | #endif | 195 | #endif |
232 | #else | ||
233 | static inline void suspend_device_irqs(void) { }; | ||
234 | static inline void resume_device_irqs(void) { }; | ||
235 | static inline int check_wakeup_irqs(void) { return 0; } | ||
236 | #endif | ||
237 | 196 | ||
238 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS) | 197 | #if defined(CONFIG_SMP) |
239 | 198 | ||
240 | extern cpumask_var_t irq_default_affinity; | 199 | extern cpumask_var_t irq_default_affinity; |
241 | 200 | ||
@@ -287,9 +246,8 @@ static inline int irq_set_affinity_hint(unsigned int irq, | |||
287 | { | 246 | { |
288 | return -EINVAL; | 247 | return -EINVAL; |
289 | } | 248 | } |
290 | #endif /* CONFIG_SMP && CONFIG_GENERIC_HARDIRQS */ | 249 | #endif /* CONFIG_SMP */ |
291 | 250 | ||
292 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
293 | /* | 251 | /* |
294 | * Special lockdep variants of irq disabling/enabling. | 252 | * Special lockdep variants of irq disabling/enabling. |
295 | * These should be used for locking constructs that | 253 | * These should be used for locking constructs that |
@@ -354,33 +312,6 @@ static inline int disable_irq_wake(unsigned int irq) | |||
354 | return irq_set_irq_wake(irq, 0); | 312 | return irq_set_irq_wake(irq, 0); |
355 | } | 313 | } |
356 | 314 | ||
357 | #else /* !CONFIG_GENERIC_HARDIRQS */ | ||
358 | /* | ||
359 | * NOTE: non-genirq architectures, if they want to support the lock | ||
360 | * validator need to define the methods below in their asm/irq.h | ||
361 | * files, under an #ifdef CONFIG_LOCKDEP section. | ||
362 | */ | ||
363 | #ifndef CONFIG_LOCKDEP | ||
364 | # define disable_irq_nosync_lockdep(irq) disable_irq_nosync(irq) | ||
365 | # define disable_irq_nosync_lockdep_irqsave(irq, flags) \ | ||
366 | disable_irq_nosync(irq) | ||
367 | # define disable_irq_lockdep(irq) disable_irq(irq) | ||
368 | # define enable_irq_lockdep(irq) enable_irq(irq) | ||
369 | # define enable_irq_lockdep_irqrestore(irq, flags) \ | ||
370 | enable_irq(irq) | ||
371 | # endif | ||
372 | |||
373 | static inline int enable_irq_wake(unsigned int irq) | ||
374 | { | ||
375 | return 0; | ||
376 | } | ||
377 | |||
378 | static inline int disable_irq_wake(unsigned int irq) | ||
379 | { | ||
380 | return 0; | ||
381 | } | ||
382 | #endif /* CONFIG_GENERIC_HARDIRQS */ | ||
383 | |||
384 | 315 | ||
385 | #ifdef CONFIG_IRQ_FORCED_THREADING | 316 | #ifdef CONFIG_IRQ_FORCED_THREADING |
386 | extern bool force_irqthreads; | 317 | extern bool force_irqthreads; |
@@ -655,7 +586,7 @@ void tasklet_hrtimer_cancel(struct tasklet_hrtimer *ttimer) | |||
655 | * if more than one irq occurred. | 586 | * if more than one irq occurred. |
656 | */ | 587 | */ |
657 | 588 | ||
658 | #if defined(CONFIG_GENERIC_HARDIRQS) && !defined(CONFIG_GENERIC_IRQ_PROBE) | 589 | #if !defined(CONFIG_GENERIC_IRQ_PROBE) |
659 | static inline unsigned long probe_irq_on(void) | 590 | static inline unsigned long probe_irq_on(void) |
660 | { | 591 | { |
661 | return 0; | 592 | return 0; |
diff --git a/include/linux/irq.h b/include/linux/irq.h index f04d3ba335cb..56bb0dc8b7d4 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -382,8 +382,6 @@ extern void irq_cpu_online(void); | |||
382 | extern void irq_cpu_offline(void); | 382 | extern void irq_cpu_offline(void); |
383 | extern int __irq_set_affinity_locked(struct irq_data *data, const struct cpumask *cpumask); | 383 | extern int __irq_set_affinity_locked(struct irq_data *data, const struct cpumask *cpumask); |
384 | 384 | ||
385 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
386 | |||
387 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) | 385 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) |
388 | void irq_move_irq(struct irq_data *data); | 386 | void irq_move_irq(struct irq_data *data); |
389 | void irq_move_masked_irq(struct irq_data *data); | 387 | void irq_move_masked_irq(struct irq_data *data); |
@@ -802,11 +800,4 @@ static inline void irq_gc_lock(struct irq_chip_generic *gc) { } | |||
802 | static inline void irq_gc_unlock(struct irq_chip_generic *gc) { } | 800 | static inline void irq_gc_unlock(struct irq_chip_generic *gc) { } |
803 | #endif | 801 | #endif |
804 | 802 | ||
805 | #else /* !CONFIG_GENERIC_HARDIRQS */ | ||
806 | |||
807 | extern struct msi_desc *irq_get_msi_desc(unsigned int irq); | ||
808 | extern int irq_set_msi_desc(unsigned int irq, struct msi_desc *entry); | ||
809 | |||
810 | #endif /* CONFIG_GENERIC_HARDIRQS */ | ||
811 | |||
812 | #endif /* _LINUX_IRQ_H */ | 803 | #endif /* _LINUX_IRQ_H */ |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 623325e2ff97..56fb646909dc 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
@@ -76,8 +76,6 @@ struct irq_desc { | |||
76 | extern struct irq_desc irq_desc[NR_IRQS]; | 76 | extern struct irq_desc irq_desc[NR_IRQS]; |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
80 | |||
81 | static inline struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc) | 79 | static inline struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc) |
82 | { | 80 | { |
83 | return &desc->irq_data; | 81 | return &desc->irq_data; |
@@ -173,6 +171,5 @@ __irq_set_preflow_handler(unsigned int irq, irq_preflow_handler_t handler) | |||
173 | desc->preflow_handler = handler; | 171 | desc->preflow_handler = handler; |
174 | } | 172 | } |
175 | #endif | 173 | #endif |
176 | #endif | ||
177 | 174 | ||
178 | #endif | 175 | #endif |
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index 0a2dc46cdaf6..fdd5cc16c9c4 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h | |||
@@ -4,23 +4,6 @@ | |||
4 | #include <uapi/linux/irqnr.h> | 4 | #include <uapi/linux/irqnr.h> |
5 | 5 | ||
6 | 6 | ||
7 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
8 | #include <asm/irq.h> | ||
9 | |||
10 | /* | ||
11 | * Wrappers for non-genirq architectures: | ||
12 | */ | ||
13 | #define nr_irqs NR_IRQS | ||
14 | #define irq_to_desc(irq) (&irq_desc[irq]) | ||
15 | |||
16 | # define for_each_irq_desc(irq, desc) \ | ||
17 | for (irq = 0; irq < nr_irqs; irq++) | ||
18 | |||
19 | # define for_each_irq_desc_reverse(irq, desc) \ | ||
20 | for (irq = nr_irqs - 1; irq >= 0; irq--) | ||
21 | |||
22 | #else /* CONFIG_GENERIC_HARDIRQS */ | ||
23 | |||
24 | extern int nr_irqs; | 7 | extern int nr_irqs; |
25 | extern struct irq_desc *irq_to_desc(unsigned int irq); | 8 | extern struct irq_desc *irq_to_desc(unsigned int irq); |
26 | unsigned int irq_get_next_irq(unsigned int offset); | 9 | unsigned int irq_get_next_irq(unsigned int offset); |
@@ -50,8 +33,6 @@ unsigned int irq_get_next_irq(unsigned int offset); | |||
50 | for (irq = irq_get_next_irq(0); irq < nr_irqs; \ | 33 | for (irq = irq_get_next_irq(0); irq < nr_irqs; \ |
51 | irq = irq_get_next_irq(irq + 1)) | 34 | irq = irq_get_next_irq(irq + 1)) |
52 | 35 | ||
53 | #endif /* CONFIG_GENERIC_HARDIRQS */ | ||
54 | |||
55 | #define for_each_irq_nr(irq) \ | 36 | #define for_each_irq_nr(irq) \ |
56 | for (irq = 0; irq < nr_irqs; irq++) | 37 | for (irq = 0; irq < nr_irqs; irq++) |
57 | 38 | ||
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index ed5f6ed6eb77..51c72be4a7c3 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
@@ -36,9 +36,6 @@ struct kernel_cpustat { | |||
36 | }; | 36 | }; |
37 | 37 | ||
38 | struct kernel_stat { | 38 | struct kernel_stat { |
39 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
40 | unsigned int irqs[NR_IRQS]; | ||
41 | #endif | ||
42 | unsigned long irqs_sum; | 39 | unsigned long irqs_sum; |
43 | unsigned int softirqs[NR_SOFTIRQS]; | 40 | unsigned int softirqs[NR_SOFTIRQS]; |
44 | }; | 41 | }; |
@@ -54,22 +51,6 @@ DECLARE_PER_CPU(struct kernel_cpustat, kernel_cpustat); | |||
54 | 51 | ||
55 | extern unsigned long long nr_context_switches(void); | 52 | extern unsigned long long nr_context_switches(void); |
56 | 53 | ||
57 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
58 | |||
59 | struct irq_desc; | ||
60 | |||
61 | static inline void kstat_incr_irqs_this_cpu(unsigned int irq, | ||
62 | struct irq_desc *desc) | ||
63 | { | ||
64 | __this_cpu_inc(kstat.irqs[irq]); | ||
65 | __this_cpu_inc(kstat.irqs_sum); | ||
66 | } | ||
67 | |||
68 | static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) | ||
69 | { | ||
70 | return kstat_cpu(cpu).irqs[irq]; | ||
71 | } | ||
72 | #else | ||
73 | #include <linux/irq.h> | 54 | #include <linux/irq.h> |
74 | extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); | 55 | extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); |
75 | 56 | ||
@@ -79,8 +60,6 @@ do { \ | |||
79 | __this_cpu_inc(kstat.irqs_sum); \ | 60 | __this_cpu_inc(kstat.irqs_sum); \ |
80 | } while (0) | 61 | } while (0) |
81 | 62 | ||
82 | #endif | ||
83 | |||
84 | static inline void kstat_incr_softirqs_this_cpu(unsigned int irq) | 63 | static inline void kstat_incr_softirqs_this_cpu(unsigned int irq) |
85 | { | 64 | { |
86 | __this_cpu_inc(kstat.softirqs[irq]); | 65 | __this_cpu_inc(kstat.softirqs[irq]); |
@@ -94,20 +73,7 @@ static inline unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu) | |||
94 | /* | 73 | /* |
95 | * Number of interrupts per specific IRQ source, since bootup | 74 | * Number of interrupts per specific IRQ source, since bootup |
96 | */ | 75 | */ |
97 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
98 | static inline unsigned int kstat_irqs(unsigned int irq) | ||
99 | { | ||
100 | unsigned int sum = 0; | ||
101 | int cpu; | ||
102 | |||
103 | for_each_possible_cpu(cpu) | ||
104 | sum += kstat_irqs_cpu(irq, cpu); | ||
105 | |||
106 | return sum; | ||
107 | } | ||
108 | #else | ||
109 | extern unsigned int kstat_irqs(unsigned int irq); | 76 | extern unsigned int kstat_irqs(unsigned int irq); |
110 | #endif | ||
111 | 77 | ||
112 | /* | 78 | /* |
113 | * Number of interrupts per cpu, since bootup | 79 | * Number of interrupts per cpu, since bootup |