Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86, irq: Move IOAPIC related declarations from hw_irq.h into io_apic.h

Clean up code by moving IOAPIC related declarations from hw_irq.h into
io_apic.h.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Aubrey <aubrey.li@linux.intel.com>
Cc: Ryan Desfosses <ryan@desfo.org>
Cc: Quentin Lambert <lambert.quentin@gmail.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: http://lkml.kernel.org/r/1414397531-28254-14-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

authored by

Jiang Liu and committed by
Thomas Gleixner
8643e28d c3468952

+34 -34
-33
arch/x86/include/asm/hw_irq.h
··· 159 159 static inline void unlock_vector_lock(void) {} 160 160 #endif /* CONFIG_X86_LOCAL_APIC */ 161 161 162 - /* IOAPIC */ 163 - #ifdef CONFIG_X86_IO_APIC 164 - struct io_apic_irq_attr { 165 - int ioapic; 166 - int ioapic_pin; 167 - int trigger; 168 - int polarity; 169 - }; 170 - 171 - static inline void set_io_apic_irq_attr(struct io_apic_irq_attr *irq_attr, 172 - int ioapic, int ioapic_pin, 173 - int trigger, int polarity) 174 - { 175 - irq_attr->ioapic = ioapic; 176 - irq_attr->ioapic_pin = ioapic_pin; 177 - irq_attr->trigger = trigger; 178 - irq_attr->polarity = polarity; 179 - } 180 - 181 - extern void setup_IO_APIC(void); 182 - extern void enable_IO_APIC(void); 183 - extern void disable_IO_APIC(void); 184 - extern void setup_ioapic_dest(void); 185 - extern int IO_APIC_get_PCI_irq_vector(int bus, int devfn, int pin); 186 - extern void print_IO_APICs(void); 187 - 188 - extern unsigned long io_apic_irqs; 189 - #define IO_APIC_IRQ(x) (((x) >= NR_IRQS_LEGACY) || ((1 << (x)) & io_apic_irqs)) 190 - #else /* CONFIG_X86_IO_APIC */ 191 - #define IO_APIC_IRQ(x) 0 192 - static inline void print_IO_APICs(void) {} 193 - #endif /* CONFIG_X86_IO_APIC */ 194 - 195 162 /* Statistics */ 196 163 extern atomic_t irq_err_count; 197 164 extern atomic_t irq_mis_count;
+19 -1
arch/x86/include/asm/io_apic.h
··· 132 132 /* -1 if "noapic" boot option passed */ 133 133 extern int noioapicreroute; 134 134 135 + extern unsigned long io_apic_irqs; 136 + 137 + #define IO_APIC_IRQ(x) (((x) >= NR_IRQS_LEGACY) || ((1 << (x)) & io_apic_irqs)) 138 + 135 139 /* 136 140 * If we use the IO-APIC for IRQ routing, disable automatic 137 141 * assignment of PCI IRQ's. ··· 143 139 #define io_apic_assign_pci_irqs \ 144 140 (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs) 145 141 146 - struct io_apic_irq_attr; 147 142 struct irq_cfg; 148 143 extern void ioapic_insert_resources(void); 149 144 ··· 159 156 160 157 extern void setup_ioapic_ids_from_mpc(void); 161 158 extern void setup_ioapic_ids_from_mpc_nocheck(void); 159 + 160 + struct io_apic_irq_attr { 161 + int ioapic; 162 + int ioapic_pin; 163 + int trigger; 164 + int polarity; 165 + }; 162 166 163 167 enum ioapic_domain_type { 164 168 IOAPIC_DOMAIN_INVALID, ··· 236 226 237 227 extern void io_apic_eoi(unsigned int apic, unsigned int vector); 238 228 229 + extern void setup_IO_APIC(void); 230 + extern void enable_IO_APIC(void); 231 + extern void disable_IO_APIC(void); 232 + extern void setup_ioapic_dest(void); 233 + extern int IO_APIC_get_PCI_irq_vector(int bus, int devfn, int pin); 234 + extern void print_IO_APICs(void); 239 235 #else /* !CONFIG_X86_IO_APIC */ 240 236 237 + #define IO_APIC_IRQ(x) 0 241 238 #define io_apic_assign_pci_irqs 0 242 239 #define setup_ioapic_ids_from_mpc x86_init_noop 243 240 static inline void ioapic_insert_resources(void) { } 241 + static inline void print_IO_APICs(void) {} 244 242 #define gsi_top (NR_IRQS_LEGACY) 245 243 static inline int mp_find_ioapic(u32 gsi) { return 0; } 246 244 static inline u32 mp_pin_to_gsi(int ioapic, int pin) { return UINT_MAX; }
+10
arch/x86/kernel/apic/io_apic.c
··· 3023 3023 return 0; 3024 3024 } 3025 3025 3026 + static inline void set_io_apic_irq_attr(struct io_apic_irq_attr *irq_attr, 3027 + int ioapic, int ioapic_pin, 3028 + int trigger, int polarity) 3029 + { 3030 + irq_attr->ioapic = ioapic; 3031 + irq_attr->ioapic_pin = ioapic_pin; 3032 + irq_attr->trigger = trigger; 3033 + irq_attr->polarity = polarity; 3034 + } 3035 + 3026 3036 int mp_irqdomain_map(struct irq_domain *domain, unsigned int virq, 3027 3037 irq_hw_number_t hwirq) 3028 3038 {
+1
arch/x86/kernel/crash.c
··· 28 28 #include <asm/nmi.h> 29 29 #include <asm/hw_irq.h> 30 30 #include <asm/apic.h> 31 + #include <asm/io_apic.h> 31 32 #include <asm/hpet.h> 32 33 #include <linux/kdebug.h> 33 34 #include <asm/cpu.h>
+1
arch/x86/kernel/machine_kexec_32.c
··· 20 20 #include <asm/tlbflush.h> 21 21 #include <asm/mmu_context.h> 22 22 #include <asm/apic.h> 23 + #include <asm/io_apic.h> 23 24 #include <asm/cpufeature.h> 24 25 #include <asm/desc.h> 25 26 #include <asm/cacheflush.h>
+1
arch/x86/kernel/machine_kexec_64.c
··· 22 22 #include <asm/pgtable.h> 23 23 #include <asm/tlbflush.h> 24 24 #include <asm/mmu_context.h> 25 + #include <asm/io_apic.h> 25 26 #include <asm/debugreg.h> 26 27 #include <asm/kexec-bzimage64.h> 27 28
+1
arch/x86/kernel/reboot.c
··· 12 12 #include <acpi/reboot.h> 13 13 #include <asm/io.h> 14 14 #include <asm/apic.h> 15 + #include <asm/io_apic.h> 15 16 #include <asm/desc.h> 16 17 #include <asm/hpet.h> 17 18 #include <asm/pgtable.h>
+1
drivers/pci/hotplug/ibmphp_core.c
··· 36 36 #include <linux/wait.h> 37 37 #include "../pci.h" 38 38 #include <asm/pci_x86.h> /* for struct irq_routing_table */ 39 + #include <asm/io_apic.h> 39 40 #include "ibmphp.h" 40 41 41 42 #define attn_on(sl) ibmphp_hpc_writeslot (sl, HPC_SLOT_ATTNON)