diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2014-05-07 11:44:21 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2014-05-16 08:05:22 -0400 |
commit | f63b6a05f2b11537612266a8b27a61f412344a1d (patch) | |
tree | 143db649e58c3c6b45cda00a8a9c5ee947a11755 | |
parent | be4034016c11f8913d38fccf692007fab1c50be1 (diff) |
genirq: Replace reserve_irqs in core code
We want to get rid of the public interface.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Tony Luck <tony.luck@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20140507154340.061990194@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | kernel/irq/chip.c | 5 | ||||
-rw-r--r-- | kernel/irq/internals.h | 6 | ||||
-rw-r--r-- | kernel/irq/irqdesc.c | 7 |
3 files changed, 15 insertions, 3 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 6397df2d6945..a2b28a2fd7b1 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -40,10 +40,9 @@ int irq_set_chip(unsigned int irq, struct irq_chip *chip) | |||
40 | irq_put_desc_unlock(desc, flags); | 40 | irq_put_desc_unlock(desc, flags); |
41 | /* | 41 | /* |
42 | * For !CONFIG_SPARSE_IRQ make the irq show up in | 42 | * For !CONFIG_SPARSE_IRQ make the irq show up in |
43 | * allocated_irqs. For the CONFIG_SPARSE_IRQ case, it is | 43 | * allocated_irqs. |
44 | * already marked, and this call is harmless. | ||
45 | */ | 44 | */ |
46 | irq_reserve_irq(irq); | 45 | irq_mark_irq(irq); |
47 | return 0; | 46 | return 0; |
48 | } | 47 | } |
49 | EXPORT_SYMBOL(irq_set_chip); | 48 | EXPORT_SYMBOL(irq_set_chip); |
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index ddf1ffeb79f1..c4065e3edbc3 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h | |||
@@ -76,6 +76,12 @@ extern void mask_irq(struct irq_desc *desc); | |||
76 | extern void unmask_irq(struct irq_desc *desc); | 76 | extern void unmask_irq(struct irq_desc *desc); |
77 | extern void unmask_threaded_irq(struct irq_desc *desc); | 77 | extern void unmask_threaded_irq(struct irq_desc *desc); |
78 | 78 | ||
79 | #ifdef CONFIG_SPARSE_IRQ | ||
80 | static inline void irq_mark_irq(unsigned int irq) { } | ||
81 | #else | ||
82 | extern void irq_mark_irq(unsigned int irq); | ||
83 | #endif | ||
84 | |||
79 | extern void init_kstat_irqs(struct irq_desc *desc, int node, int nr); | 85 | extern void init_kstat_irqs(struct irq_desc *desc, int node, int nr); |
80 | 86 | ||
81 | irqreturn_t handle_irq_event_percpu(struct irq_desc *desc, struct irqaction *action); | 87 | irqreturn_t handle_irq_event_percpu(struct irq_desc *desc, struct irqaction *action); |
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index f388ade5e792..24029348729b 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c | |||
@@ -299,6 +299,13 @@ static int irq_expand_nr_irqs(unsigned int nr) | |||
299 | return -ENOMEM; | 299 | return -ENOMEM; |
300 | } | 300 | } |
301 | 301 | ||
302 | void irq_mark_irq(unsigned int irq) | ||
303 | { | ||
304 | mutex_lock(&sparse_irq_lock); | ||
305 | bitmap_set(allocated_irqs, irq, 1); | ||
306 | mutex_unlock(&sparse_irq_lock); | ||
307 | } | ||
308 | |||
302 | #endif /* !CONFIG_SPARSE_IRQ */ | 309 | #endif /* !CONFIG_SPARSE_IRQ */ |
303 | 310 | ||
304 | /** | 311 | /** |