diff options
Diffstat (limited to 'arch/x86/include/asm/io_apic.h')
-rw-r--r-- | arch/x86/include/asm/io_apic.h | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index 9cb2edb87c2f..690d1cc9a877 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
@@ -63,17 +63,6 @@ union IO_APIC_reg_03 { | |||
63 | } __attribute__ ((packed)) bits; | 63 | } __attribute__ ((packed)) bits; |
64 | }; | 64 | }; |
65 | 65 | ||
66 | enum ioapic_irq_destination_types { | ||
67 | dest_Fixed = 0, | ||
68 | dest_LowestPrio = 1, | ||
69 | dest_SMI = 2, | ||
70 | dest__reserved_1 = 3, | ||
71 | dest_NMI = 4, | ||
72 | dest_INIT = 5, | ||
73 | dest__reserved_2 = 6, | ||
74 | dest_ExtINT = 7 | ||
75 | }; | ||
76 | |||
77 | struct IO_APIC_route_entry { | 66 | struct IO_APIC_route_entry { |
78 | __u32 vector : 8, | 67 | __u32 vector : 8, |
79 | delivery_mode : 3, /* 000: FIXED | 68 | delivery_mode : 3, /* 000: FIXED |
@@ -106,18 +95,22 @@ struct IR_IO_APIC_route_entry { | |||
106 | index : 15; | 95 | index : 15; |
107 | } __attribute__ ((packed)); | 96 | } __attribute__ ((packed)); |
108 | 97 | ||
98 | #define IOAPIC_AUTO -1 | ||
99 | #define IOAPIC_EDGE 0 | ||
100 | #define IOAPIC_LEVEL 1 | ||
101 | |||
109 | #ifdef CONFIG_X86_IO_APIC | 102 | #ifdef CONFIG_X86_IO_APIC |
110 | 103 | ||
111 | /* | 104 | /* |
112 | * # of IO-APICs and # of IRQ routing registers | 105 | * # of IO-APICs and # of IRQ routing registers |
113 | */ | 106 | */ |
114 | extern int nr_ioapics; | 107 | extern int nr_ioapics; |
115 | extern int nr_ioapic_registers[MAX_IO_APICS]; | ||
116 | 108 | ||
117 | #define MP_MAX_IOAPIC_PIN 127 | 109 | extern int mpc_ioapic_id(int ioapic); |
110 | extern unsigned int mpc_ioapic_addr(int ioapic); | ||
111 | extern struct mp_ioapic_gsi *mp_ioapic_gsi_routing(int ioapic); | ||
118 | 112 | ||
119 | /* I/O APIC entries */ | 113 | #define MP_MAX_IOAPIC_PIN 127 |
120 | extern struct mpc_ioapic mp_ioapics[MAX_IO_APICS]; | ||
121 | 114 | ||
122 | /* # of MP IRQ source entries */ | 115 | /* # of MP IRQ source entries */ |
123 | extern int mp_irq_entries; | 116 | extern int mp_irq_entries; |
@@ -150,33 +143,23 @@ extern int timer_through_8259; | |||
150 | #define io_apic_assign_pci_irqs \ | 143 | #define io_apic_assign_pci_irqs \ |
151 | (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs) | 144 | (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs) |
152 | 145 | ||
153 | extern u8 io_apic_unique_id(u8 id); | ||
154 | extern int io_apic_get_unique_id(int ioapic, int apic_id); | ||
155 | extern int io_apic_get_version(int ioapic); | ||
156 | extern int io_apic_get_redir_entries(int ioapic); | ||
157 | |||
158 | struct io_apic_irq_attr; | 146 | struct io_apic_irq_attr; |
159 | extern int io_apic_set_pci_routing(struct device *dev, int irq, | 147 | extern int io_apic_set_pci_routing(struct device *dev, int irq, |
160 | struct io_apic_irq_attr *irq_attr); | 148 | struct io_apic_irq_attr *irq_attr); |
161 | void setup_IO_APIC_irq_extra(u32 gsi); | 149 | void setup_IO_APIC_irq_extra(u32 gsi); |
162 | extern void ioapic_init_mappings(void); | 150 | extern void ioapic_and_gsi_init(void); |
163 | extern void ioapic_insert_resources(void); | 151 | extern void ioapic_insert_resources(void); |
164 | 152 | ||
165 | extern struct IO_APIC_route_entry **alloc_ioapic_entries(void); | 153 | int io_apic_setup_irq_pin_once(unsigned int irq, int node, struct io_apic_irq_attr *attr); |
166 | extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries); | ||
167 | extern int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); | ||
168 | extern void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); | ||
169 | extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); | ||
170 | 154 | ||
171 | extern void probe_nr_irqs_gsi(void); | 155 | extern int save_ioapic_entries(void); |
156 | extern void mask_ioapic_entries(void); | ||
157 | extern int restore_ioapic_entries(void); | ||
158 | |||
159 | extern int get_nr_irqs_gsi(void); | ||
172 | 160 | ||
173 | extern int setup_ioapic_entry(int apic, int irq, | ||
174 | struct IO_APIC_route_entry *entry, | ||
175 | unsigned int destination, int trigger, | ||
176 | int polarity, int vector, int pin); | ||
177 | extern void ioapic_write_entry(int apic, int pin, | ||
178 | struct IO_APIC_route_entry e); | ||
179 | extern void setup_ioapic_ids_from_mpc(void); | 161 | extern void setup_ioapic_ids_from_mpc(void); |
162 | extern void setup_ioapic_ids_from_mpc_nocheck(void); | ||
180 | 163 | ||
181 | struct mp_ioapic_gsi{ | 164 | struct mp_ioapic_gsi{ |
182 | u32 gsi_base; | 165 | u32 gsi_base; |
@@ -189,20 +172,37 @@ int mp_find_ioapic_pin(int ioapic, u32 gsi); | |||
189 | void __init mp_register_ioapic(int id, u32 address, u32 gsi_base); | 172 | void __init mp_register_ioapic(int id, u32 address, u32 gsi_base); |
190 | extern void __init pre_init_apic_IRQ0(void); | 173 | extern void __init pre_init_apic_IRQ0(void); |
191 | 174 | ||
175 | extern void mp_save_irq(struct mpc_intsrc *m); | ||
176 | |||
177 | extern void disable_ioapic_support(void); | ||
178 | |||
192 | #else /* !CONFIG_X86_IO_APIC */ | 179 | #else /* !CONFIG_X86_IO_APIC */ |
193 | 180 | ||
194 | #define io_apic_assign_pci_irqs 0 | 181 | #define io_apic_assign_pci_irqs 0 |
195 | #define setup_ioapic_ids_from_mpc x86_init_noop | 182 | #define setup_ioapic_ids_from_mpc x86_init_noop |
196 | static const int timer_through_8259 = 0; | 183 | static const int timer_through_8259 = 0; |
197 | static inline void ioapic_init_mappings(void) { } | 184 | static inline void ioapic_and_gsi_init(void) { } |
198 | static inline void ioapic_insert_resources(void) { } | 185 | static inline void ioapic_insert_resources(void) { } |
199 | static inline void probe_nr_irqs_gsi(void) { } | ||
200 | #define gsi_top (NR_IRQS_LEGACY) | 186 | #define gsi_top (NR_IRQS_LEGACY) |
201 | static inline int mp_find_ioapic(u32 gsi) { return 0; } | 187 | static inline int mp_find_ioapic(u32 gsi) { return 0; } |
202 | 188 | ||
203 | struct io_apic_irq_attr; | 189 | struct io_apic_irq_attr; |
204 | static inline int io_apic_set_pci_routing(struct device *dev, int irq, | 190 | static inline int io_apic_set_pci_routing(struct device *dev, int irq, |
205 | struct io_apic_irq_attr *irq_attr) { return 0; } | 191 | struct io_apic_irq_attr *irq_attr) { return 0; } |
192 | |||
193 | static inline int save_ioapic_entries(void) | ||
194 | { | ||
195 | return -ENOMEM; | ||
196 | } | ||
197 | |||
198 | static inline void mask_ioapic_entries(void) { } | ||
199 | static inline int restore_ioapic_entries(void) | ||
200 | { | ||
201 | return -ENOMEM; | ||
202 | } | ||
203 | |||
204 | static inline void mp_save_irq(struct mpc_intsrc *m) { }; | ||
205 | static inline void disable_ioapic_support(void) { } | ||
206 | #endif | 206 | #endif |
207 | 207 | ||
208 | #endif /* _ASM_X86_IO_APIC_H */ | 208 | #endif /* _ASM_X86_IO_APIC_H */ |