]> xenbits.xensource.com Git - xen.git/commitdiff
x86: Do not include apic.h/io_apic.h from asm/smp.h
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 11 Jun 2010 16:47:49 +0000 (17:47 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 11 Jun 2010 16:47:49 +0000 (17:47 +0100)
...and fix up the ensuing fall-out of implicit dependencies

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
44 files changed:
xen/arch/x86/acpi/cpu_idle.c
xen/arch/x86/acpi/power.c
xen/arch/x86/cpu/amd.c
xen/arch/x86/cpu/mcheck/mce_intel.c
xen/arch/x86/crash.c
xen/arch/x86/domain_build.c
xen/arch/x86/genapic/bigsmp.c
xen/arch/x86/genapic/default.c
xen/arch/x86/genapic/summit.c
xen/arch/x86/genapic/x2apic.c
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/svm/vpmu.c
xen/arch/x86/hvm/vioapic.c
xen/arch/x86/hvm/viridian.c
xen/arch/x86/hvm/vlapic.c
xen/arch/x86/hvm/vmsi.c
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/hvm/vmx/vpmu_core2.c
xen/arch/x86/hvm/vpt.c
xen/arch/x86/mm.c
xen/arch/x86/numa.c
xen/arch/x86/platform_hypercall.c
xen/arch/x86/shutdown.c
xen/arch/x86/smp.c
xen/arch/x86/traps.c
xen/arch/x86/x86_32/domain_page.c
xen/arch/x86/x86_64/mmconfig-shared.c
xen/arch/x86/x86_64/mmconfig_64.c
xen/common/shutdown.c
xen/drivers/passthrough/amd/iommu_acpi.c
xen/drivers/passthrough/amd/iommu_intr.c
xen/drivers/passthrough/pci.c
xen/drivers/passthrough/vtd/intremap.c
xen/drivers/passthrough/vtd/utils.c
xen/drivers/passthrough/vtd/x86/vtd.c
xen/include/asm-x86/apic.h
xen/include/asm-x86/bzimage.h
xen/include/asm-x86/config.h
xen/include/asm-x86/hvm/vlapic.h
xen/include/asm-x86/mach-generic/mach_apic.h
xen/include/asm-x86/numa.h
xen/include/asm-x86/smp.h
xen/include/xen/irq.h

index 3b52c5469bd85ee079b384ee202dee0dd78aa426..32dc4250ba7723f0caca8c5a16cf0fc638818a80 100644 (file)
@@ -51,6 +51,7 @@
 #include <public/platform.h>
 #include <public/sysctl.h>
 #include <acpi/cpufreq/cpufreq.h>
+#include <asm/apic.h>
 
 /*#define DEBUG_PM_CX*/
 
index 90a8fff4702f5ff113ee6eadd09f65b1d0510712..f429d9914e8c6cdd27b9c984c64699b217d04cb7 100644 (file)
@@ -28,7 +28,8 @@
 #include <xen/cpu.h>
 #include <public/platform.h>
 #include <asm/tboot.h>
-
+#include <asm/apic.h>
+#include <asm/io_apic.h>
 #include <acpi/cpufreq/cpufreq.h>
 
 uint32_t system_reset_counter = 1;
index 24e6c2da26d0301bb349807c07a6d55b5c15fea0..2d4192be4f606d42fb9cc6b3a5c525a323f42482 100644 (file)
@@ -9,6 +9,7 @@
 #include <asm/processor.h>
 #include <asm/hvm/support.h>
 #include <asm/setup.h> /* amd_init_cpu */
+#include <asm/acpi.h>
 
 #include "cpu.h"
 #include "amd.h"
index 573838c4d4055937f60472f87d3b323e195c4355..e18e7d23b0d54b4765cc812127b2cc870e69ff1d 100644 (file)
@@ -13,6 +13,7 @@
 #include <asm/msr.h>
 #include <asm/p2m.h>
 #include <asm/mce.h>
+#include <asm/apic.h>
 #include "mce.h"
 #include "x86_mca.h"
 
index 1c90b6eca2dc22e51c455848062f06997d27ee1e..a95154771e0f10d3b5e910c9edb798a9d0ab640d 100644 (file)
@@ -26,6 +26,8 @@
 #include <asm/shared.h>
 #include <asm/hvm/support.h>
 #include <asm/hpet.h>
+#include <asm/apic.h>
+#include <asm/io_apic.h>
 
 static atomic_t waiting_for_crash_ipi;
 static unsigned int crashing_cpu;
index 8dba898281be1746c36c3fe16c3517f2f10ae78d..166509f2e20bd87c3327929c87413bdcb45c41af 100644 (file)
@@ -32,6 +32,7 @@
 #include <asm/e820.h>
 #include <asm/acpi.h>
 #include <asm/bzimage.h> /* for bzimage_parse */
+#include <asm/io_apic.h>
 
 #include <public/version.h>
 
index 1be2e9713945309d550326cd2a08521eccc10fd5..95861691cf6bcc91cbddeab81f844d3f87d1abe7 100644 (file)
@@ -10,6 +10,7 @@
 #include <xen/init.h>
 #include <xen/dmi.h>
 #include <asm/mach-default/mach_mpparse.h>
+#include <asm/io_apic.h>
 
 static int dmi_bigsmp; /* can be set by dmi scanners */
 
index 5665ded0c0b4deac0cb9bcfde32a359f99bf33fd..dbab88fab49be0da47fa9ee89333e8e2921c1330 100644 (file)
@@ -12,6 +12,7 @@
 #include <xen/string.h>
 #include <xen/smp.h>
 #include <xen/init.h>
+#include <asm/io_apic.h>
 #include <asm/mach-default/mach_mpparse.h>
 
 /* should be called last. */
index 910f2e0da50b79524880b1f2fce9a58d5fd53926..c84f14eddd0372ac553584234ceb217650ecd0ae 100644 (file)
@@ -13,6 +13,7 @@
 #include <xen/smp.h>
 #include <xen/init.h>
 #include <asm/mach-summit/mach_mpparse.h>
+#include <asm/io_apic.h>
 
 static __init int probe_summit(void)
 { 
index d84e66fba630552a7faeb8caa62443e8a1511b1f..bea9cb0ade3fc32379fd8c1d616dfdcfb34fc048 100644 (file)
  * Place - Suite 330, Boston, MA 02111-1307 USA.
  */
 
+#include <xen/config.h>
+#include <xen/init.h>
 #include <xen/cpumask.h>
 #include <asm/apicdef.h>
 #include <asm/genapic.h>
+#include <asm/apic.h>
+#include <asm/io_apic.h>
 #include <xen/smp.h>
 #include <asm/mach-default/mach_mpparse.h>
 
index d0c878d6bb715bedeafcee995ea40e5677fa8f8c..1eef66d5e7d1403ec65cfb5e9ff50b5f8d742483 100644 (file)
@@ -55,6 +55,7 @@
 #include <asm/hvm/cacheattr.h>
 #include <asm/hvm/trace.h>
 #include <asm/mtrr.h>
+#include <asm/apic.h>
 #include <public/sched.h>
 #include <public/hvm/ioreq.h>
 #include <public/version.h>
index c29ff34ea5e0880b88b6bed17b2113667c65e43c..01c94c52f13c9e625c51c1381d35bf3abd03cafe 100644 (file)
@@ -53,6 +53,7 @@
 #include <asm/hvm/vpt.h>
 #include <asm/hvm/trace.h>
 #include <asm/hap.h>
+#include <asm/apic.h>
 #include <asm/debugger.h>       
 
 u32 svm_feature_flags;
index 97163e9f2079ee34d07c86c0045c24ac85b2df77..be257834d42b7f10f9477d678c891668a97a0fef 100644 (file)
@@ -27,6 +27,7 @@
 #include <asm/system.h>
 #include <asm/regs.h>
 #include <asm/types.h>
+#include <asm/apic.h>
 #include <asm/msr.h>
 #include <asm/msr-index.h>
 #include <asm/hvm/support.h>
index 9c0033a23e3ca347c27c6c391d6a0ae6300a12e6..6e6b94ea7bb1b75178cbd92805cffc6f82ea2c45 100644 (file)
@@ -39,6 +39,7 @@
 #include <asm/hvm/support.h>
 #include <asm/current.h>
 #include <asm/event.h>
+#include <asm/io_apic.h>
 
 /* HACK: Route IRQ0 only to VCPU0 to prevent time jumps. */
 #define IRQ0_SPECIAL_ROUTING 1
index ef48dfa3e96ae4456a818c1ae983813981e9636a..2e1b4ecc08f7decf089ea18826a9fca36979a39a 100644 (file)
@@ -11,6 +11,7 @@
 #include <xen/domain_page.h>
 #include <asm/paging.h>
 #include <asm/p2m.h>
+#include <asm/apic.h>
 #include <asm/hvm/support.h>
 #include <public/sched.h>
 #include <public/hvm/hvm_op.h>
index ad0e0ceca7beef9a98b393793b664ef2d8c105d7..da513de0521bf459ba78609bcc9be130ecaf3fcb 100644 (file)
@@ -31,6 +31,8 @@
 #include <xen/numa.h>
 #include <asm/current.h>
 #include <asm/page.h>
+#include <asm/apic.h>
+#include <asm/io_apic.h>
 #include <asm/hvm/hvm.h>
 #include <asm/hvm/io.h>
 #include <asm/hvm/support.h>
@@ -803,6 +805,12 @@ int vlapic_ack_pending_irq(struct vcpu *v, int vector)
     return 1;
 }
 
+bool_t is_vlapic_lvtpc_enabled(struct vlapic *vlapic)
+{
+    return (vlapic_enabled(vlapic) &&
+            !(vlapic_get_reg(vlapic, APIC_LVTPC) & APIC_LVT_MASKED));
+}
+
 /* Reset the VLPAIC back to its power-on/reset state. */
 void vlapic_reset(struct vlapic *vlapic)
 {
index 31ee9b7cfe208f6caf01a3d4eca4dfb5dc4428ae..ccc629e180b4d9a5e6bb65b8439167bb27ecbc6d 100644 (file)
@@ -39,6 +39,7 @@
 #include <asm/hvm/support.h>
 #include <asm/current.h>
 #include <asm/event.h>
+#include <asm/io_apic.h>
 
 static void vmsi_inj_irq(
     struct domain *d,
index f2c143afa1b2c3a8d298b0ba8d4c3866b67d5464..c4093154a4fd1059b646a707beca87e2f7ad5a16 100644 (file)
@@ -53,6 +53,7 @@
 #include <asm/hvm/trace.h>
 #include <asm/xenoprof.h>
 #include <asm/debugger.h>
+#include <asm/apic.h>
 
 enum handler_return { HNDL_done, HNDL_unhandled, HNDL_exception_raised };
 
index 279d9b002eede3ed3cc044b6652556ebaf94d0ee..4646600ca4191875681466b26e38d21ec3999f86 100644 (file)
@@ -24,6 +24,7 @@
 #include <asm/system.h>
 #include <asm/regs.h>
 #include <asm/types.h>
+#include <asm/apic.h>
 #include <asm/msr.h>
 #include <asm/msr-index.h>
 #include <asm/hvm/support.h>
index 096d083f74759a9d9e6d1336c24bbe03c597a95b..7056769ea3d5b242210f6beb135f0a578adda9b3 100644 (file)
@@ -21,6 +21,7 @@
 #include <asm/hvm/support.h>
 #include <asm/hvm/vpt.h>
 #include <asm/event.h>
+#include <asm/apic.h>
 
 #define mode_is(d, name) \
     ((d)->arch.hvm_domain.params[HVM_PARAM_TIMER_MODE] == HVMPTM_##name)
index f9ab808da44cb23c5ea8339266138eb54c67aeb7..6256e0d02722d2abe12c472f111a56f61a125a85 100644 (file)
 #include <xsm/xsm.h>
 #include <xen/trace.h>
 #include <asm/setup.h>
+#include <asm/fixmap.h>
 #include <asm/mem_sharing.h>
 
 /*
index 75d4be1d202035f64ef71bfb9aa1eb4bedc7cb5a..466ff76db6c5b9d434ecb403d76023240d30d97a 100644 (file)
@@ -51,6 +51,11 @@ int numa_off __devinitdata = 0;
 
 int acpi_numa __devinitdata;
 
+int srat_disabled(void)
+{
+       return numa_off || acpi_numa < 0;
+}
+
 /*
  * Given a shift value, try to populate memnodemap[]
  * Returns :
index 2ab7617a86194c4b7cc4dd97ad41dfabafb56a5b..5be2970d3643c21845c52351af912ec4b843e6aa 100644 (file)
@@ -25,6 +25,7 @@
 #include <acpi/cpufreq/processor_perf.h>
 #include <asm/edd.h>
 #include <asm/mtrr.h>
+#include <asm/io_apic.h>
 #include "cpu/mtrr/mtrr.h"
 #include <xsm/xsm.h>
 
index 6466df4ee893fb9dee8d33de744eedc9fcff7ed0..dcaa79346b3032e015ba89ed2d01c81f687c18a9 100644 (file)
@@ -23,6 +23,7 @@
 #include <asm/processor.h>
 #include <asm/mpspec.h>
 #include <asm/tboot.h>
+#include <asm/apic.h>
 
 enum reboot_type {
         BOOT_TRIPLE = 't',
index 650835ff1f76685fa2fd37d07da79551df92bf60..239dde6fb714a3123379c8e3568f5d43a499adbc 100644 (file)
 #include <asm/hvm/support.h>
 #include <mach_apic.h>
 
+int hard_smp_processor_id(void)
+{
+    return get_apic_id();
+}
+
+int logical_smp_processor_id(void)
+{
+    return get_logical_apic_id();
+}
+
 /*
  * send_IPI_mask(cpumask, vector): sends @vector IPI to CPUs in @cpumask,
  * excluding the local CPU. @cpumask may be empty.
index e30b1528d72b9998599de0c4710a4c72f05a393b..1d833beff679e48fabd7b42356ead7d1eb77fd96 100644 (file)
@@ -66,6 +66,7 @@
 #include <asm/hvm/vpt.h>
 #include <asm/hypercall.h>
 #include <asm/mce.h>
+#include <asm/apic.h>
 #include <public/arch-x86/cpuid.h>
 
 /*
index c381a0e98f5f27ef6b32265b62bc57a5b2c7206a..6d09a879b3f3c6b8f4f38bd55499961eb143dd41 100644 (file)
@@ -15,6 +15,7 @@
 #include <asm/flushtlb.h>
 #include <asm/hardirq.h>
 #include <asm/hvm/support.h>
+#include <asm/fixmap.h>
 
 static inline struct vcpu *mapcache_current_vcpu(void)
 {
index 905a62bf16a547869123abfa7c3248ccdee826c6..97e58e72317ec7e27bfcfe0ea472e530c5309a97 100644 (file)
@@ -12,6 +12,8 @@
  * Author: Allen Kay <allen.m.kay@intel.com> -  adapted to xen from Linux
  */
 
+#include <xen/config.h>
+#include <xen/init.h>
 #include <xen/mm.h>
 #include <xen/acpi.h>
 #include <xen/xmalloc.h>
index 78a7da732c197613c82ce73518ea096f568d2319..fc5cca847eba837761e56b3ac468ba80f13facde 100644 (file)
@@ -7,6 +7,8 @@
  * copied from Linux
  */
 
+#include <xen/config.h>
+#include <xen/init.h>
 #include <xen/mm.h>
 #include <xen/acpi.h>
 #include <xen/xmalloc.h>
index 65d59b5ca000f323075c452c46c9f1f086409b32..6e0b4123080a72ed8acc7b5aa6236c02172fd46b 100644 (file)
@@ -6,6 +6,7 @@
 #include <xen/delay.h>
 #include <xen/shutdown.h>
 #include <xen/console.h>
+#include <xen/kexec.h>
 #include <asm/debugger.h>
 #include <public/sched.h>
 
index 7905e12f07ccd09ef7e943ad9b24cd3b55dc06e2..b2471aaf67b60f23f20f0412474b6412046716cf 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <xen/config.h>
 #include <xen/errno.h>
+#include <asm/apicdef.h>
 #include <asm/amd-iommu.h>
 #include <asm/hvm/svm/amd-iommu-proto.h>
 #include <asm/hvm/svm/amd-iommu-acpi.h>
index 8c284d3c98f993ee79bd241b3f50f9988f3c1b3b..fb36e5af0fe7aaf1a1f0ca9bd5927c3dde630b50 100644 (file)
@@ -21,6 +21,7 @@
 #include <xen/hvm/iommu.h>
 #include <asm/amd-iommu.h>
 #include <asm/hvm/svm/amd-iommu-proto.h>
+#include <asm/io_apic.h>
 
 #define INTREMAP_TABLE_ORDER    1
 #define INTREMAP_LENGTH 0xB
index 23dc95ca4e62cdfd85570dc73207c750cd53a292..bd8da7fe1a12a9b255bc28f8384f5a2ed85e0df6 100644 (file)
@@ -26,6 +26,9 @@
 #include <xen/delay.h>
 #include <xen/keyhandler.h>
 #include <xen/tasklet.h>
+#ifdef CONFIG_X86
+#include <asm/msi.h>
+#endif
 
 LIST_HEAD(alldevs_list);
 spinlock_t pcidevs_lock = SPIN_LOCK_UNLOCKED;
index 71b423011bc06d78e390cb313d31e6cc70b90392..03dff08e2905976cdb79500fd8353477f2c26322 100644 (file)
@@ -35,6 +35,8 @@
 #define nr_ioapics              iosapic_get_nr_iosapics()
 #define nr_ioapic_registers(i)  iosapic_get_nr_pins(i)
 #else
+#include <asm/apic.h>
+#include <asm/io_apic.h>
 #define nr_ioapic_registers(i)  nr_ioapic_registers[i]
 #endif
 
index 8cc89f3c903a6682e0d851b4061b0ca97d3264c3..fc7d6c2cecf7f01802e38f8fd070d518bf654381 100644 (file)
 #include "vtd.h"
 #include "extern.h"
 
+#if defined(CONFIG_X86)
+#include <asm/io_apic.h>
+#endif
+
 int is_usb_device(u8 bus, u8 devfn)
 {
     u16 class = pci_conf_read16(bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
index bdd980c26472485b07bd17c5b2e737b2fdf53857..2c11dc775fe4cf4ec80163d77e8c5ff88451c703 100644 (file)
@@ -24,6 +24,7 @@
 #include <asm/paging.h>
 #include <xen/iommu.h>
 #include <xen/numa.h>
+#include <asm/fixmap.h>
 #include "../iommu.h"
 #include "../dmar.h"
 #include "../vtd.h"
index 15ba62beb378f03346ec87fa5bdf0711edb55a22..b02e7b38b9c7d5984a263ab1dfe87ca2d1e732cf 100644 (file)
@@ -219,9 +219,6 @@ extern int lapic_resume(void);
 extern int check_nmi_watchdog (void);
 extern void enable_NMI_through_LVT0 (void * dummy);
 
-extern void watchdog_disable(void);
-extern void watchdog_enable(void);
-
 extern unsigned int nmi_watchdog;
 #define NMI_NONE       0
 #define NMI_IO_APIC    1
index 31dacdf1ece2c37d6c4bb4cace5c125e87fce39f..410ecd4cfe005b0cd0b647b71471220205fc19da 100644 (file)
@@ -2,6 +2,7 @@
 #define __X86_BZIMAGE_H__
 
 #include <xen/config.h>
+#include <xen/init.h>
 
 int __init bzimage_headroom(char *image_start, unsigned long image_length);
 
index 4235c3524fbd5dd293271d844d2d1bb119eb21ef..58cbe490e6b9be2d7bbc125183d729d0de4b3b8d 100644 (file)
@@ -394,4 +394,9 @@ extern unsigned long xenheap_phys_end;
 
 #define ARCH_CRASH_SAVE_VMCOREINFO
 
+#ifndef __ASSEMBLY__
+extern void watchdog_disable(void);
+extern void watchdog_enable(void);
+#endif
+
 #endif /* __X86_CONFIG_H__ */
index 9d0b0bdc57e15ed7d9135dcc7fb5669bb1f18784..eda970f7808143b3571196670a0ff41edabe3642 100644 (file)
@@ -74,11 +74,7 @@ static inline void vlapic_set_reg(
     *((uint32_t *)(&vlapic->regs->data[reg])) = val;
 }
 
-static inline int is_vlapic_lvtpc_enabled(struct vlapic *vlapic)
-{
-    return vlapic_enabled(vlapic) &&
-           !(vlapic_get_reg(vlapic, APIC_LVTPC) & APIC_LVT_MASKED);
-}
+bool_t is_vlapic_lvtpc_enabled(struct vlapic *vlapic);
 
 int vlapic_set_irq(struct vlapic *vlapic, uint8_t vec, uint8_t trig);
 
index c02236260631726d773fb1a4a2cf554838146fd1..ecf96d47c26ff374fc3e575bdd54235f1e5b2e58 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __ASM_MACH_APIC_H
 #define __ASM_MACH_APIC_H
 
+#include <asm/apic.h>
+#include <asm/io_apic.h>
 #include <asm/genapic.h>
 #include <asm/smp.h>
 
index d00b56fcf0d7f0798e8f8512ac85c6caf67fd6f4..27d4e30e8a76b3619b2b24047ea3a2ddf7b6585b 100644 (file)
@@ -30,10 +30,8 @@ extern void numa_add_cpu(int cpu);
 extern void numa_init_array(void);
 extern int numa_off;
 
-static __devinit inline int srat_disabled(void)
-{
-       return numa_off || acpi_numa < 0;
-}
+
+extern int srat_disabled(void);
 extern void numa_set_node(int cpu, int node);
 extern int setup_node(int pxm);
 extern void srat_detect_node(int cpu);
index d2a4334ae686dc04f1e1ef69c50481dd8bb850e0..76413e70b954e9271a4c4de9d8d1df9527396e47 100644 (file)
 #include <asm/current.h>
 #endif
 
-#ifdef CONFIG_X86_LOCAL_APIC
 #ifndef __ASSEMBLY__
 #include <asm/bitops.h>
 #include <asm/mpspec.h>
-#ifdef CONFIG_X86_IO_APIC
-#include <asm/io_apic.h>
-#endif
-#include <asm/apic.h>
-#endif
 #endif
 
 #define BAD_APICID -1U
@@ -64,21 +58,8 @@ int cpu_add(uint32_t apic_id, uint32_t acpi_id, uint32_t pxm);
  */
 #define raw_smp_processor_id() (get_processor_id())
 
-#ifdef CONFIG_X86_LOCAL_APIC
-
-static inline int hard_smp_processor_id(void)
-{
-       /* we don't want to mark this access volatile - bad code generation */
-       return get_apic_id();
-}
-
-static __inline int logical_smp_processor_id(void)
-{
-       /* we don't want to mark this access volatile - bad code generation */
-       return get_logical_apic_id();
-}
-
-#endif
+int hard_smp_processor_id(void);
+int logical_smp_processor_id(void);
 
 #endif /* !__ASSEMBLY__ */
 
index dae4a2a1223f83a0fef16060437a7e3e96d7f238..2889c71fa7951f088c757f97c5d68c3fcdb1466f 100644 (file)
@@ -5,6 +5,7 @@
 #include <xen/cpumask.h>
 #include <xen/spinlock.h>
 #include <xen/time.h>
+#include <xen/list.h>
 #include <asm/regs.h>
 #include <asm/hardirq.h>