diff options
Diffstat (limited to 'arch/x86/include/asm')
| -rw-r--r-- | arch/x86/include/asm/apic.h | 35 | ||||
| -rw-r--r-- | arch/x86/include/asm/hw_irq.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/io_apic.h | 6 | ||||
| -rw-r--r-- | arch/x86/include/asm/mpspec.h | 2 |
4 files changed, 37 insertions, 8 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index b03711d7990b..f4835a1be360 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
| @@ -139,12 +139,35 @@ struct apic_ops { | |||
| 139 | 139 | ||
| 140 | extern struct apic_ops *apic_ops; | 140 | extern struct apic_ops *apic_ops; |
| 141 | 141 | ||
| 142 | #define apic_read (apic_ops->read) | 142 | static inline u32 apic_read(u32 reg) |
| 143 | #define apic_write (apic_ops->write) | 143 | { |
| 144 | #define apic_icr_read (apic_ops->icr_read) | 144 | return apic_ops->read(reg); |
| 145 | #define apic_icr_write (apic_ops->icr_write) | 145 | } |
| 146 | #define apic_wait_icr_idle (apic_ops->wait_icr_idle) | 146 | |
| 147 | #define safe_apic_wait_icr_idle (apic_ops->safe_wait_icr_idle) | 147 | static inline void apic_write(u32 reg, u32 val) |
| 148 | { | ||
| 149 | apic_ops->write(reg, val); | ||
| 150 | } | ||
| 151 | |||
| 152 | static inline u64 apic_icr_read(void) | ||
| 153 | { | ||
| 154 | return apic_ops->icr_read(); | ||
| 155 | } | ||
| 156 | |||
| 157 | static inline void apic_icr_write(u32 low, u32 high) | ||
| 158 | { | ||
| 159 | apic_ops->icr_write(low, high); | ||
| 160 | } | ||
| 161 | |||
| 162 | static inline void apic_wait_icr_idle(void) | ||
| 163 | { | ||
| 164 | apic_ops->wait_icr_idle(); | ||
| 165 | } | ||
| 166 | |||
| 167 | static inline u32 safe_apic_wait_icr_idle(void) | ||
| 168 | { | ||
| 169 | return apic_ops->safe_wait_icr_idle(); | ||
| 170 | } | ||
| 148 | 171 | ||
| 149 | extern int get_physical_broadcast(void); | 172 | extern int get_physical_broadcast(void); |
| 150 | 173 | ||
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h index 1b82781b898d..370e1c83bb49 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h | |||
| @@ -65,9 +65,7 @@ extern void disable_IO_APIC(void); | |||
| 65 | extern int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn); | 65 | extern int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn); |
| 66 | extern void setup_ioapic_dest(void); | 66 | extern void setup_ioapic_dest(void); |
| 67 | 67 | ||
| 68 | #ifdef CONFIG_X86_64 | ||
| 69 | extern void enable_IO_APIC(void); | 68 | extern void enable_IO_APIC(void); |
| 70 | #endif | ||
| 71 | 69 | ||
| 72 | /* Statistics */ | 70 | /* Statistics */ |
| 73 | extern atomic_t irq_err_count; | 71 | extern atomic_t irq_err_count; |
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index 309d0e23193a..59cb4a1317b7 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
| @@ -169,6 +169,12 @@ extern void reinit_intr_remapped_IO_APIC(int); | |||
| 169 | 169 | ||
| 170 | extern void probe_nr_irqs_gsi(void); | 170 | extern void probe_nr_irqs_gsi(void); |
| 171 | 171 | ||
| 172 | extern int setup_ioapic_entry(int apic, int irq, | ||
| 173 | struct IO_APIC_route_entry *entry, | ||
| 174 | unsigned int destination, int trigger, | ||
| 175 | int polarity, int vector); | ||
| 176 | extern void ioapic_write_entry(int apic, int pin, | ||
| 177 | struct IO_APIC_route_entry e); | ||
| 172 | #else /* !CONFIG_X86_IO_APIC */ | 178 | #else /* !CONFIG_X86_IO_APIC */ |
| 173 | #define io_apic_assign_pci_irqs 0 | 179 | #define io_apic_assign_pci_irqs 0 |
| 174 | static const int timer_through_8259 = 0; | 180 | static const int timer_through_8259 = 0; |
diff --git a/arch/x86/include/asm/mpspec.h b/arch/x86/include/asm/mpspec.h index 8c5620147c40..5916c8df09d9 100644 --- a/arch/x86/include/asm/mpspec.h +++ b/arch/x86/include/asm/mpspec.h | |||
| @@ -77,6 +77,8 @@ extern int acpi_probe_gsi(void); | |||
| 77 | #ifdef CONFIG_X86_IO_APIC | 77 | #ifdef CONFIG_X86_IO_APIC |
| 78 | extern int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, | 78 | extern int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, |
| 79 | u32 gsi, int triggering, int polarity); | 79 | u32 gsi, int triggering, int polarity); |
| 80 | extern int mp_find_ioapic(int gsi); | ||
| 81 | extern int mp_find_ioapic_pin(int ioapic, int gsi); | ||
| 80 | #else | 82 | #else |
| 81 | static inline int | 83 | static inline int |
| 82 | mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, | 84 | mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, |
