diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2006-10-04 05:16:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 10:55:28 -0400 |
commit | 04b9267b15206fc902a18de1f78de6c82ca47716 (patch) | |
tree | 02cd5fdc44f3ec188af41ec7188d8239badf24c3 /include | |
parent | 4b2fabb9ec9b3b1cf5cf848a678058fb20c4d552 (diff) |
[PATCH] genirq: x86_64 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
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')
-rw-r--r-- | include/asm-x86_64/hw_irq.h | 1 | ||||
-rw-r--r-- | include/asm-x86_64/io_apic.h | 40 | ||||
-rw-r--r-- | include/asm-x86_64/irq.h | 5 |
3 files changed, 0 insertions, 46 deletions
diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h index f5da94af9c41..1a8dc185a79f 100644 --- a/include/asm-x86_64/hw_irq.h +++ b/include/asm-x86_64/hw_irq.h | |||
@@ -75,7 +75,6 @@ | |||
75 | #ifndef __ASSEMBLY__ | 75 | #ifndef __ASSEMBLY__ |
76 | extern u8 irq_vector[NR_IRQ_VECTORS]; | 76 | extern u8 irq_vector[NR_IRQ_VECTORS]; |
77 | #define IO_APIC_VECTOR(irq) (irq_vector[irq]) | 77 | #define IO_APIC_VECTOR(irq) (irq_vector[irq]) |
78 | #define AUTO_ASSIGN -1 | ||
79 | 78 | ||
80 | /* | 79 | /* |
81 | * Various low-level irq details needed by irq.c, process.c, | 80 | * Various low-level irq details needed by irq.c, process.c, |
diff --git a/include/asm-x86_64/io_apic.h b/include/asm-x86_64/io_apic.h index 5d1b5c68e36e..df579ac29a1e 100644 --- a/include/asm-x86_64/io_apic.h +++ b/include/asm-x86_64/io_apic.h | |||
@@ -10,45 +10,7 @@ | |||
10 | * Copyright (C) 1997, 1998, 1999, 2000 Ingo Molnar | 10 | * Copyright (C) 1997, 1998, 1999, 2000 Ingo Molnar |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifdef CONFIG_PCI_MSI | ||
14 | static inline int use_pci_vector(void) {return 1;} | ||
15 | static inline void disable_edge_ioapic_vector(unsigned int vector) { } | ||
16 | static inline void mask_and_ack_level_ioapic_vector(unsigned int vector) { } | ||
17 | static inline void end_edge_ioapic_vector (unsigned int vector) { } | ||
18 | #define startup_level_ioapic startup_level_ioapic_vector | ||
19 | #define shutdown_level_ioapic mask_IO_APIC_vector | ||
20 | #define enable_level_ioapic unmask_IO_APIC_vector | ||
21 | #define disable_level_ioapic mask_IO_APIC_vector | ||
22 | #define mask_and_ack_level_ioapic mask_and_ack_level_ioapic_vector | ||
23 | #define end_level_ioapic end_level_ioapic_vector | ||
24 | #define set_ioapic_affinity set_ioapic_affinity_vector | ||
25 | |||
26 | #define startup_edge_ioapic startup_edge_ioapic_vector | ||
27 | #define shutdown_edge_ioapic disable_edge_ioapic_vector | ||
28 | #define enable_edge_ioapic unmask_IO_APIC_vector | ||
29 | #define disable_edge_ioapic disable_edge_ioapic_vector | ||
30 | #define ack_edge_ioapic ack_edge_ioapic_vector | ||
31 | #define end_edge_ioapic end_edge_ioapic_vector | ||
32 | #else | ||
33 | static inline int use_pci_vector(void) {return 0;} | 13 | static inline int use_pci_vector(void) {return 0;} |
34 | static inline void disable_edge_ioapic_irq(unsigned int irq) { } | ||
35 | static inline void mask_and_ack_level_ioapic_irq(unsigned int irq) { } | ||
36 | static inline void end_edge_ioapic_irq (unsigned int irq) { } | ||
37 | #define startup_level_ioapic startup_level_ioapic_irq | ||
38 | #define shutdown_level_ioapic mask_IO_APIC_irq | ||
39 | #define enable_level_ioapic unmask_IO_APIC_irq | ||
40 | #define disable_level_ioapic mask_IO_APIC_irq | ||
41 | #define mask_and_ack_level_ioapic mask_and_ack_level_ioapic_irq | ||
42 | #define end_level_ioapic end_level_ioapic_irq | ||
43 | #define set_ioapic_affinity set_ioapic_affinity_irq | ||
44 | |||
45 | #define startup_edge_ioapic startup_edge_ioapic_irq | ||
46 | #define shutdown_edge_ioapic disable_edge_ioapic_irq | ||
47 | #define enable_edge_ioapic unmask_IO_APIC_irq | ||
48 | #define disable_edge_ioapic disable_edge_ioapic_irq | ||
49 | #define ack_edge_ioapic ack_edge_ioapic_irq | ||
50 | #define end_edge_ioapic end_edge_ioapic_irq | ||
51 | #endif | ||
52 | 14 | ||
53 | #define APIC_MISMATCH_DEBUG | 15 | #define APIC_MISMATCH_DEBUG |
54 | 16 | ||
@@ -207,8 +169,6 @@ extern int timer_uses_ioapic_pin_0; | |||
207 | 169 | ||
208 | extern int sis_apic_bug; /* dummy */ | 170 | extern int sis_apic_bug; /* dummy */ |
209 | 171 | ||
210 | extern int assign_irq_vector(int irq); | ||
211 | |||
212 | void enable_NMI_through_LVT0 (void * dummy); | 172 | void enable_NMI_through_LVT0 (void * dummy); |
213 | 173 | ||
214 | extern spinlock_t i8259A_lock; | 174 | extern spinlock_t i8259A_lock; |
diff --git a/include/asm-x86_64/irq.h b/include/asm-x86_64/irq.h index 43469d8ab71a..b8f87287847f 100644 --- a/include/asm-x86_64/irq.h +++ b/include/asm-x86_64/irq.h | |||
@@ -31,13 +31,8 @@ | |||
31 | 31 | ||
32 | #define FIRST_SYSTEM_VECTOR 0xef /* duplicated in hw_irq.h */ | 32 | #define FIRST_SYSTEM_VECTOR 0xef /* duplicated in hw_irq.h */ |
33 | 33 | ||
34 | #ifdef CONFIG_PCI_MSI | ||
35 | #define NR_IRQS FIRST_SYSTEM_VECTOR | ||
36 | #define NR_IRQ_VECTORS NR_IRQS | ||
37 | #else | ||
38 | #define NR_IRQS 224 | 34 | #define NR_IRQS 224 |
39 | #define NR_IRQ_VECTORS (32 * NR_CPUS) | 35 | #define NR_IRQ_VECTORS (32 * NR_CPUS) |
40 | #endif | ||
41 | 36 | ||
42 | static __inline__ int irq_canonicalize(int irq) | 37 | static __inline__ int irq_canonicalize(int irq) |
43 | { | 38 | { |