diff options
author | Jiang Liu <jiang.liu@linux.intel.com> | 2015-04-13 22:30:09 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-04-24 09:36:55 -0400 |
commit | d746d1ebd30c48562a3fb512ab18d5822f137820 (patch) | |
tree | 4ec77991bd2c59775526e56d84c720cfb6792c49 | |
parent | f7a0c78669ee79443a91ea89652766c1be8d9e04 (diff) |
x86/irq: Move irqdomain specific code into asm/irqdomain.h
Now we have dedicated asm/irqdomain.h, so move irqdomain specific
code into it.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: David Cohen <david.a.cohen@linux.intel.com>
Cc: Sander Eikelenboom <linux@eikelenboom.it>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dimitri Sivanich <sivanich@sgi.com>
Cc: Joerg Roedel <jroedel@suse.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Link: http://lkml.kernel.org/r/1428978610-28986-33-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 | 24 | ||||
-rw-r--r-- | arch/x86/include/asm/irq_remapping.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/irqdomain.h | 35 | ||||
-rw-r--r-- | arch/x86/kernel/apic/htirq.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apic/msi.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apic/vector.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/hpet.c | 2 | ||||
-rw-r--r-- | arch/x86/platform/uv/uv_irq.c | 2 |
8 files changed, 38 insertions, 33 deletions
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h index 3b8233a26348..1f88e719fa78 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h | |||
@@ -94,8 +94,6 @@ extern void trace_call_function_single_interrupt(void); | |||
94 | #define trace_kvm_posted_intr_ipi kvm_posted_intr_ipi | 94 | #define trace_kvm_posted_intr_ipi kvm_posted_intr_ipi |
95 | #endif /* CONFIG_TRACING */ | 95 | #endif /* CONFIG_TRACING */ |
96 | 96 | ||
97 | struct irq_domain; | ||
98 | |||
99 | #ifdef CONFIG_X86_LOCAL_APIC | 97 | #ifdef CONFIG_X86_LOCAL_APIC |
100 | struct irq_data; | 98 | struct irq_data; |
101 | struct pci_dev; | 99 | struct pci_dev; |
@@ -165,22 +163,11 @@ struct irq_alloc_info { | |||
165 | }; | 163 | }; |
166 | }; | 164 | }; |
167 | 165 | ||
168 | enum { | ||
169 | /* Allocate contiguous CPU vectors */ | ||
170 | X86_IRQ_ALLOC_CONTIGUOUS_VECTORS = 0x1, | ||
171 | }; | ||
172 | |||
173 | struct irq_cfg { | 166 | struct irq_cfg { |
174 | unsigned int dest_apicid; | 167 | unsigned int dest_apicid; |
175 | u8 vector; | 168 | u8 vector; |
176 | }; | 169 | }; |
177 | 170 | ||
178 | extern struct irq_domain *x86_vector_domain; | ||
179 | |||
180 | extern void init_irq_alloc_info(struct irq_alloc_info *info, | ||
181 | const struct cpumask *mask); | ||
182 | extern void copy_irq_alloc_info(struct irq_alloc_info *dst, | ||
183 | struct irq_alloc_info *src); | ||
184 | extern struct irq_cfg *irq_cfg(unsigned int irq); | 171 | extern struct irq_cfg *irq_cfg(unsigned int irq); |
185 | extern struct irq_cfg *irqd_cfg(struct irq_data *irq_data); | 172 | extern struct irq_cfg *irqd_cfg(struct irq_data *irq_data); |
186 | extern void lock_vector_lock(void); | 173 | extern void lock_vector_lock(void); |
@@ -200,17 +187,6 @@ static inline void lock_vector_lock(void) {} | |||
200 | static inline void unlock_vector_lock(void) {} | 187 | static inline void unlock_vector_lock(void) {} |
201 | #endif /* CONFIG_X86_LOCAL_APIC */ | 188 | #endif /* CONFIG_X86_LOCAL_APIC */ |
202 | 189 | ||
203 | #ifdef CONFIG_PCI_MSI | ||
204 | extern void arch_init_msi_domain(struct irq_domain *domain); | ||
205 | #else | ||
206 | static inline void arch_init_msi_domain(struct irq_domain *domain) { } | ||
207 | #endif | ||
208 | #ifdef CONFIG_HT_IRQ | ||
209 | extern void arch_init_htirq_domain(struct irq_domain *domain); | ||
210 | #else | ||
211 | static inline void arch_init_htirq_domain(struct irq_domain *domain) { } | ||
212 | #endif | ||
213 | |||
214 | /* Statistics */ | 190 | /* Statistics */ |
215 | extern atomic_t irq_err_count; | 191 | extern atomic_t irq_err_count; |
216 | extern atomic_t irq_mis_count; | 192 | extern atomic_t irq_mis_count; |
diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/include/asm/irq_remapping.h index 09efa358c831..78974fbc33b4 100644 --- a/arch/x86/include/asm/irq_remapping.h +++ b/arch/x86/include/asm/irq_remapping.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #ifndef __X86_IRQ_REMAPPING_H | 22 | #ifndef __X86_IRQ_REMAPPING_H |
23 | #define __X86_IRQ_REMAPPING_H | 23 | #define __X86_IRQ_REMAPPING_H |
24 | 24 | ||
25 | #include <linux/irqdomain.h> | 25 | #include <asm/irqdomain.h> |
26 | #include <asm/hw_irq.h> | 26 | #include <asm/hw_irq.h> |
27 | #include <asm/io_apic.h> | 27 | #include <asm/io_apic.h> |
28 | 28 | ||
diff --git a/arch/x86/include/asm/irqdomain.h b/arch/x86/include/asm/irqdomain.h index fe0d4c6636ec..d26075b52885 100644 --- a/arch/x86/include/asm/irqdomain.h +++ b/arch/x86/include/asm/irqdomain.h | |||
@@ -2,6 +2,25 @@ | |||
2 | #define _ASM_IRQDOMAIN_H | 2 | #define _ASM_IRQDOMAIN_H |
3 | 3 | ||
4 | #include <linux/irqdomain.h> | 4 | #include <linux/irqdomain.h> |
5 | #include <asm/hw_irq.h> | ||
6 | |||
7 | #ifdef CONFIG_X86_LOCAL_APIC | ||
8 | enum { | ||
9 | /* Allocate contiguous CPU vectors */ | ||
10 | X86_IRQ_ALLOC_CONTIGUOUS_VECTORS = 0x1, | ||
11 | }; | ||
12 | |||
13 | extern struct irq_domain *x86_vector_domain; | ||
14 | |||
15 | extern void init_irq_alloc_info(struct irq_alloc_info *info, | ||
16 | const struct cpumask *mask); | ||
17 | extern void copy_irq_alloc_info(struct irq_alloc_info *dst, | ||
18 | struct irq_alloc_info *src); | ||
19 | #endif /* CONFIG_X86_LOCAL_APIC */ | ||
20 | |||
21 | #ifdef CONFIG_X86_IO_APIC | ||
22 | struct device_node; | ||
23 | struct irq_data; | ||
5 | 24 | ||
6 | enum ioapic_domain_type { | 25 | enum ioapic_domain_type { |
7 | IOAPIC_DOMAIN_INVALID, | 26 | IOAPIC_DOMAIN_INVALID, |
@@ -10,9 +29,6 @@ enum ioapic_domain_type { | |||
10 | IOAPIC_DOMAIN_DYNAMIC, | 29 | IOAPIC_DOMAIN_DYNAMIC, |
11 | }; | 30 | }; |
12 | 31 | ||
13 | struct device_node; | ||
14 | struct irq_data; | ||
15 | |||
16 | struct ioapic_domain_cfg { | 32 | struct ioapic_domain_cfg { |
17 | enum ioapic_domain_type type; | 33 | enum ioapic_domain_type type; |
18 | const struct irq_domain_ops *ops; | 34 | const struct irq_domain_ops *ops; |
@@ -30,5 +46,18 @@ extern void mp_irqdomain_activate(struct irq_domain *domain, | |||
30 | extern void mp_irqdomain_deactivate(struct irq_domain *domain, | 46 | extern void mp_irqdomain_deactivate(struct irq_domain *domain, |
31 | struct irq_data *irq_data); | 47 | struct irq_data *irq_data); |
32 | extern int mp_irqdomain_ioapic_idx(struct irq_domain *domain); | 48 | extern int mp_irqdomain_ioapic_idx(struct irq_domain *domain); |
49 | #endif /* CONFIG_X86_IO_APIC */ | ||
50 | |||
51 | #ifdef CONFIG_PCI_MSI | ||
52 | extern void arch_init_msi_domain(struct irq_domain *domain); | ||
53 | #else | ||
54 | static inline void arch_init_msi_domain(struct irq_domain *domain) { } | ||
55 | #endif | ||
56 | |||
57 | #ifdef CONFIG_HT_IRQ | ||
58 | extern void arch_init_htirq_domain(struct irq_domain *domain); | ||
59 | #else | ||
60 | static inline void arch_init_htirq_domain(struct irq_domain *domain) { } | ||
61 | #endif | ||
33 | 62 | ||
34 | #endif | 63 | #endif |
diff --git a/arch/x86/kernel/apic/htirq.c b/arch/x86/kernel/apic/htirq.c index 1cae104415ea..341e99be42b8 100644 --- a/arch/x86/kernel/apic/htirq.c +++ b/arch/x86/kernel/apic/htirq.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
18 | #include <linux/htirq.h> | 18 | #include <linux/htirq.h> |
19 | #include <linux/irqdomain.h> | 19 | #include <asm/irqdomain.h> |
20 | #include <asm/hw_irq.h> | 20 | #include <asm/hw_irq.h> |
21 | #include <asm/apic.h> | 21 | #include <asm/apic.h> |
22 | #include <asm/hypertransport.h> | 22 | #include <asm/hypertransport.h> |
diff --git a/arch/x86/kernel/apic/msi.c b/arch/x86/kernel/apic/msi.c index 109584261c4e..58fde664e7c0 100644 --- a/arch/x86/kernel/apic/msi.c +++ b/arch/x86/kernel/apic/msi.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/dmar.h> | 16 | #include <linux/dmar.h> |
17 | #include <linux/hpet.h> | 17 | #include <linux/hpet.h> |
18 | #include <linux/msi.h> | 18 | #include <linux/msi.h> |
19 | #include <linux/irqdomain.h> | 19 | #include <asm/irqdomain.h> |
20 | #include <asm/msidef.h> | 20 | #include <asm/msidef.h> |
21 | #include <asm/hpet.h> | 21 | #include <asm/hpet.h> |
22 | #include <asm/hw_irq.h> | 22 | #include <asm/hw_irq.h> |
diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index 60047495041c..ad786f8a7cc7 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c | |||
@@ -13,8 +13,8 @@ | |||
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/compiler.h> | 15 | #include <linux/compiler.h> |
16 | #include <linux/irqdomain.h> | ||
17 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <asm/irqdomain.h> | ||
18 | #include <asm/hw_irq.h> | 18 | #include <asm/hw_irq.h> |
19 | #include <asm/apic.h> | 19 | #include <asm/apic.h> |
20 | #include <asm/i8259.h> | 20 | #include <asm/i8259.h> |
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index e3bc18080052..e2449cf38b06 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -11,8 +11,8 @@ | |||
11 | #include <linux/cpu.h> | 11 | #include <linux/cpu.h> |
12 | #include <linux/pm.h> | 12 | #include <linux/pm.h> |
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <linux/irqdomain.h> | ||
15 | 14 | ||
15 | #include <asm/irqdomain.h> | ||
16 | #include <asm/fixmap.h> | 16 | #include <asm/fixmap.h> |
17 | #include <asm/hpet.h> | 17 | #include <asm/hpet.h> |
18 | #include <asm/time.h> | 18 | #include <asm/time.h> |
diff --git a/arch/x86/platform/uv/uv_irq.c b/arch/x86/platform/uv/uv_irq.c index 091b36ac44c4..cdf86cd3fd97 100644 --- a/arch/x86/platform/uv/uv_irq.c +++ b/arch/x86/platform/uv/uv_irq.c | |||
@@ -12,8 +12,8 @@ | |||
12 | #include <linux/rbtree.h> | 12 | #include <linux/rbtree.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/irqdomain.h> | ||
16 | 15 | ||
16 | #include <asm/irqdomain.h> | ||
17 | #include <asm/apic.h> | 17 | #include <asm/apic.h> |
18 | #include <asm/uv/uv_irq.h> | 18 | #include <asm/uv/uv_irq.h> |
19 | #include <asm/uv/uv_hub.h> | 19 | #include <asm/uv/uv_hub.h> |