aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/io_apic.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/io_apic.h')
-rw-r--r--arch/x86/include/asm/io_apic.h70
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
66enum 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
77struct IO_APIC_route_entry { 66struct 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 */
114extern int nr_ioapics; 107extern int nr_ioapics;
115extern int nr_ioapic_registers[MAX_IO_APICS];
116 108
117#define MP_MAX_IOAPIC_PIN 127 109extern int mpc_ioapic_id(int ioapic);
110extern unsigned int mpc_ioapic_addr(int ioapic);
111extern struct mp_ioapic_gsi *mp_ioapic_gsi_routing(int ioapic);
118 112
119/* I/O APIC entries */ 113#define MP_MAX_IOAPIC_PIN 127
120extern struct mpc_ioapic mp_ioapics[MAX_IO_APICS];
121 114
122/* # of MP IRQ source entries */ 115/* # of MP IRQ source entries */
123extern int mp_irq_entries; 116extern 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
153extern u8 io_apic_unique_id(u8 id);
154extern int io_apic_get_unique_id(int ioapic, int apic_id);
155extern int io_apic_get_version(int ioapic);
156extern int io_apic_get_redir_entries(int ioapic);
157
158struct io_apic_irq_attr; 146struct io_apic_irq_attr;
159extern int io_apic_set_pci_routing(struct device *dev, int irq, 147extern 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);
161void setup_IO_APIC_irq_extra(u32 gsi); 149void setup_IO_APIC_irq_extra(u32 gsi);
162extern void ioapic_init_mappings(void); 150extern void ioapic_and_gsi_init(void);
163extern void ioapic_insert_resources(void); 151extern void ioapic_insert_resources(void);
164 152
165extern struct IO_APIC_route_entry **alloc_ioapic_entries(void); 153int io_apic_setup_irq_pin_once(unsigned int irq, int node, struct io_apic_irq_attr *attr);
166extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries);
167extern int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
168extern void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
169extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
170 154
171extern void probe_nr_irqs_gsi(void); 155extern int save_ioapic_entries(void);
156extern void mask_ioapic_entries(void);
157extern int restore_ioapic_entries(void);
158
159extern int get_nr_irqs_gsi(void);
172 160
173extern 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);
177extern void ioapic_write_entry(int apic, int pin,
178 struct IO_APIC_route_entry e);
179extern void setup_ioapic_ids_from_mpc(void); 161extern void setup_ioapic_ids_from_mpc(void);
162extern void setup_ioapic_ids_from_mpc_nocheck(void);
180 163
181struct mp_ioapic_gsi{ 164struct mp_ioapic_gsi{
182 u32 gsi_base; 165 u32 gsi_base;
@@ -189,20 +172,37 @@ int mp_find_ioapic_pin(int ioapic, u32 gsi);
189void __init mp_register_ioapic(int id, u32 address, u32 gsi_base); 172void __init mp_register_ioapic(int id, u32 address, u32 gsi_base);
190extern void __init pre_init_apic_IRQ0(void); 173extern void __init pre_init_apic_IRQ0(void);
191 174
175extern void mp_save_irq(struct mpc_intsrc *m);
176
177extern 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
196static const int timer_through_8259 = 0; 183static const int timer_through_8259 = 0;
197static inline void ioapic_init_mappings(void) { } 184static inline void ioapic_and_gsi_init(void) { }
198static inline void ioapic_insert_resources(void) { } 185static inline void ioapic_insert_resources(void) { }
199static inline void probe_nr_irqs_gsi(void) { }
200#define gsi_top (NR_IRQS_LEGACY) 186#define gsi_top (NR_IRQS_LEGACY)
201static inline int mp_find_ioapic(u32 gsi) { return 0; } 187static inline int mp_find_ioapic(u32 gsi) { return 0; }
202 188
203struct io_apic_irq_attr; 189struct io_apic_irq_attr;
204static inline int io_apic_set_pci_routing(struct device *dev, int irq, 190static 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
193static inline int save_ioapic_entries(void)
194{
195 return -ENOMEM;
196}
197
198static inline void mask_ioapic_entries(void) { }
199static inline int restore_ioapic_entries(void)
200{
201 return -ENOMEM;
202}
203
204static inline void mp_save_irq(struct mpc_intsrc *m) { };
205static 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 */