diff options
author | Jiang Liu <jiang.liu@linux.intel.com> | 2014-10-27 04:11:59 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2014-12-16 08:08:16 -0500 |
commit | 55a0e2b122c26c7496ea85754bceddc05dba402b (patch) | |
tree | b08ec3a5b3ebf967e72e20f1ffeaf1cf01591c51 | |
parent | b794ef26f1b08f712f970fe07290b96f9e070746 (diff) |
x86, irq: Introduce helpers to access struct irq_cfg
Change irq_cfg() from static to extern, also introduce helper function
irqd_cfg(). Later we can rewrite these two helpers when enabling
hierarchy irqdomain.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Grant Likely <grant.likely@linaro.org>
Link: http://lkml.kernel.org/r/1414397531-28254-9-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/include/asm/hw_irq.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h index e1acbbaf47ca..454c9e4056e6 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h | |||
@@ -132,6 +132,8 @@ struct irq_cfg { | |||
132 | }; | 132 | }; |
133 | }; | 133 | }; |
134 | 134 | ||
135 | extern struct irq_cfg *irq_cfg(unsigned int irq); | ||
136 | extern struct irq_cfg *irqd_cfg(struct irq_data *irq_data); | ||
135 | extern void setup_vector_irq(int cpu); | 137 | extern void setup_vector_irq(int cpu); |
136 | extern int assign_irq_vector(int, struct irq_cfg *, const struct cpumask *); | 138 | extern int assign_irq_vector(int, struct irq_cfg *, const struct cpumask *); |
137 | #ifdef CONFIG_SMP | 139 | #ifdef CONFIG_SMP |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index ab8ca9327c06..783468efa4a1 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -281,11 +281,16 @@ int __init arch_early_irq_init(void) | |||
281 | return 0; | 281 | return 0; |
282 | } | 282 | } |
283 | 283 | ||
284 | static inline struct irq_cfg *irq_cfg(unsigned int irq) | 284 | struct irq_cfg *irq_cfg(unsigned int irq) |
285 | { | 285 | { |
286 | return irq_get_chip_data(irq); | 286 | return irq_get_chip_data(irq); |
287 | } | 287 | } |
288 | 288 | ||
289 | struct irq_cfg *irqd_cfg(struct irq_data *irq_data) | ||
290 | { | ||
291 | return irq_data->chip_data; | ||
292 | } | ||
293 | |||
289 | static struct irq_cfg *alloc_irq_cfg(unsigned int irq, int node) | 294 | static struct irq_cfg *alloc_irq_cfg(unsigned int irq, int node) |
290 | { | 295 | { |
291 | struct irq_cfg *cfg; | 296 | struct irq_cfg *cfg; |