aboutsummaryrefslogtreecommitdiffstats
path: root/xen
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@citrix.com>2011-05-27 08:56:12 +0100
committerTim Deegan <Tim.Deegan@citrix.com>2011-05-27 08:56:12 +0100
commitf87806bcecfdd4d57bc1b543045ce3bfa84332a4 (patch)
tree26d8986e03ce83ad6d00a3b22da9915d531a4a63 /xen
parent2d680dadf189da1774c086f6eed72e5da564eb1e (diff)
downloadxen-f87806bcecfdd4d57bc1b543045ce3bfa84332a4.tar.gz
xen-f87806bcecfdd4d57bc1b543045ce3bfa84332a4.tar.bz2
xen-f87806bcecfdd4d57bc1b543045ce3bfa84332a4.zip
xen: remove more declarations from C files.
This patch moves some more, mostly data, extern declarations into header files. I haven't been as strict as I was with functions; in particular there are a number of declarations of assembler labels that are only used in one place. I've also left a few compat-mode tricks, and all the magic in symbols.c Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Diffstat (limited to 'xen')
-rw-r--r--xen/arch/x86/cpu/mcheck/mce.c3
-rw-r--r--xen/arch/x86/cpu/mcheck/mce.h3
-rw-r--r--xen/arch/x86/cpu/mcheck/x86_mca.h1
-rw-r--r--xen/arch/x86/cpu/mtrr/main.c6
-rw-r--r--xen/arch/x86/cpu/mtrr/mtrr.h5
-rw-r--r--xen/arch/x86/extable.c5
-rw-r--r--xen/arch/x86/hvm/intercept.c7
-rw-r--r--xen/arch/x86/hvm/mtrr.c2
-rw-r--r--xen/arch/x86/hvm/svm/svm.c2
-rw-r--r--xen/arch/x86/hvm/svm/vmcb.c2
-rw-r--r--xen/arch/x86/hvm/vpmu.c3
-rw-r--r--xen/arch/x86/io_apic.c1
-rw-r--r--xen/arch/x86/oprofile/nmi_int.c1
-rw-r--r--xen/arch/x86/oprofile/op_model_athlon.c1
-rw-r--r--xen/arch/x86/oprofile/op_x86_model.h4
-rw-r--r--xen/arch/x86/platform_hypercall.c3
-rw-r--r--xen/arch/x86/setup.c6
-rw-r--r--xen/arch/x86/tboot.c1
-rw-r--r--xen/arch/x86/traps.c2
-rw-r--r--xen/arch/x86/x86_32/mm.c2
-rw-r--r--xen/arch/x86/x86_64/traps.c4
-rw-r--r--xen/common/sched_arinc653.c2
-rw-r--r--xen/common/schedule.c4
-rw-r--r--xen/drivers/acpi/pmstat.c2
-rw-r--r--xen/drivers/passthrough/amd/iommu_acpi.c6
-rw-r--r--xen/drivers/passthrough/amd/iommu_intr.c2
-rw-r--r--xen/drivers/passthrough/amd/pci_amd_iommu.c3
-rw-r--r--xen/include/acpi/cpufreq/cpufreq.h2
-rw-r--r--xen/include/asm-x86/amd-iommu.h4
-rw-r--r--xen/include/asm-x86/config.h2
-rw-r--r--xen/include/asm-x86/hvm/io.h7
-rw-r--r--xen/include/asm-x86/hvm/svm/amd-iommu-proto.h4
-rw-r--r--xen/include/asm-x86/hvm/vpmu.h3
-rw-r--r--xen/include/asm-x86/mce.h3
-rw-r--r--xen/include/asm-x86/mtrr.h1
-rw-r--r--xen/include/asm-x86/page.h2
-rw-r--r--xen/include/asm-x86/processor.h7
-rw-r--r--xen/include/asm-x86/uaccess.h4
-rw-r--r--xen/include/xen/sched-if.h6
-rw-r--r--xen/include/xen/smp.h2
-rw-r--r--xen/include/xen/time.h1
41 files changed, 62 insertions, 69 deletions
diff --git a/xen/arch/x86/cpu/mcheck/mce.c b/xen/arch/x86/cpu/mcheck/mce.c
index 9f86616f42..65987f2074 100644
--- a/xen/arch/x86/cpu/mcheck/mce.c
+++ b/xen/arch/x86/cpu/mcheck/mce.c
@@ -326,9 +326,6 @@ mctelem_cookie_t mcheck_mca_logout(enum mca_source who, struct mca_banks *bankma
mca_init_global(mc_flags, mig);
/* A hook here to get global extended msrs */
{
- struct mcinfo_extended *intel_get_extended_msrs(
- struct mcinfo_global *mig, struct mc_info *mi);
-
if (boot_cpu_data.x86_vendor ==
X86_VENDOR_INTEL)
intel_get_extended_msrs(mig, mci);
diff --git a/xen/arch/x86/cpu/mcheck/mce.h b/xen/arch/x86/cpu/mcheck/mce.h
index 6762d1abcc..223c17b2b9 100644
--- a/xen/arch/x86/cpu/mcheck/mce.h
+++ b/xen/arch/x86/cpu/mcheck/mce.h
@@ -57,6 +57,9 @@ extern int firstbank;
int intel_mce_rdmsr(uint32_t msr, uint64_t *val);
int intel_mce_wrmsr(uint32_t msr, uint64_t val);
+struct mcinfo_extended *intel_get_extended_msrs(
+ struct mcinfo_global *mig, struct mc_info *mi);
+
int mce_available(struct cpuinfo_x86 *c);
int mce_firstbank(struct cpuinfo_x86 *c);
/* Helper functions used for collecting error telemetry */
diff --git a/xen/arch/x86/cpu/mcheck/x86_mca.h b/xen/arch/x86/cpu/mcheck/x86_mca.h
index 240b8d3cc1..f7077bec94 100644
--- a/xen/arch/x86/cpu/mcheck/x86_mca.h
+++ b/xen/arch/x86/cpu/mcheck/x86_mca.h
@@ -156,6 +156,5 @@ struct mca_error_handler
/* Global variables */
extern bool_t mce_disabled;
-extern unsigned int nr_mce_banks;
#endif /* X86_MCA_H */
diff --git a/xen/arch/x86/cpu/mtrr/main.c b/xen/arch/x86/cpu/mtrr/main.c
index 968d8bd959..554b4e3d8d 100644
--- a/xen/arch/x86/cpu/mtrr/main.c
+++ b/xen/arch/x86/cpu/mtrr/main.c
@@ -63,12 +63,6 @@ const struct mtrr_ops *__read_mostly mtrr_if = NULL;
static void set_mtrr(unsigned int reg, unsigned long base,
unsigned long size, mtrr_type type);
-#ifndef CONFIG_X86_64
-extern int arr3_protected;
-#else
-#define arr3_protected 0
-#endif
-
static const char *const mtrr_strings[MTRR_NUM_TYPES] =
{
"uncachable", /* 0 */
diff --git a/xen/arch/x86/cpu/mtrr/mtrr.h b/xen/arch/x86/cpu/mtrr/mtrr.h
index 429a142742..12b17e1c5c 100644
--- a/xen/arch/x86/cpu/mtrr/mtrr.h
+++ b/xen/arch/x86/cpu/mtrr/mtrr.h
@@ -86,3 +86,8 @@ void mtrr_wrmsr(unsigned int msr, uint64_t msr_content);
extern int amd_init_mtrr(void);
extern int cyrix_init_mtrr(void);
+#ifndef CONFIG_X86_64
+extern int arr3_protected;
+#else
+#define arr3_protected 0
+#endif
diff --git a/xen/arch/x86/extable.c b/xen/arch/x86/extable.c
index 8c64585483..2cdeb546cc 100644
--- a/xen/arch/x86/extable.c
+++ b/xen/arch/x86/extable.c
@@ -6,11 +6,6 @@
#include <xen/spinlock.h>
#include <asm/uaccess.h>
-extern struct exception_table_entry __start___ex_table[];
-extern struct exception_table_entry __stop___ex_table[];
-extern struct exception_table_entry __start___pre_ex_table[];
-extern struct exception_table_entry __stop___pre_ex_table[];
-
#ifdef __i386__
#define EX_FIELD(ptr, field) (ptr)->field
#define swap_ex NULL
diff --git a/xen/arch/x86/hvm/intercept.c b/xen/arch/x86/hvm/intercept.c
index 4f461cbd4c..be6bf95d8b 100644
--- a/xen/arch/x86/hvm/intercept.c
+++ b/xen/arch/x86/hvm/intercept.c
@@ -32,13 +32,6 @@
#include <xen/event.h>
#include <xen/iommu.h>
-extern const struct hvm_mmio_handler hpet_mmio_handler;
-extern const struct hvm_mmio_handler vlapic_mmio_handler;
-extern const struct hvm_mmio_handler vioapic_mmio_handler;
-extern const struct hvm_mmio_handler msixtbl_mmio_handler;
-
-#define HVM_MMIO_HANDLER_NR 4
-
static const struct hvm_mmio_handler *const
hvm_mmio_handlers[HVM_MMIO_HANDLER_NR] =
{
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 56b566f3ba..70e0597d59 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -28,8 +28,6 @@
#include <asm/hvm/support.h>
#include <asm/hvm/cacheattr.h>
-extern struct mtrr_state mtrr_state;
-
static uint32_t size_or_mask;
/* Get page attribute fields (PAn) from PAT MSR. */
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 4b2b0503b5..9b9e0753c4 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1656,8 +1656,6 @@ static void svm_vmexit_ud_intercept(struct cpu_user_regs *regs)
}
}
-extern unsigned int nr_mce_banks; /* from mce.h */
-
static int svm_is_erratum_383(struct cpu_user_regs *regs)
{
uint64_t msr_content;
diff --git a/xen/arch/x86/hvm/svm/vmcb.c b/xen/arch/x86/hvm/svm/vmcb.c
index b21b0c568f..c26c760044 100644
--- a/xen/arch/x86/hvm/svm/vmcb.c
+++ b/xen/arch/x86/hvm/svm/vmcb.c
@@ -32,8 +32,6 @@
#include <asm/hvm/svm/svm.h>
#include <asm/hvm/svm/svmdebug.h>
-extern int svm_dbg_on;
-
struct vmcb_struct *alloc_vmcb(void)
{
struct vmcb_struct *vmcb;
diff --git a/xen/arch/x86/hvm/vpmu.c b/xen/arch/x86/hvm/vpmu.c
index d8501129e4..59076fd1ad 100644
--- a/xen/arch/x86/hvm/vpmu.c
+++ b/xen/arch/x86/hvm/vpmu.c
@@ -78,9 +78,6 @@ void vpmu_load(struct vcpu *v)
vpmu->arch_vpmu_ops->arch_vpmu_load(v);
}
-extern struct arch_vpmu_ops core2_vpmu_ops;
-extern struct arch_vpmu_ops amd_vpmu_ops;
-
void vpmu_initialise(struct vcpu *v)
{
struct vpmu_struct *vpmu = vcpu_vpmu(v);
diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index 74df7480c1..138bd20fd9 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -1440,7 +1440,6 @@ static void __init setup_ioapic_ids_from_mpc(void)
*/
static int __init timer_irq_works(void)
{
- extern unsigned long pit0_ticks;
unsigned long t1, flags;
t1 = pit0_ticks;
diff --git a/xen/arch/x86/oprofile/nmi_int.c b/xen/arch/x86/oprofile/nmi_int.c
index d06ba881c0..eba9dec64d 100644
--- a/xen/arch/x86/oprofile/nmi_int.c
+++ b/xen/arch/x86/oprofile/nmi_int.c
@@ -339,7 +339,6 @@ static int force_cpu_type(const char *str)
}
custom_param("cpu_type", force_cpu_type);
-extern int ppro_has_global_ctrl;
static int __init ppro_init(char ** cpu_type)
{
__u8 cpu_model = current_cpu_data.x86_model;
diff --git a/xen/arch/x86/oprofile/op_model_athlon.c b/xen/arch/x86/oprofile/op_model_athlon.c
index fcbf5b55e8..95ad07c6c6 100644
--- a/xen/arch/x86/oprofile/op_model_athlon.c
+++ b/xen/arch/x86/oprofile/op_model_athlon.c
@@ -52,7 +52,6 @@
static unsigned long reset_value[MAX_COUNTERS];
extern char svm_stgi_label[];
-extern struct op_x86_model_spec const *__read_mostly model;
#ifdef CONFIG_X86_64
u32 ibs_caps = 0;
diff --git a/xen/arch/x86/oprofile/op_x86_model.h b/xen/arch/x86/oprofile/op_x86_model.h
index b154415873..87beedbf87 100644
--- a/xen/arch/x86/oprofile/op_x86_model.h
+++ b/xen/arch/x86/oprofile/op_x86_model.h
@@ -51,4 +51,8 @@ extern struct op_x86_model_spec const op_athlon_spec;
extern struct op_x86_model_spec const op_amd_fam15h_spec;
void arch_perfmon_setup_counters(void);
+
+extern int ppro_has_global_ctrl;
+extern struct op_x86_model_spec const *__read_mostly model;
+
#endif /* OP_X86_MODEL_H */
diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hypercall.c
index 022c6a7e18..87bc3f6e04 100644
--- a/xen/arch/x86/platform_hypercall.c
+++ b/xen/arch/x86/platform_hypercall.c
@@ -30,9 +30,6 @@
#include "cpu/mtrr/mtrr.h"
#include <xsm/xsm.h>
-extern uint16_t boot_edid_caps;
-extern uint8_t boot_edid_info[];
-
#ifndef COMPAT
typedef long ret_t;
DEFINE_SPINLOCK(xenpf_lock);
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index ce1cb2a46a..a872ae98e5 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -45,10 +45,6 @@
#include <asm/setup.h>
#include <xen/cpu.h>
-extern u16 boot_edid_caps;
-extern u8 boot_edid_info[128];
-extern struct boot_video_info boot_vid_info;
-
/* opt_nosmp: If true, secondary processors are ignored. */
static bool_t __initdata opt_nosmp;
boolean_param("nosmp", opt_nosmp);
@@ -438,6 +434,7 @@ struct boot_video_info {
u16 vesapm_off; /* 0x26 */
u16 vesa_attrib; /* 0x28 */
};
+extern struct boot_video_info boot_vid_info;
static void __init parse_video_info(void)
{
@@ -806,7 +803,6 @@ void __init __start_xen(unsigned long mbi_p)
end = 0;
if ( end > s )
{
- extern l2_pgentry_t l2_xenmap[];
l4_pgentry_t *pl4e;
l3_pgentry_t *pl3e;
l2_pgentry_t *pl2e;
diff --git a/xen/arch/x86/tboot.c b/xen/arch/x86/tboot.c
index 0fa4eef75d..1d78ec6a74 100644
--- a/xen/arch/x86/tboot.c
+++ b/xen/arch/x86/tboot.c
@@ -245,7 +245,6 @@ static void tboot_gen_domain_integrity(const uint8_t key[TB_KEY_SIZE],
*/
static int mfn_in_guarded_stack(unsigned long mfn)
{
- extern void *stack_base[NR_CPUS];
void *p;
int i;
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index c30b3e0f6a..655e74c03c 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -3248,8 +3248,6 @@ asmlinkage void do_debug(struct cpu_user_regs *regs)
if ( regs->eflags & X86_EFLAGS_TF )
{
#ifdef __x86_64__
- void sysenter_entry(void);
- void sysenter_eflags_saved(void);
/* In SYSENTER entry path we can't zap TF until EFLAGS is saved. */
if ( (regs->rip >= (unsigned long)sysenter_entry) &&
(regs->rip <= (unsigned long)sysenter_eflags_saved) )
diff --git a/xen/arch/x86/x86_32/mm.c b/xen/arch/x86/x86_32/mm.c
index 03b85cc2a5..3905540cb0 100644
--- a/xen/arch/x86/x86_32/mm.c
+++ b/xen/arch/x86/x86_32/mm.c
@@ -34,8 +34,6 @@
l2_pgentry_t __attribute__ ((__section__ (".bss.page_aligned")))
idle_pg_table_l2[4 * L2_PAGETABLE_ENTRIES];
-extern l1_pgentry_t l1_identmap[L1_PAGETABLE_ENTRIES];
-
unsigned int __read_mostly PAGE_HYPERVISOR = __PAGE_HYPERVISOR;
unsigned int __read_mostly PAGE_HYPERVISOR_NOCACHE = __PAGE_HYPERVISOR_NOCACHE;
diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c
index f48c61e71c..62ef570d8e 100644
--- a/xen/arch/x86/x86_64/traps.c
+++ b/xen/arch/x86/x86_64/traps.c
@@ -24,10 +24,6 @@
#include <asm/hvm/support.h>
#include <public/callback.h>
-asmlinkage void syscall_enter(void);
-asmlinkage void sysenter_entry(void);
-asmlinkage void compat_hypercall(void);
-asmlinkage void int80_direct_trap(void);
static void print_xen_info(void)
{
diff --git a/xen/common/sched_arinc653.c b/xen/common/sched_arinc653.c
index e0cab17fc3..b6f09ab3c8 100644
--- a/xen/common/sched_arinc653.c
+++ b/xen/common/sched_arinc653.c
@@ -654,7 +654,7 @@ a653sched_adjust_global(const struct scheduler *ops,
* callback functions.
* The symbol must be visible to the rest of Xen at link time.
*/
-struct scheduler sched_arinc653_def = {
+const struct scheduler sched_arinc653_def = {
.name = "ARINC 653 Scheduler",
.opt_name = "arinc653",
.sched_id = XEN_SCHEDULER_ARINC653,
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index aa8bdd5969..cce22a5795 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -57,10 +57,6 @@ static void poll_timer_fn(void *data);
DEFINE_PER_CPU(struct schedule_data, schedule_data);
DEFINE_PER_CPU(struct scheduler *, scheduler);
-extern const struct scheduler sched_sedf_def;
-extern const struct scheduler sched_credit_def;
-extern const struct scheduler sched_credit2_def;
-extern const struct scheduler sched_arinc653_def;
static const struct scheduler *schedulers[] = {
&sched_sedf_def,
&sched_credit_def,
diff --git a/xen/drivers/acpi/pmstat.c b/xen/drivers/acpi/pmstat.c
index 2387065c7b..e86c970538 100644
--- a/xen/drivers/acpi/pmstat.c
+++ b/xen/drivers/acpi/pmstat.c
@@ -45,8 +45,6 @@
DEFINE_PER_CPU_READ_MOSTLY(struct pm_px *, cpufreq_statistic_data);
-extern struct list_head cpufreq_governor_list;
-
/*
* Get PM statistic info
*/
diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c b/xen/drivers/passthrough/amd/iommu_acpi.c
index 57a4c16dde..84e246f7a1 100644
--- a/xen/drivers/passthrough/amd/iommu_acpi.c
+++ b/xen/drivers/passthrough/amd/iommu_acpi.c
@@ -25,12 +25,6 @@
#include <asm/hvm/svm/amd-iommu-proto.h>
#include <asm/hvm/svm/amd-iommu-acpi.h>
-extern unsigned long amd_iommu_page_entries;
-extern unsigned short ivrs_bdf_entries;
-extern struct ivrs_mappings *ivrs_mappings;
-extern int ioapic_bdf[MAX_IO_APICS];
-extern void *shared_intremap_table;
-
static unsigned short __initdata last_bdf;
static void __init add_ivrs_mapping_entry(
diff --git a/xen/drivers/passthrough/amd/iommu_intr.c b/xen/drivers/passthrough/amd/iommu_intr.c
index 07ab37df61..f67bfb6d1c 100644
--- a/xen/drivers/passthrough/amd/iommu_intr.c
+++ b/xen/drivers/passthrough/amd/iommu_intr.c
@@ -28,8 +28,6 @@
#define INTREMAP_ENTRIES (1 << INTREMAP_LENGTH)
int ioapic_bdf[MAX_IO_APICS];
-extern struct ivrs_mappings *ivrs_mappings;
-extern unsigned short ivrs_bdf_entries;
void *shared_intremap_table;
static DEFINE_SPINLOCK(shared_intremap_lock);
diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index 4d3ed59018..10b6db36b9 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -25,9 +25,6 @@
#include <asm/amd-iommu.h>
#include <asm/hvm/svm/amd-iommu-proto.h>
-extern unsigned short ivrs_bdf_entries;
-extern struct ivrs_mappings *ivrs_mappings;
-
struct amd_iommu *find_iommu_for_device(int bdf)
{
BUG_ON ( bdf >= ivrs_bdf_entries );
diff --git a/xen/include/acpi/cpufreq/cpufreq.h b/xen/include/acpi/cpufreq/cpufreq.h
index c93aeeeae7..25376f36e9 100644
--- a/xen/include/acpi/cpufreq/cpufreq.h
+++ b/xen/include/acpi/cpufreq/cpufreq.h
@@ -103,6 +103,8 @@ extern struct cpufreq_governor cpufreq_gov_userspace;
extern struct cpufreq_governor cpufreq_gov_performance;
extern struct cpufreq_governor cpufreq_gov_powersave;
+extern struct list_head cpufreq_governor_list;
+
extern int cpufreq_register_governor(struct cpufreq_governor *governor);
extern struct cpufreq_governor *__find_governor(const char *governor);
#define CPUFREQ_DEFAULT_GOVERNOR &cpufreq_gov_dbs
diff --git a/xen/include/asm-x86/amd-iommu.h b/xen/include/asm-x86/amd-iommu.h
index 5370d6b5a7..784c9d989b 100644
--- a/xen/include/asm-x86/amd-iommu.h
+++ b/xen/include/asm-x86/amd-iommu.h
@@ -99,4 +99,8 @@ struct ivrs_mappings {
u8 dte_ext_int_pass;
u8 dte_init_pass;
};
+
+extern unsigned short ivrs_bdf_entries;
+extern struct ivrs_mappings *ivrs_mappings;
+
#endif /* _ASM_X86_64_AMD_IOMMU_H */
diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h
index e3a7868caa..d82351d938 100644
--- a/xen/include/asm-x86/config.h
+++ b/xen/include/asm-x86/config.h
@@ -108,6 +108,8 @@ extern unsigned int trampoline_xen_phys_start;
extern unsigned char trampoline_cpu_started;
extern char wakeup_start[];
extern unsigned int video_mode, video_flags;
+extern unsigned short boot_edid_caps;
+extern unsigned char boot_edid_info[128];
#endif
#if defined(__x86_64__)
diff --git a/xen/include/asm-x86/hvm/io.h b/xen/include/asm-x86/hvm/io.h
index fe2ecdad0e..ce2bcb373f 100644
--- a/xen/include/asm-x86/hvm/io.h
+++ b/xen/include/asm-x86/hvm/io.h
@@ -65,6 +65,13 @@ struct hvm_mmio_handler {
hvm_mmio_write_t write_handler;
};
+extern const struct hvm_mmio_handler hpet_mmio_handler;
+extern const struct hvm_mmio_handler vlapic_mmio_handler;
+extern const struct hvm_mmio_handler vioapic_mmio_handler;
+extern const struct hvm_mmio_handler msixtbl_mmio_handler;
+
+#define HVM_MMIO_HANDLER_NR 4
+
int hvm_io_intercept(ioreq_t *p, int type);
void register_io_handler(
struct domain *d, unsigned long addr, unsigned long size,
diff --git a/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h b/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
index 7a34e4b7d6..c1c23333b2 100644
--- a/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
+++ b/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
@@ -23,6 +23,7 @@
#include <xen/sched.h>
#include <asm/amd-iommu.h>
+#include <asm/apicdef.h>
#include <xen/domain_page.h>
#define for_each_amd_iommu(amd_iommu) \
@@ -95,6 +96,9 @@ void amd_iommu_read_msi_from_ire(
unsigned int amd_iommu_read_ioapic_from_ire(
unsigned int apic, unsigned int reg);
+extern int ioapic_bdf[MAX_IO_APICS];
+extern void *shared_intremap_table;
+
/* power management support */
void amd_iommu_resume(void);
void amd_iommu_suspend(void);
diff --git a/xen/include/asm-x86/hvm/vpmu.h b/xen/include/asm-x86/hvm/vpmu.h
index a45b3801ed..276333fd80 100644
--- a/xen/include/asm-x86/hvm/vpmu.h
+++ b/xen/include/asm-x86/hvm/vpmu.h
@@ -56,6 +56,9 @@ struct arch_vpmu_ops {
void (*arch_vpmu_load)(struct vcpu *v);
};
+extern struct arch_vpmu_ops core2_vpmu_ops;
+extern struct arch_vpmu_ops amd_vpmu_ops;
+
struct vpmu_struct {
u32 flags;
void *context;
diff --git a/xen/include/asm-x86/mce.h b/xen/include/asm-x86/mce.h
index e533c65748..8ff4e3634e 100644
--- a/xen/include/asm-x86/mce.h
+++ b/xen/include/asm-x86/mce.h
@@ -30,4 +30,7 @@ extern int vmce_init_msr(struct domain *d);
extern void vmce_destroy_msr(struct domain *d);
extern int vmce_wrmsr(uint32_t msr, uint64_t val);
extern int vmce_rdmsr(uint32_t msr, uint64_t *val);
+
+extern unsigned int nr_mce_banks;
+
#endif
diff --git a/xen/include/asm-x86/mtrr.h b/xen/include/asm-x86/mtrr.h
index 469cdb5111..6b4d6328d7 100644
--- a/xen/include/asm-x86/mtrr.h
+++ b/xen/include/asm-x86/mtrr.h
@@ -52,6 +52,7 @@ struct mtrr_state {
/* ranges in var MSRs are overlapped or not:0(no overlapped) */
bool_t overlapped;
};
+extern struct mtrr_state mtrr_state;
extern void mtrr_save_fixed_ranges(void *);
extern void mtrr_save_state(void);
diff --git a/xen/include/asm-x86/page.h b/xen/include/asm-x86/page.h
index 5961b347ff..68af2a77a0 100644
--- a/xen/include/asm-x86/page.h
+++ b/xen/include/asm-x86/page.h
@@ -303,6 +303,8 @@ extern l2_pgentry_t *compat_idle_pg_table_l2;
extern unsigned int m2p_compat_vstart;
#endif
extern l2_pgentry_t l2_identmap[4*L2_PAGETABLE_ENTRIES];
+extern l1_pgentry_t l1_identmap[L1_PAGETABLE_ENTRIES];
+extern l2_pgentry_t l2_xenmap[];
void paging_init(void);
void setup_idle_pagetable(void);
#endif /* !defined(__ASSEMBLY__) */
diff --git a/xen/include/asm-x86/processor.h b/xen/include/asm-x86/processor.h
index 7272dfa058..ff807f7250 100644
--- a/xen/include/asm-x86/processor.h
+++ b/xen/include/asm-x86/processor.h
@@ -580,6 +580,13 @@ DECLARE_TRAP_HANDLER(machine_check);
DECLARE_TRAP_HANDLER(alignment_check);
DECLARE_TRAP_HANDLER(spurious_interrupt_bug);
#undef DECLARE_TRAP_HANDLER
+
+asmlinkage void syscall_enter(void);
+asmlinkage void sysenter_entry(void);
+asmlinkage void sysenter_eflags_saved(void);
+asmlinkage void compat_hypercall(void);
+asmlinkage void int80_direct_trap(void);
+
extern asmlinkage int hypercall(void);
int cpuid_hypervisor_leaves( uint32_t idx, uint32_t sub_idx,
diff --git a/xen/include/asm-x86/uaccess.h b/xen/include/asm-x86/uaccess.h
index af624dfab6..e3e541b306 100644
--- a/xen/include/asm-x86/uaccess.h
+++ b/xen/include/asm-x86/uaccess.h
@@ -269,6 +269,10 @@ struct exception_table_entry
{
s32 addr, cont;
};
+extern struct exception_table_entry __start___ex_table[];
+extern struct exception_table_entry __stop___ex_table[];
+extern struct exception_table_entry __start___pre_ex_table[];
+extern struct exception_table_entry __stop___pre_ex_table[];
extern unsigned long search_exception_table(unsigned long);
extern void sort_exception_tables(void);
diff --git a/xen/include/xen/sched-if.h b/xen/include/xen/sched-if.h
index a03ceb1552..72a1293531 100644
--- a/xen/include/xen/sched-if.h
+++ b/xen/include/xen/sched-if.h
@@ -183,6 +183,12 @@ struct scheduler {
void (*tick_resume) (const struct scheduler *, unsigned int);
};
+extern const struct scheduler sched_sedf_def;
+extern const struct scheduler sched_credit_def;
+extern const struct scheduler sched_credit2_def;
+extern const struct scheduler sched_arinc653_def;
+
+
struct cpupool
{
int cpupool_id;
diff --git a/xen/include/xen/smp.h b/xen/include/xen/smp.h
index 0003febe80..536c229d45 100644
--- a/xen/include/xen/smp.h
+++ b/xen/include/xen/smp.h
@@ -63,4 +63,6 @@ static inline void on_each_cpu(
int alloc_cpu_id(void);
+extern void *stack_base[NR_CPUS];
+
#endif /* __XEN_SMP_H__ */
diff --git a/xen/include/xen/time.h b/xen/include/xen/time.h
index e485f8a85f..a19434079c 100644
--- a/xen/include/xen/time.h
+++ b/xen/include/xen/time.h
@@ -15,6 +15,7 @@ extern int init_xen_time(void);
extern void cstate_restore_tsc(void);
extern unsigned long cpu_khz;
+extern unsigned long pit0_ticks;
struct domain;
struct vcpu;