diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2006-10-04 05:16:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 10:55:28 -0400 |
commit | ace80ab796ae30d2c9ee8a84ab6f608a61f8b87b (patch) | |
tree | 05eb2c68e534af4982ad82c459b1a65e3e712faf /include/asm-i386 | |
parent | 04b9267b15206fc902a18de1f78de6c82ca47716 (diff) |
[PATCH] genirq: i386 irq: Remove the msi assumption that irq == vector
This patch removes the change in behavior of the irq allocation code when
CONFIG_PCI_MSI is defined. Removing all instances of the assumption that irq
== vector.
create_irq is rewritten to first allocate a free irq and then to assign that
irq a vector.
assign_irq_vector is made static and the AUTO_ASSIGN case which allocates an
vector not bound to an irq is removed.
The ioapic vector methods are removed, and everything now works with irqs.
The definition of NR_IRQS no longer depends on CONFIG_PCI_MSI
[akpm@osdl.org: cleanup]
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/hw_irq.h | 1 | ||||
-rw-r--r-- | include/asm-i386/io_apic.h | 42 | ||||
-rw-r--r-- | include/asm-i386/mach-default/irq_vectors_limits.h | 5 |
3 files changed, 0 insertions, 48 deletions
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h index 8e8fbfaa252a..88f02a073561 100644 --- a/include/asm-i386/hw_irq.h +++ b/include/asm-i386/hw_irq.h | |||
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | extern u8 irq_vector[NR_IRQ_VECTORS]; | 29 | extern u8 irq_vector[NR_IRQ_VECTORS]; |
30 | #define IO_APIC_VECTOR(irq) (irq_vector[irq]) | 30 | #define IO_APIC_VECTOR(irq) (irq_vector[irq]) |
31 | #define AUTO_ASSIGN -1 | ||
32 | 31 | ||
33 | extern void (*interrupt[NR_IRQS])(void); | 32 | extern void (*interrupt[NR_IRQS])(void); |
34 | 33 | ||
diff --git a/include/asm-i386/io_apic.h b/include/asm-i386/io_apic.h index 5d309275a1dc..276ea7e8144a 100644 --- a/include/asm-i386/io_apic.h +++ b/include/asm-i386/io_apic.h | |||
@@ -12,46 +12,6 @@ | |||
12 | 12 | ||
13 | #ifdef CONFIG_X86_IO_APIC | 13 | #ifdef CONFIG_X86_IO_APIC |
14 | 14 | ||
15 | #ifdef CONFIG_PCI_MSI | ||
16 | static inline int use_pci_vector(void) {return 1;} | ||
17 | static inline void disable_edge_ioapic_vector(unsigned int vector) { } | ||
18 | static inline void mask_and_ack_level_ioapic_vector(unsigned int vector) { } | ||
19 | static inline void end_edge_ioapic_vector (unsigned int vector) { } | ||
20 | #define startup_level_ioapic startup_level_ioapic_vector | ||
21 | #define shutdown_level_ioapic mask_IO_APIC_vector | ||
22 | #define enable_level_ioapic unmask_IO_APIC_vector | ||
23 | #define disable_level_ioapic mask_IO_APIC_vector | ||
24 | #define mask_and_ack_level_ioapic mask_and_ack_level_ioapic_vector | ||
25 | #define end_level_ioapic end_level_ioapic_vector | ||
26 | #define set_ioapic_affinity set_ioapic_affinity_vector | ||
27 | |||
28 | #define startup_edge_ioapic startup_edge_ioapic_vector | ||
29 | #define shutdown_edge_ioapic disable_edge_ioapic_vector | ||
30 | #define enable_edge_ioapic unmask_IO_APIC_vector | ||
31 | #define disable_edge_ioapic disable_edge_ioapic_vector | ||
32 | #define ack_edge_ioapic ack_edge_ioapic_vector | ||
33 | #define end_edge_ioapic end_edge_ioapic_vector | ||
34 | #else | ||
35 | static inline int use_pci_vector(void) {return 0;} | ||
36 | static inline void disable_edge_ioapic_irq(unsigned int irq) { } | ||
37 | static inline void mask_and_ack_level_ioapic_irq(unsigned int irq) { } | ||
38 | static inline void end_edge_ioapic_irq (unsigned int irq) { } | ||
39 | #define startup_level_ioapic startup_level_ioapic_irq | ||
40 | #define shutdown_level_ioapic mask_IO_APIC_irq | ||
41 | #define enable_level_ioapic unmask_IO_APIC_irq | ||
42 | #define disable_level_ioapic mask_IO_APIC_irq | ||
43 | #define mask_and_ack_level_ioapic mask_and_ack_level_ioapic_irq | ||
44 | #define end_level_ioapic end_level_ioapic_irq | ||
45 | #define set_ioapic_affinity set_ioapic_affinity_irq | ||
46 | |||
47 | #define startup_edge_ioapic startup_edge_ioapic_irq | ||
48 | #define shutdown_edge_ioapic disable_edge_ioapic_irq | ||
49 | #define enable_edge_ioapic unmask_IO_APIC_irq | ||
50 | #define disable_edge_ioapic disable_edge_ioapic_irq | ||
51 | #define ack_edge_ioapic ack_edge_ioapic_irq | ||
52 | #define end_edge_ioapic end_edge_ioapic_irq | ||
53 | #endif | ||
54 | |||
55 | #define IO_APIC_BASE(idx) \ | 15 | #define IO_APIC_BASE(idx) \ |
56 | ((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + idx) \ | 16 | ((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + idx) \ |
57 | + (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK))) | 17 | + (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK))) |
@@ -219,6 +179,4 @@ extern int (*ioapic_renumber_irq)(int ioapic, int irq); | |||
219 | static inline void disable_ioapic_setup(void) { } | 179 | static inline void disable_ioapic_setup(void) { } |
220 | #endif | 180 | #endif |
221 | 181 | ||
222 | extern int assign_irq_vector(int irq); | ||
223 | |||
224 | #endif | 182 | #endif |
diff --git a/include/asm-i386/mach-default/irq_vectors_limits.h b/include/asm-i386/mach-default/irq_vectors_limits.h index b330026e6f7f..7f161e760be6 100644 --- a/include/asm-i386/mach-default/irq_vectors_limits.h +++ b/include/asm-i386/mach-default/irq_vectors_limits.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_IRQ_VECTORS_LIMITS_H | 1 | #ifndef _ASM_IRQ_VECTORS_LIMITS_H |
2 | #define _ASM_IRQ_VECTORS_LIMITS_H | 2 | #define _ASM_IRQ_VECTORS_LIMITS_H |
3 | 3 | ||
4 | #ifdef CONFIG_PCI_MSI | ||
5 | #define NR_IRQS FIRST_SYSTEM_VECTOR | ||
6 | #define NR_IRQ_VECTORS NR_IRQS | ||
7 | #else | ||
8 | #ifdef CONFIG_X86_IO_APIC | 4 | #ifdef CONFIG_X86_IO_APIC |
9 | #define NR_IRQS 224 | 5 | #define NR_IRQS 224 |
10 | # if (224 >= 32 * NR_CPUS) | 6 | # if (224 >= 32 * NR_CPUS) |
@@ -16,6 +12,5 @@ | |||
16 | #define NR_IRQS 16 | 12 | #define NR_IRQS 16 |
17 | #define NR_IRQ_VECTORS NR_IRQS | 13 | #define NR_IRQ_VECTORS NR_IRQS |
18 | #endif | 14 | #endif |
19 | #endif | ||
20 | 15 | ||
21 | #endif /* _ASM_IRQ_VECTORS_LIMITS_H */ | 16 | #endif /* _ASM_IRQ_VECTORS_LIMITS_H */ |