[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Scattered code arrangement cleanups.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1254898220 -3600 # Node ID 30bfa1d8895daa561e4a3d0fb11b7fabac154fe1 # Parent f254f4a9a02c452f0c7d0b7943d1c8d88e48a533 Scattered code arrangement cleanups. - remove redundant declarations - add/move prototypes to headers - move things where they belong to Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx> --- xen/arch/x86/acpi/boot.c | 7 +- xen/arch/x86/acpi/cpu_idle.c | 1 xen/arch/x86/apic.c | 76 +++++++++++++++++---------- xen/arch/x86/bzimage.c | 1 xen/arch/x86/cpu/amd.c | 1 xen/arch/x86/cpu/common.c | 8 -- xen/arch/x86/cpu/intel.c | 3 - xen/arch/x86/cpu/mcheck/mce.c | 1 xen/arch/x86/cpu/mtrr/generic.c | 1 xen/arch/x86/domain_build.c | 7 -- xen/arch/x86/domctl.c | 4 - xen/arch/x86/genapic/probe.c | 3 - xen/arch/x86/hpet.c | 4 - xen/arch/x86/hvm/hvm.c | 9 --- xen/arch/x86/hvm/mtrr.c | 5 - xen/arch/x86/hvm/pmtimer.c | 1 xen/arch/x86/hvm/svm/svm.c | 2 xen/arch/x86/hvm/vmx/vmx.c | 14 ---- xen/arch/x86/i8259.c | 24 -------- xen/arch/x86/mm.c | 5 - xen/arch/x86/mm/shadow/multi.h | 4 - xen/arch/x86/oprofile/nmi_int.c | 3 - xen/arch/x86/oprofile/op_model_athlon.c | 5 - xen/arch/x86/oprofile/op_model_p4.c | 5 - xen/arch/x86/oprofile/op_model_ppro.c | 6 -- xen/arch/x86/pci.c | 1 xen/arch/x86/setup.c | 25 +------- xen/arch/x86/time.c | 1 xen/arch/x86/traps.c | 2 xen/arch/x86/x86_32/mm.c | 3 - xen/arch/x86/x86_64/mm.c | 2 xen/arch/x86/x86_64/pci.c | 7 -- xen/common/sysctl.c | 5 - xen/common/xenoprof.c | 1 xen/drivers/acpi/pmstat.c | 5 - xen/drivers/char/console.c | 1 xen/drivers/passthrough/amd/iommu_detect.c | 1 xen/drivers/passthrough/amd/pci_amd_iommu.c | 1 xen/drivers/passthrough/iommu.c | 2 xen/drivers/passthrough/vtd/dmar.c | 1 xen/drivers/passthrough/vtd/utils.c | 2 xen/include/acpi/acglobal.h | 4 + xen/include/acpi/platform/aclinux.h | 5 - xen/include/asm-x86/acpi.h | 19 ++---- xen/include/asm-x86/amd-iommu.h | 2 xen/include/asm-x86/bzimage.h | 12 ++++ xen/include/asm-x86/domain.h | 3 + xen/include/asm-x86/hpet.h | 2 xen/include/asm-x86/hypercall.h | 14 +++- xen/include/asm-x86/io_apic.h | 9 --- xen/include/asm-x86/irq.h | 13 ++++ xen/include/asm-x86/mach-generic/mach_apic.h | 1 xen/include/asm-x86/mpspec.h | 3 - xen/include/asm-x86/mtrr.h | 10 +++ xen/include/asm-x86/setup.h | 29 ++++++++++ xen/include/asm-x86/smp.h | 3 - xen/include/asm-x86/x86_32/asm_defns.h | 1 xen/include/asm-x86/x86_64/asm_defns.h | 1 xen/include/asm-x86/x86_64/page.h | 3 - xen/include/xen/cpuidle.h | 1 xen/include/xen/hypercall.h | 6 ++ xen/include/xen/irq.h | 2 xen/include/xen/pci.h | 2 xen/include/xen/pmstat.h | 16 +++++ xen/include/xen/xenoprof.h | 6 +- xen/include/xsm/xsm.h | 2 xen/xsm/xsm_core.c | 1 xen/xsm/xsm_policy.c | 1 68 files changed, 212 insertions(+), 219 deletions(-) diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/acpi/boot.c --- a/xen/arch/x86/acpi/boot.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/acpi/boot.c Wed Oct 07 07:50:20 2009 +0100 @@ -37,6 +37,9 @@ #include <asm/io.h> #include <asm/mpspec.h> #include <asm/processor.h> +#ifdef CONFIG_HPET_TIMER +#include <asm/hpet.h> /* for hpet_address */ +#endif #include <mach_apic.h> #include <mach_mpparse.h> @@ -317,8 +320,6 @@ static int __init acpi_parse_hpet(struct hpet_tbl->id, vxtime.hpet_address); #else /* X86 */ { - extern unsigned long hpet_address; - hpet_address = hpet_tbl->address.address; printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", hpet_tbl->id, hpet_address); @@ -898,8 +899,6 @@ int __init acpi_boot_table_init(void) */ error = acpi_blacklisted(); if (error) { - extern int acpi_force; - if (acpi_force) { printk(KERN_WARNING PREFIX "acpi=force override\n"); } else { diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/acpi/cpu_idle.c --- a/xen/arch/x86/acpi/cpu_idle.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/acpi/cpu_idle.c Wed Oct 07 07:50:20 2009 +0100 @@ -45,6 +45,7 @@ #include <asm/io.h> #include <asm/hpet.h> #include <asm/processor.h> +#include <xen/pmstat.h> #include <public/platform.h> #include <public/sysctl.h> #include <acpi/cpufreq/cpufreq.h> diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/apic.c --- a/xen/arch/x86/apic.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/apic.c Wed Oct 07 07:50:20 2009 +0100 @@ -34,9 +34,29 @@ #include <asm/hardirq.h> #include <asm/apic.h> #include <asm/io_apic.h> +#include <asm/asm_defns.h> /* for BUILD_SMP_INTERRUPT */ #include <mach_apic.h> #include <io_ports.h> +static struct { + int active; + /* r/w apic fields */ + unsigned int apic_id; + unsigned int apic_taskpri; + unsigned int apic_ldr; + unsigned int apic_dfr; + unsigned int apic_spiv; + unsigned int apic_lvtt; + unsigned int apic_lvtpc; + unsigned int apic_lvtcmci; + unsigned int apic_lvt0; + unsigned int apic_lvt1; + unsigned int apic_lvterr; + unsigned int apic_tmict; + unsigned int apic_tdcr; + unsigned int apic_thmr; +} apic_pm_state; + /* * Knob to control our willingness to enable the local APIC. */ @@ -49,8 +69,31 @@ int apic_verbosity; int x2apic_enabled __read_mostly = 0; - -static void apic_pm_activate(void); +/* + * The following vectors are part of the Linux architecture, there + * is no hardware IRQ pin equivalent for them, they are triggered + * through the ICC by us (IPIs) + */ +BUILD_SMP_INTERRUPT(irq_move_cleanup_interrupt,IRQ_MOVE_CLEANUP_VECTOR) +BUILD_SMP_INTERRUPT(event_check_interrupt,EVENT_CHECK_VECTOR) +BUILD_SMP_INTERRUPT(invalidate_interrupt,INVALIDATE_TLB_VECTOR) +BUILD_SMP_INTERRUPT(call_function_interrupt,CALL_FUNCTION_VECTOR) + +/* + * Every pentium local APIC has two 'local interrupts', with a + * soft-definable vector attached to both interrupts, one of + * which is a timer interrupt, the other one is error counter + * overflow. Linux uses the local APIC timer interrupt to get + * a much simpler SMP time architecture: + */ +BUILD_SMP_INTERRUPT(apic_timer_interrupt,LOCAL_TIMER_VECTOR) +BUILD_SMP_INTERRUPT(error_interrupt,ERROR_APIC_VECTOR) +BUILD_SMP_INTERRUPT(spurious_interrupt,SPURIOUS_APIC_VECTOR) +BUILD_SMP_INTERRUPT(pmu_apic_interrupt,PMU_APIC_VECTOR) +BUILD_SMP_INTERRUPT(cmci_interrupt, CMCI_APIC_VECTOR) +#ifdef CONFIG_X86_MCE_THERMAL +BUILD_SMP_INTERRUPT(thermal_interrupt,THERMAL_APIC_VECTOR) +#endif static int modern_apic(void) { @@ -426,6 +469,11 @@ void __init init_bsp_APIC(void) if (!APIC_INTEGRATED(ver)) /* 82489DX */ value |= APIC_LVT_LEVEL_TRIGGER; apic_write_around(APIC_LVT1, value); +} + +static void apic_pm_activate(void) +{ + apic_pm_state.active = 1; } void __devinit setup_local_APIC(void) @@ -598,25 +646,6 @@ void __devinit setup_local_APIC(void) apic_pm_activate(); } -static struct { - int active; - /* r/w apic fields */ - unsigned int apic_id; - unsigned int apic_taskpri; - unsigned int apic_ldr; - unsigned int apic_dfr; - unsigned int apic_spiv; - unsigned int apic_lvtt; - unsigned int apic_lvtpc; - unsigned int apic_lvtcmci; - unsigned int apic_lvt0; - unsigned int apic_lvt1; - unsigned int apic_lvterr; - unsigned int apic_tmict; - unsigned int apic_tdcr; - unsigned int apic_thmr; -} apic_pm_state; - int lapic_suspend(void) { unsigned long flags; @@ -726,11 +755,6 @@ void lapic_shutdown(void) disable_local_APIC(); local_irq_restore(flags); -} - -static void apic_pm_activate(void) -{ - apic_pm_state.active = 1; } /* diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/bzimage.c --- a/xen/arch/x86/bzimage.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/bzimage.c Wed Oct 07 07:50:20 2009 +0100 @@ -4,6 +4,7 @@ #include <xen/mm.h> #include <xen/string.h> #include <xen/types.h> +#include <asm/bzimage.h> #define HEAPORDER 3 diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/cpu/amd.c --- a/xen/arch/x86/cpu/amd.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/cpu/amd.c Wed Oct 07 07:50:20 2009 +0100 @@ -8,6 +8,7 @@ #include <asm/msr.h> #include <asm/processor.h> #include <asm/hvm/support.h> +#include <asm/setup.h> /* amd_init_cpu */ #include "cpu.h" #include "amd.h" diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/cpu/common.c --- a/xen/arch/x86/cpu/common.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/cpu/common.c Wed Oct 07 07:50:20 2009 +0100 @@ -11,6 +11,7 @@ #include <asm/mpspec.h> #include <asm/apic.h> #include <mach_apic.h> +#include <asm/setup.h> #include "cpu.h" @@ -546,13 +547,6 @@ cpumask_t cpu_initialized __cpuinitdata * Then, when cpu_init() is called, we can just iterate over that array. */ -extern int intel_cpu_init(void); -extern int cyrix_init_cpu(void); -extern int nsc_init_cpu(void); -extern int amd_init_cpu(void); -extern int centaur_init_cpu(void); -extern int transmeta_init_cpu(void); - void __init early_cpu_init(void) { intel_cpu_init(); diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/cpu/intel.c --- a/xen/arch/x86/cpu/intel.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/cpu/intel.c Wed Oct 07 07:50:20 2009 +0100 @@ -12,6 +12,7 @@ #include <asm/i387.h> #include <mach_apic.h> #include <asm/hvm/support.h> +#include <asm/setup.h> #include "cpu.h" @@ -296,7 +297,7 @@ static struct cpu_dev intel_cpu_dev __de .c_size_cache = intel_size_cache, }; -__init int intel_cpu_init(void) +int __init intel_cpu_init(void) { cpu_devs[X86_VENDOR_INTEL] = &intel_cpu_dev; return 0; diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/cpu/mcheck/mce.c --- a/xen/arch/x86/cpu/mcheck/mce.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/cpu/mcheck/mce.c Wed Oct 07 07:50:20 2009 +0100 @@ -15,6 +15,7 @@ #include <xen/cpumask.h> #include <xen/event.h> #include <xen/guest_access.h> +#include <xen/hypercall.h> /* for do_mca */ #include <asm/processor.h> #include <asm/system.h> diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/cpu/mtrr/generic.c --- a/xen/arch/x86/cpu/mtrr/generic.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/cpu/mtrr/generic.c Wed Oct 07 07:50:20 2009 +0100 @@ -102,7 +102,6 @@ void __init mtrr_state_warn(void) printk(KERN_INFO "mtrr: corrected configuration.\n"); } -extern bool_t is_var_mtrr_overlapped(struct mtrr_state *m); /* Doesn't attempt to pass an error out to MTRR users because it's quite complicated in some cases and probably not worth it because the best error handling is to ignore it. */ diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/domain_build.c --- a/xen/arch/x86/domain_build.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/domain_build.c Wed Oct 07 07:50:20 2009 +0100 @@ -29,14 +29,9 @@ #include <asm/paging.h> #include <asm/p2m.h> #include <asm/e820.h> +#include <asm/bzimage.h> /* for bzimage_parse */ #include <public/version.h> - -int __init bzimage_parse( - char *output, char **image_start, unsigned long *image_len); - -extern unsigned long initial_images_nrpages(void); -extern void discard_initial_images(void); static long __initdata dom0_nrpages; static long __initdata dom0_min_nrpages; diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/domctl.c --- a/xen/arch/x86/domctl.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/domctl.c Wed Oct 07 07:50:20 2009 +0100 @@ -26,6 +26,8 @@ #include <asm/hvm/support.h> #include <asm/hvm/cacheattr.h> #include <asm/processor.h> +#include <asm/acpi.h> /* for hvm_acpi_power_button */ +#include <asm/hypercall.h> /* for arch_do_domctl */ #include <xsm/xsm.h> #include <xen/iommu.h> @@ -590,8 +592,6 @@ long arch_do_domctl( case XEN_DOMCTL_SENDTRIGGER_POWER: { - extern void hvm_acpi_power_button(struct domain *d); - ret = -EINVAL; if ( is_hvm_domain(d) ) { diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/genapic/probe.c --- a/xen/arch/x86/genapic/probe.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/genapic/probe.c Wed Oct 07 07:50:20 2009 +0100 @@ -12,7 +12,8 @@ #include <asm/fixmap.h> #include <asm/mpspec.h> #include <asm/apicdef.h> -#include <asm/genapic.h> +#include <asm/mach-generic/mach_apic.h> +#include <asm/setup.h> extern struct genapic apic_summit; extern struct genapic apic_bigsmp; diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/hpet.c --- a/xen/arch/x86/hpet.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/hpet.c Wed Oct 07 07:50:20 2009 +0100 @@ -16,6 +16,7 @@ #include <asm/hpet.h> #include <asm/msi.h> #include <mach_apic.h> +#include <xen/cpuidle.h> #define MAX_DELTA_NS MILLISECS(10*1000) #define MIN_DELTA_NS MICROSECS(20) @@ -52,8 +53,6 @@ static int *irq_channel; #define irq_to_channel(irq) irq_channel[irq] unsigned long hpet_address; - -void msi_compose_msg(struct pci_dev *pdev, int irq, struct msi_msg *msg); /* * force_hpet_broadcast: by default legacy hpet broadcast will be stopped @@ -491,7 +490,6 @@ static void (*hpet_detach_channel)(int c static void (*hpet_detach_channel)(int cpu); #include <asm/mc146818rtc.h> -void cpuidle_disable_deep_cstate(void); void (*pv_rtc_handler)(unsigned int port, uint8_t value); diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/hvm/hvm.c --- a/xen/arch/x86/hvm/hvm.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/hvm/hvm.c Wed Oct 07 07:50:20 2009 +0100 @@ -52,6 +52,7 @@ #include <asm/hvm/support.h> #include <asm/hvm/cacheattr.h> #include <asm/hvm/trace.h> +#include <asm/mtrr.h> #include <public/sched.h> #include <public/hvm/ioreq.h> #include <public/version.h> @@ -950,7 +951,6 @@ int hvm_set_efer(uint64_t value) } extern void shadow_blow_tables_per_domain(struct domain *d); -extern bool_t mtrr_pat_not_equal(struct vcpu *vd, struct vcpu *vs); /* Exit UC mode only if all VCPUs agree on MTRR/PAT and are not in no_fill. */ static bool_t domain_exit_uc_mode(struct vcpu *v) @@ -1964,13 +1964,6 @@ gp_fault: int hvm_msr_write_intercept(struct cpu_user_regs *regs) { - extern bool_t mtrr_var_range_msr_set( - struct mtrr_state *v, u32 msr, u64 msr_content); - extern bool_t mtrr_fix_range_msr_set( - struct mtrr_state *v, int row, u64 msr_content); - extern bool_t mtrr_def_type_msr_set(struct mtrr_state *v, u64 msr_content); - extern bool_t pat_msr_set(u64 *pat, u64 msr); - uint32_t ecx = regs->ecx; uint64_t msr_content = (uint32_t)regs->eax | ((uint64_t)regs->edx << 32); struct vcpu *v = current; diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/hvm/mtrr.c --- a/xen/arch/x86/hvm/mtrr.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/hvm/mtrr.c Wed Oct 07 07:50:20 2009 +0100 @@ -147,14 +147,9 @@ bool_t is_var_mtrr_overlapped(struct mtr #define MTRRphysBase_MSR(reg) (0x200 + 2 * (reg)) #define MTRRphysMask_MSR(reg) (0x200 + 2 * (reg) + 1) -bool_t mtrr_var_range_msr_set(struct mtrr_state *m, uint32_t msr, - uint64_t msr_content); -bool_t mtrr_fix_range_msr_set(struct mtrr_state *m, uint32_t row, - uint64_t msr_content); static int hvm_mtrr_pat_init(void) { - extern uint64_t host_pat; unsigned int i, j, phys_addr; memset(&mtrr_epat_tbl, INVALID_MEM_TYPE, sizeof(mtrr_epat_tbl)); diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/hvm/pmtimer.c --- a/xen/arch/x86/hvm/pmtimer.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/hvm/pmtimer.c Wed Oct 07 07:50:20 2009 +0100 @@ -21,6 +21,7 @@ #include <asm/hvm/vpt.h> #include <asm/hvm/io.h> #include <asm/hvm/support.h> +#include <asm/acpi.h> /* for hvm_acpi_power_button prototype */ /* Slightly more readable port I/O addresses for the registers we intercept */ #define PM1a_STS_ADDR (ACPI_PM1A_EVT_BLK_ADDRESS) diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/hvm/svm/svm.c --- a/xen/arch/x86/hvm/svm/svm.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/hvm/svm/svm.c Wed Oct 07 07:50:20 2009 +0100 @@ -61,8 +61,6 @@ static struct hvm_function_table svm_fun enum handler_return { HNDL_done, HNDL_unhandled, HNDL_exception_raised }; -asmlinkage void do_IRQ(struct cpu_user_regs *); - /* va of hardware host save area */ static void *hsa[NR_CPUS] __read_mostly; diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/hvm/vmx/vmx.c --- a/xen/arch/x86/hvm/vmx/vmx.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/hvm/vmx/vmx.c Wed Oct 07 07:50:20 2009 +0100 @@ -2087,20 +2087,6 @@ static void vmx_do_extint(struct cpu_use { unsigned int vector; - asmlinkage void do_IRQ(struct cpu_user_regs *); - fastcall void smp_apic_timer_interrupt(struct cpu_user_regs *); - fastcall void smp_event_check_interrupt(struct cpu_user_regs *regs); - fastcall void smp_invalidate_interrupt(void); - fastcall void smp_call_function_interrupt(struct cpu_user_regs *regs); - fastcall void smp_spurious_interrupt(struct cpu_user_regs *regs); - fastcall void smp_error_interrupt(struct cpu_user_regs *regs); - fastcall void smp_pmu_apic_interrupt(struct cpu_user_regs *regs); - fastcall void smp_cmci_interrupt(struct cpu_user_regs *regs); - fastcall void smp_irq_move_cleanup_interrupt(struct cpu_user_regs *regs); -#ifdef CONFIG_X86_MCE_THERMAL - fastcall void smp_thermal_interrupt(struct cpu_user_regs *regs); -#endif - vector = __vmread(VM_EXIT_INTR_INFO); BUG_ON(!(vector & INTR_INFO_VALID_MASK)); diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/i8259.c --- a/xen/arch/x86/i8259.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/i8259.c Wed Oct 07 07:50:20 2009 +0100 @@ -52,30 +52,6 @@ BUILD_16_IRQS(0xc) BUILD_16_IRQS(0xd) BU #undef BUILD_16_IRQS #undef BI - -/* - * The following vectors are part of the Linux architecture, there - * is no hardware IRQ pin equivalent for them, they are triggered - * through the ICC by us (IPIs) - */ -BUILD_SMP_INTERRUPT(irq_move_cleanup_interrupt,IRQ_MOVE_CLEANUP_VECTOR) -BUILD_SMP_INTERRUPT(event_check_interrupt,EVENT_CHECK_VECTOR) -BUILD_SMP_INTERRUPT(invalidate_interrupt,INVALIDATE_TLB_VECTOR) -BUILD_SMP_INTERRUPT(call_function_interrupt,CALL_FUNCTION_VECTOR) - -/* - * Every pentium local APIC has two 'local interrupts', with a - * soft-definable vector attached to both interrupts, one of - * which is a timer interrupt, the other one is error counter - * overflow. Linux uses the local APIC timer interrupt to get - * a much simpler SMP time architecture: - */ -BUILD_SMP_INTERRUPT(apic_timer_interrupt,LOCAL_TIMER_VECTOR) -BUILD_SMP_INTERRUPT(error_interrupt,ERROR_APIC_VECTOR) -BUILD_SMP_INTERRUPT(spurious_interrupt,SPURIOUS_APIC_VECTOR) -BUILD_SMP_INTERRUPT(pmu_apic_interrupt,PMU_APIC_VECTOR) -BUILD_SMP_INTERRUPT(thermal_interrupt,THERMAL_APIC_VECTOR) -BUILD_SMP_INTERRUPT(cmci_interrupt, CMCI_APIC_VECTOR) #define IRQ(x,y) \ IRQ##x##y##_interrupt diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/mm.c --- a/xen/arch/x86/mm.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/mm.c Wed Oct 07 07:50:20 2009 +0100 @@ -113,6 +113,7 @@ #include <public/sched.h> #include <xsm/xsm.h> #include <xen/trace.h> +#include <asm/setup.h> /* * Mapping of first 2 or 4 megabytes of memory. This is mapped with 4kB @@ -222,8 +223,6 @@ void __init init_frametable(void) void __init arch_init_memory(void) { - extern void subarch_init_memory(void); - unsigned long i, pfn, rstart_pfn, rend_pfn, iostart_pfn, ioend_pfn; /* @@ -4484,8 +4483,6 @@ int ptwr_do_page_fault(struct vcpu *v, u void free_xen_pagetable(void *v) { - extern int early_boot; - if ( early_boot ) return; diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/mm/shadow/multi.h --- a/xen/arch/x86/mm/shadow/multi.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/mm/shadow/multi.h Wed Oct 07 07:50:20 2009 +0100 @@ -100,10 +100,10 @@ SHADOW_INTERNAL_NAME(sh_audit_l4_table, #endif extern void * -SHADOW_INTERNAL_NAME(sh_guest_map_l1e, CONFIG_PAGING_LEVELS) +SHADOW_INTERNAL_NAME(sh_guest_map_l1e, GUEST_LEVELS) (struct vcpu *v, unsigned long va, unsigned long *gl1mfn); extern void -SHADOW_INTERNAL_NAME(sh_guest_get_eff_l1e, CONFIG_PAGING_LEVELS) +SHADOW_INTERNAL_NAME(sh_guest_get_eff_l1e, GUEST_LEVELS) (struct vcpu *v, unsigned long va, void *eff_l1e); extern mfn_t diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/oprofile/nmi_int.c --- a/xen/arch/x86/oprofile/nmi_int.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/oprofile/nmi_int.c Wed Oct 07 07:50:20 2009 +0100 @@ -35,9 +35,6 @@ static unsigned long saved_lvtpc[NR_CPUS static char *cpu_type; -extern int is_active(struct domain *d); -extern int is_passive(struct domain *d); - static int passive_domain_msr_op_checks(struct cpu_user_regs *regs ,int *typep, int *indexp) { struct vpmu_struct *vpmu = vcpu_vpmu(current); diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/oprofile/op_model_athlon.c --- a/xen/arch/x86/oprofile/op_model_athlon.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/oprofile/op_model_athlon.c Wed Oct 07 07:50:20 2009 +0100 @@ -45,11 +45,6 @@ #define CTRL_SET_GUEST_ONLY(val, h) (val |= ((h & 1) << 8)) static unsigned long reset_value[NUM_COUNTERS]; - -extern void xenoprof_log_event(struct vcpu *v, struct cpu_user_regs * regs, - unsigned long eip, int mode, int event); -extern int xenoprofile_get_mode(struct vcpu *v, - struct cpu_user_regs * const regs); extern char svm_stgi_label[]; diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/oprofile/op_model_p4.c --- a/xen/arch/x86/oprofile/op_model_p4.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/oprofile/op_model_p4.c Wed Oct 07 07:50:20 2009 +0100 @@ -620,11 +620,6 @@ static void p4_setup_ctrs(struct op_msrs } } -extern void xenoprof_log_event(struct vcpu *v, struct cpu_user_regs * regs, - unsigned long eip, int mode, int event); -extern int xenoprofile_get_mode(struct vcpu *v, - struct cpu_user_regs * const regs); - static int p4_check_ctrs(unsigned int const cpu, struct op_msrs const * const msrs, struct cpu_user_regs * const regs) diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/oprofile/op_model_ppro.c --- a/xen/arch/x86/oprofile/op_model_ppro.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/oprofile/op_model_ppro.c Wed Oct 07 07:50:20 2009 +0100 @@ -57,7 +57,6 @@ static int counter_width = 32; #define IS_ENABLE(val) (val & (1 << 20) ) static unsigned long reset_value[OP_MAX_COUNTER]; int ppro_has_global_ctrl = 0; -extern int is_passive(struct domain *d); static void ppro_fill_in_addresses(struct op_msrs * const msrs) { @@ -124,11 +123,6 @@ static void ppro_setup_ctrs(struct op_ms } } -extern void xenoprof_log_event(struct vcpu *v, struct cpu_user_regs * regs, - unsigned long eip, int mode, int event); -extern int xenoprofile_get_mode(struct vcpu *v, - struct cpu_user_regs * const regs); - static int ppro_check_ctrs(unsigned int const cpu, struct op_msrs const * const msrs, struct cpu_user_regs * const regs) diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/pci.c --- a/xen/arch/x86/pci.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/pci.c Wed Oct 07 07:50:20 2009 +0100 @@ -5,6 +5,7 @@ */ #include <xen/spinlock.h> +#include <xen/pci.h> #include <asm/io.h> static DEFINE_SPINLOCK(pci_config_lock); diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/setup.c --- a/xen/arch/x86/setup.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/setup.c Wed Oct 07 07:50:20 2009 +0100 @@ -38,8 +38,9 @@ #include <asm/edd.h> #include <xsm/xsm.h> #include <asm/tboot.h> - -int __init bzimage_headroom(char *image_start, unsigned long image_length); +#include <asm/bzimage.h> /* for bzimage_headroom */ +#include <asm/mach-generic/mach_apic.h> /* for generic_apic_probe */ +#include <asm/setup.h> #if defined(CONFIG_X86_64) #define BOOTSTRAP_DIRECTMAP_END (1UL << 32) /* 4GB */ @@ -48,9 +49,6 @@ int __init bzimage_headroom(char *image_ #define BOOTSTRAP_DIRECTMAP_END (1UL << 30) /* 1GB */ #define maddr_to_bootstrap_virt(m) ((void *)(long)(m)) #endif - -extern void generic_apic_probe(void); -extern void numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn); extern u16 boot_edid_caps; extern u8 boot_edid_info[128]; @@ -79,12 +77,10 @@ custom_param("acpi", parse_acpi_param); /* **** Linux config option: propagated to domain0. */ /* acpi_skip_timer_override: Skip IRQ0 overrides. */ -extern int acpi_skip_timer_override; boolean_param("acpi_skip_timer_override", acpi_skip_timer_override); /* **** Linux config option: propagated to domain0. */ /* noapic: Disable IOAPIC setup. */ -extern int skip_ioapic_setup; boolean_param("noapic", skip_ioapic_setup); /* **** Linux config option: propagated to domain0. */ @@ -103,14 +99,6 @@ unsigned long xenheap_initial_phys_start unsigned long xenheap_initial_phys_start, xenheap_phys_end; #endif -extern void arch_init_memory(void); -extern void init_IRQ(void); -extern void early_time_init(void); -extern void early_cpu_init(void); -extern void vesa_init(void); -extern void vesa_mtrr_init(void); -extern void init_tmem(void); - DEFINE_PER_CPU_READ_MOSTLY(struct desc_struct *, gdt_table) = boot_cpu_gdt_table; #ifdef CONFIG_COMPAT DEFINE_PER_CPU_READ_MOSTLY(struct desc_struct *, compat_gdt_table) @@ -203,7 +191,7 @@ static void free_xen_data(char *s, char #endif } -extern char __init_begin[], __bss_start[]; +extern char __init_begin[], __init_end[], __bss_start[]; extern char __per_cpu_start[], __per_cpu_data_end[]; static void __init percpu_init_areas(void) @@ -390,7 +378,7 @@ static void __init parse_video_info(void } } -void __init kexec_reserve_area(struct e820map *e820) +static void __init kexec_reserve_area(struct e820map *e820) { unsigned long kdump_start = kexec_crash_area.start; unsigned long kdump_size = kexec_crash_area.size; @@ -418,8 +406,6 @@ void __init kexec_reserve_area(struct e8 void init_done(void) { - extern char __init_begin[], __init_end[]; - /* Free (or page-protect) the init areas. */ memset(__init_begin, 0xcc, __init_end - __init_begin); /* int3 poison */ free_xen_data(__init_begin, __init_end); @@ -457,7 +443,6 @@ void __init __start_xen(unsigned long mb .stop_bits = 1 }; - extern void early_page_fault(void); set_intr_gate(TRAP_page_fault, &early_page_fault); /* Parse the command-line options. */ diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/time.c --- a/xen/arch/x86/time.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/time.c Wed Oct 07 07:50:20 2009 +0100 @@ -31,6 +31,7 @@ #include <asm/div64.h> #include <asm/hpet.h> #include <io_ports.h> +#include <asm/setup.h> /* for early_time_init */ /* opt_clocksource: Force clocksource to one of: pit, hpet, cyclone, acpi. */ static char __initdata opt_clocksource[10]; diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/traps.c --- a/xen/arch/x86/traps.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/traps.c Wed Oct 07 07:50:20 2009 +0100 @@ -111,8 +111,6 @@ DECLARE_TRAP_HANDLER(alignment_check); DECLARE_TRAP_HANDLER(alignment_check); DECLARE_TRAP_HANDLER(spurious_interrupt_bug); -long do_set_debugreg(int reg, unsigned long value); -unsigned long do_get_debugreg(int reg); void (*ioemul_handle_quirk)( u8 opcode, char *io_emul_stub, struct cpu_user_regs *regs); diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/x86_32/mm.c --- a/xen/arch/x86/x86_32/mm.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/x86_32/mm.c Wed Oct 07 07:50:20 2009 +0100 @@ -28,6 +28,7 @@ #include <asm/page.h> #include <asm/flushtlb.h> #include <asm/fixmap.h> +#include <asm/setup.h> #include <public/memory.h> l2_pgentry_t __attribute__ ((__section__ (".bss.page_aligned"))) @@ -42,8 +43,6 @@ static unsigned long mpt_size; void *alloc_xen_pagetable(void) { - extern int early_boot; - extern unsigned long xenheap_initial_phys_start; unsigned long mfn; if ( !early_boot ) diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/x86_64/mm.c --- a/xen/arch/x86/x86_64/mm.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/x86_64/mm.c Wed Oct 07 07:50:20 2009 +0100 @@ -31,6 +31,7 @@ #include <asm/fixmap.h> #include <asm/hypercall.h> #include <asm/msr.h> +#include <asm/setup.h> #include <public/memory.h> /* Parameters for PFN/MADDR compression. */ @@ -74,7 +75,6 @@ int __mfn_valid(unsigned long mfn) void *alloc_xen_pagetable(void) { - extern int early_boot; unsigned long mfn; if ( !early_boot ) diff -r f254f4a9a02c -r 30bfa1d8895d xen/arch/x86/x86_64/pci.c --- a/xen/arch/x86/x86_64/pci.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/arch/x86/x86_64/pci.c Wed Oct 07 07:50:20 2009 +0100 @@ -10,13 +10,6 @@ #define PCI_CONF_ADDRESS(bus, dev, func, reg) \ (0x80000000 | (bus << 16) | (dev << 11) | (func << 8) | (reg & ~3)) - -int pci_mmcfg_read(unsigned int seg, unsigned int bus, - unsigned int devfn, int reg, int len, u32 *value); -int pci_mmcfg_write(unsigned int seg, unsigned int bus, - unsigned int devfn, int reg, int len, u32 value); -uint32_t pci_conf_read(uint32_t cf8, uint8_t offset, uint8_t bytes); -void pci_conf_write(uint32_t cf8, uint8_t offset, uint8_t bytes, uint32_t data); uint8_t pci_conf_read8( unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg) diff -r f254f4a9a02c -r 30bfa1d8895d xen/common/sysctl.c --- a/xen/common/sysctl.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/common/sysctl.c Wed Oct 07 07:50:20 2009 +0100 @@ -20,13 +20,12 @@ #include <xen/guest_access.h> #include <xen/keyhandler.h> #include <asm/current.h> +#include <xen/hypercall.h> #include <public/sysctl.h> #include <asm/numa.h> #include <xen/nodemask.h> #include <xsm/xsm.h> - -extern int do_get_pm_info(struct xen_sysctl_get_pmstat *op); -extern int do_pm_op(struct xen_sysctl_pm_op *op); +#include <xen/pmstat.h> extern long arch_do_sysctl( struct xen_sysctl *op, XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl); diff -r f254f4a9a02c -r 30bfa1d8895d xen/common/xenoprof.c --- a/xen/common/xenoprof.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/common/xenoprof.c Wed Oct 07 07:50:20 2009 +0100 @@ -16,6 +16,7 @@ #include <public/xenoprof.h> #include <xen/paging.h> #include <xsm/xsm.h> +#include <xen/hypercall.h> /* Limit amount of pages used for shared buffer (per domain) */ #define MAX_OPROF_SHARED_PAGES 32 diff -r f254f4a9a02c -r 30bfa1d8895d xen/drivers/acpi/pmstat.c --- a/xen/drivers/acpi/pmstat.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/drivers/acpi/pmstat.c Wed Oct 07 07:50:20 2009 +0100 @@ -41,12 +41,9 @@ #include <public/sysctl.h> #include <acpi/cpufreq/cpufreq.h> +#include <xen/pmstat.h> struct pm_px *__read_mostly cpufreq_statistic_data[NR_CPUS]; - -extern uint32_t pmstat_get_cx_nr(uint32_t cpuid); -extern int pmstat_get_cx_stat(uint32_t cpuid, struct pm_cx_stat *stat); -extern int pmstat_reset_cx_stat(uint32_t cpuid); extern struct list_head cpufreq_governor_list; diff -r f254f4a9a02c -r 30bfa1d8895d xen/drivers/char/console.c --- a/xen/drivers/char/console.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/drivers/char/console.c Wed Oct 07 07:50:20 2009 +0100 @@ -34,6 +34,7 @@ #include <asm/div64.h> #include <xsm/xsm.h> #include <public/sysctl.h> +#include <xen/hypercall.h> /* for do_console_io */ /* console: comma-separated list of console outputs. */ static char __initdata opt_console[30] = OPT_CONSOLE_STR; diff -r f254f4a9a02c -r 30bfa1d8895d xen/drivers/passthrough/amd/iommu_detect.c --- a/xen/drivers/passthrough/amd/iommu_detect.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/drivers/passthrough/amd/iommu_detect.c Wed Oct 07 07:50:20 2009 +0100 @@ -27,7 +27,6 @@ #include <asm/hvm/svm/amd-iommu-proto.h> #include <asm/hvm/svm/amd-iommu-acpi.h> -extern struct list_head amd_iommu_head; unsigned short last_bdf = 0; static int __init get_iommu_msi_capabilities(u8 bus, u8 dev, u8 func, diff -r f254f4a9a02c -r 30bfa1d8895d xen/drivers/passthrough/amd/pci_amd_iommu.c --- a/xen/drivers/passthrough/amd/pci_amd_iommu.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c Wed Oct 07 07:50:20 2009 +0100 @@ -21,6 +21,7 @@ #include <xen/sched.h> #include <xen/pci.h> #include <xen/pci_regs.h> +#include <asm/hvm/iommu.h> #include <asm/amd-iommu.h> #include <asm/hvm/svm/amd-iommu-proto.h> diff -r f254f4a9a02c -r 30bfa1d8895d xen/drivers/passthrough/iommu.c --- a/xen/drivers/passthrough/iommu.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/drivers/passthrough/iommu.c Wed Oct 07 07:50:20 2009 +0100 @@ -21,8 +21,6 @@ static void parse_iommu_param(char *s); static int iommu_populate_page_table(struct domain *d); -int intel_vtd_setup(void); -int amd_iov_detect(void); /* * The 'iommu' parameter enables the IOMMU. Optional comma separated diff -r f254f4a9a02c -r 30bfa1d8895d xen/drivers/passthrough/vtd/dmar.c --- a/xen/drivers/passthrough/vtd/dmar.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/drivers/passthrough/vtd/dmar.c Wed Oct 07 07:50:20 2009 +0100 @@ -31,6 +31,7 @@ #include <asm/string.h> #include "dmar.h" #include "iommu.h" +#include "extern.h" #undef PREFIX #define PREFIX VTDPREFIX "ACPI DMAR:" diff -r f254f4a9a02c -r 30bfa1d8895d xen/drivers/passthrough/vtd/utils.c --- a/xen/drivers/passthrough/vtd/utils.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/drivers/passthrough/vtd/utils.c Wed Oct 07 07:50:20 2009 +0100 @@ -100,7 +100,7 @@ void print_iommu_regs(struct acpi_drhd_u dmar_readl(iommu->reg,DMAR_FEUADDR_REG)); } -u32 get_level_index(unsigned long gmfn, int level) +static u32 get_level_index(unsigned long gmfn, int level) { while ( --level ) gmfn = gmfn >> LEVEL_STRIDE; diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/acpi/acglobal.h --- a/xen/include/acpi/acglobal.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/acpi/acglobal.h Wed Oct 07 07:50:20 2009 +0100 @@ -243,11 +243,15 @@ extern const char *acpi_gbl_region_types /* Exception codes */ +#ifndef DEFINE_ACPI_GLOBALS + extern char const *acpi_gbl_exception_names_env[]; extern char const *acpi_gbl_exception_names_pgm[]; extern char const *acpi_gbl_exception_names_tbl[]; extern char const *acpi_gbl_exception_names_aml[]; extern char const *acpi_gbl_exception_names_ctrl[]; + +#endif /***************************************************************************** * diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/acpi/platform/aclinux.h --- a/xen/include/acpi/platform/aclinux.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/acpi/platform/aclinux.h Wed Oct 07 07:50:20 2009 +0100 @@ -76,11 +76,6 @@ #define acpi_thread_id struct vcpu * -static inline acpi_thread_id acpi_os_get_thread_id(void) -{ - return current; -} - #define ACPI_ALLOCATE(a) xmalloc_bytes(a) #define ACPI_ALLOCATE_ZEROED(a) ({ \ void *p = xmalloc_bytes(a); \ diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/acpi.h --- a/xen/include/asm-x86/acpi.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/asm-x86/acpi.h Wed Oct 07 07:50:20 2009 +0100 @@ -104,8 +104,6 @@ static inline void disable_acpi(void) /* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */ #define FIX_ACPI_PAGES 4 -extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); - static inline void acpi_noirq_set(void) { acpi_noirq = 1; } static inline void acpi_disable_pci(void) { @@ -116,6 +114,7 @@ static inline int acpi_irq_balance_set(c /* routines for saving/restoring kernel state */ extern int acpi_save_state_mem(void); +extern int acpi_save_state_disk(void); extern void acpi_restore_state_mem(void); extern unsigned long acpi_wakeup_address; @@ -130,16 +129,6 @@ extern int acpi_scan_nodes(u64 start, u6 #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) #ifdef CONFIG_ACPI_SLEEP - -/* routines for saving/restoring kernel state */ -extern int acpi_save_state_mem(void); -extern int acpi_save_state_disk(void); -extern void acpi_restore_state_mem(void); - -extern unsigned long acpi_wakeup_address; - -/* early initialization routine */ -extern void acpi_reserve_bootmem(void); extern struct acpi_sleep_info acpi_sinfo; #define acpi_video_flags bootsym(video_flags) @@ -170,4 +159,10 @@ void acpi_mmcfg_init(void); /* Incremented whenever we transition through S3. Value is 1 during boot. */ extern uint32_t system_reset_counter; +void hvm_acpi_power_button(struct domain *d); + +/* suspend/resume */ +void save_rest_processor_state(void); +void restore_rest_processor_state(void); + #endif /*__X86_ASM_ACPI_H*/ diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/amd-iommu.h --- a/xen/include/asm-x86/amd-iommu.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/asm-x86/amd-iommu.h Wed Oct 07 07:50:20 2009 +0100 @@ -29,8 +29,6 @@ #define iommu_found() (!list_empty(&amd_iommu_head)) extern struct list_head amd_iommu_head; - -extern int __init amd_iov_detect(void); struct table_struct { void *buffer; diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/bzimage.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xen/include/asm-x86/bzimage.h Wed Oct 07 07:50:20 2009 +0100 @@ -0,0 +1,12 @@ +#ifndef __X86_BZIMAGE_H__ +#define __X86_BZIMAGE_H__ + +#include <xen/config.h> + +int __init bzimage_headroom(char *image_start, unsigned long image_length); + +int __init bzimage_parse(char *image_base, + char **image_start, + unsigned long *image_len); + +#endif /* __X86_BZIMAGE_H__ */ diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/domain.h --- a/xen/include/asm-x86/domain.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/asm-x86/domain.h Wed Oct 07 07:50:20 2009 +0100 @@ -456,6 +456,9 @@ int construct_dom0( unsigned long initrd_start, unsigned long initrd_len, char *cmdline); +extern unsigned long initial_images_nrpages(void); +extern void discard_initial_images(void); + #endif /* __ASM_DOMAIN_H__ */ /* diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/hpet.h --- a/xen/include/asm-x86/hpet.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/asm-x86/hpet.h Wed Oct 07 07:50:20 2009 +0100 @@ -58,6 +58,8 @@ #define hpet_write32(y,x) \ (*(volatile u32 *)(fix_to_virt(FIX_HPET_BASE) + (x)) = (y)) +extern unsigned long hpet_address; + /* * Detect and initialise HPET hardware: return counter update frequency. * Return value is zero if HPET is unavailable. diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/hypercall.h --- a/xen/include/asm-x86/hypercall.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/asm-x86/hypercall.h Wed Oct 07 07:50:20 2009 +0100 @@ -6,6 +6,8 @@ #define __ASM_X86_HYPERCALL_H__ #include <public/physdev.h> +#include <public/arch-x86/xen-mca.h> /* for do_mca */ +#include <public/domctl.h> /* for arch_do_domctl */ #include <xen/types.h> /* @@ -27,10 +29,6 @@ extern long extern long do_event_channel_op_compat( XEN_GUEST_HANDLE(evtchn_op_t) uop); - -extern long -do_physdev_op_compat( - XEN_GUEST_HANDLE(physdev_op_t) uop); extern long do_set_trap_table( @@ -71,6 +69,9 @@ do_update_descriptor( u64 pa, u64 desc); +extern long +do_mca(XEN_GUEST_HANDLE(xen_mc_t) u_xen_mc); + extern int do_update_va_mapping( unsigned long va, @@ -103,6 +104,11 @@ extern long extern long arch_do_vcpu_op( int cmd, struct vcpu *v, XEN_GUEST_HANDLE(void) arg); + +extern long +arch_do_domctl( + struct xen_domctl *domctl, + XEN_GUEST_HANDLE(xen_domctl_t) u_domctl); extern int do_kexec( diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/io_apic.h --- a/xen/include/asm-x86/io_apic.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/asm-x86/io_apic.h Wed Oct 07 07:50:20 2009 +0100 @@ -119,15 +119,6 @@ struct IO_APIC_route_entry { /* I/O APIC entries */ extern struct mpc_config_ioapic mp_ioapics[MAX_IO_APICS]; -/* # of MP IRQ source entries */ -extern int mp_irq_entries; - -/* MP IRQ source entries */ -extern struct mpc_config_intsrc mp_irqs[MAX_IRQ_SOURCES]; - -/* non-0 if default (table-less) MP configuration */ -extern int mpc_default_type; - /* Only need to remap ioapic RTE (reg: 10~3Fh) */ #define ioapic_reg_remapped(reg) (iommu_enabled && ((reg) >= 0x10)) diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/irq.h --- a/xen/include/asm-x86/irq.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/asm-x86/irq.h Wed Oct 07 07:50:20 2009 +0100 @@ -76,6 +76,19 @@ fastcall void cmci_interrupt(void); fastcall void cmci_interrupt(void); fastcall void irq_move_cleanup_interrupt(void); +fastcall void smp_event_check_interrupt(struct cpu_user_regs *regs); +fastcall void smp_invalidate_interrupt(void); +fastcall void smp_call_function_interrupt(struct cpu_user_regs *regs); +fastcall void smp_apic_timer_interrupt(struct cpu_user_regs *regs); +fastcall void smp_error_interrupt(struct cpu_user_regs *regs); +fastcall void smp_pmu_apic_interrupt(struct cpu_user_regs *regs); +fastcall void smp_spurious_interrupt(struct cpu_user_regs *regs); +fastcall void smp_thermal_interrupt(struct cpu_user_regs *regs); +fastcall void smp_cmci_interrupt(struct cpu_user_regs *regs); +fastcall void smp_irq_move_cleanup_interrupt(struct cpu_user_regs *regs); + +asmlinkage void do_IRQ(struct cpu_user_regs *regs); + void disable_8259A_irq(unsigned int irq); void enable_8259A_irq(unsigned int irq); int i8259A_irq_pending(unsigned int irq); diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/mach-generic/mach_apic.h --- a/xen/include/asm-x86/mach-generic/mach_apic.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/asm-x86/mach-generic/mach_apic.h Wed Oct 07 07:50:20 2009 +0100 @@ -53,6 +53,7 @@ static inline int multi_timer_check(int return 0; } +extern void generic_apic_probe(void); extern void generic_bigsmp_probe(void); /* diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/mpspec.h --- a/xen/include/asm-x86/mpspec.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/asm-x86/mpspec.h Wed Oct 07 07:50:20 2009 +0100 @@ -16,13 +16,10 @@ extern int smp_found_config; extern int smp_found_config; extern void find_smp_config (void); extern void get_smp_config (void); -extern int nr_ioapics; extern int apic_version [MAX_APICS]; -extern int mp_bus_id_to_type [MAX_MP_BUSSES]; extern int mp_irq_entries; extern struct mpc_config_intsrc mp_irqs [MAX_IRQ_SOURCES]; extern int mpc_default_type; -extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES]; extern unsigned long mp_lapic_addr; extern int pic_mode; extern int using_apic_timer; diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/mtrr.h --- a/xen/include/asm-x86/mtrr.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/asm-x86/mtrr.h Wed Oct 07 07:50:20 2009 +0100 @@ -76,4 +76,14 @@ extern void mtrr_aps_sync_end(void); extern void mtrr_aps_sync_end(void); extern void mtrr_bp_restore(void); +extern bool_t mtrr_var_range_msr_set(struct mtrr_state *v, + uint32_t msr, uint64_t msr_content); +extern bool_t mtrr_fix_range_msr_set(struct mtrr_state *v, + uint32_t row, uint64_t msr_content); +extern bool_t mtrr_def_type_msr_set(struct mtrr_state *v, uint64_t msr_content); +extern bool_t pat_msr_set(uint64_t *pat, uint64_t msr); + +bool_t is_var_mtrr_overlapped(struct mtrr_state *m); +bool_t mtrr_pat_not_equal(struct vcpu *vd, struct vcpu *vs); + #endif /* __ASM_X86_MTRR_H__ */ diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/setup.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xen/include/asm-x86/setup.h Wed Oct 07 07:50:20 2009 +0100 @@ -0,0 +1,29 @@ +#ifndef __X86_SETUP_H_ +#define __X86_SETUP_H_ + +extern int early_boot; +extern unsigned long xenheap_initial_phys_start; + +void init_done(void); + +void early_cpu_init(void); +void early_time_init(void); +void early_page_fault(void); + +int intel_cpu_init(void); +int amd_init_cpu(void); +int cyrix_init_cpu(void); +int nsc_init_cpu(void); +int centaur_init_cpu(void); +int transmeta_init_cpu(void); + +void numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn); +void arch_init_memory(void); +void subarch_init_memory(void); + +void init_IRQ(void); +void init_tmem(void); +void vesa_init(void); +void vesa_mtrr_init(void); + +#endif diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/smp.h --- a/xen/include/asm-x86/smp.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/asm-x86/smp.h Wed Oct 07 07:50:20 2009 +0100 @@ -31,7 +31,6 @@ */ extern void smp_alloc_memory(void); -extern int pic_mode; DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); DECLARE_PER_CPU(cpumask_t, cpu_core_map); @@ -81,7 +80,7 @@ static inline void enable_nonboot_cpus(v extern cpumask_t cpu_callout_map; extern cpumask_t cpu_callin_map; -extern cpumask_t cpu_possible_map; +/* cpu_possible_map declared in <xen/cpumask.h> */ /* We don't mark CPUs online until __cpu_up(), so we need another measure */ static inline int num_booting_cpus(void) diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/x86_32/asm_defns.h --- a/xen/include/asm-x86/x86_32/asm_defns.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/asm-x86/x86_32/asm_defns.h Wed Oct 07 07:50:20 2009 +0100 @@ -106,7 +106,6 @@ 1: addl $4,%esp; #define BUILD_SMP_INTERRUPT(x,v) XBUILD_SMP_INTERRUPT(x,v) #define XBUILD_SMP_INTERRUPT(x,v) \ -asmlinkage void x(void); \ __asm__( \ "\n"__ALIGN_STR"\n" \ ".globl " STR(x) "\n\t" \ diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/x86_64/asm_defns.h --- a/xen/include/asm-x86/x86_64/asm_defns.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/asm-x86/x86_64/asm_defns.h Wed Oct 07 07:50:20 2009 +0100 @@ -89,7 +89,6 @@ 1: addq $8,%rsp; #define BUILD_SMP_INTERRUPT(x,v) XBUILD_SMP_INTERRUPT(x,v) #define XBUILD_SMP_INTERRUPT(x,v) \ -asmlinkage void x(void); \ __asm__( \ "\n"__ALIGN_STR"\n" \ ".globl " STR(x) "\n\t" \ diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/asm-x86/x86_64/page.h --- a/xen/include/asm-x86/x86_64/page.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/asm-x86/x86_64/page.h Wed Oct 07 07:50:20 2009 +0100 @@ -31,9 +31,6 @@ #include <xen/config.h> #include <asm/types.h> - -/* Physical address where Xen was relocated to. */ -extern unsigned long xen_phys_start; extern unsigned long max_pdx; extern unsigned long pfn_pdx_bottom_mask, ma_va_bottom_mask; diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/xen/cpuidle.h --- a/xen/include/xen/cpuidle.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/xen/cpuidle.h Wed Oct 07 07:50:20 2009 +0100 @@ -84,5 +84,6 @@ struct cpuidle_governor }; extern struct cpuidle_governor *cpuidle_current_governor; +void cpuidle_disable_deep_cstate(void); #endif /* _XEN_CPUIDLE_H */ diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/xen/hypercall.h --- a/xen/include/xen/hypercall.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/xen/hypercall.h Wed Oct 07 07:50:20 2009 +0100 @@ -121,6 +121,9 @@ do_tmem_op( do_tmem_op( XEN_GUEST_HANDLE(tmem_op_t) uops); +extern int +do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg); + #ifdef CONFIG_COMPAT extern int @@ -140,6 +143,9 @@ compat_vcpu_op( int vcpuid, XEN_GUEST_HANDLE(void) arg); +extern int +compat_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg); + #endif #endif /* __XEN_HYPERCALL_H__ */ diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/xen/irq.h --- a/xen/include/xen/irq.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/xen/irq.h Wed Oct 07 07:50:20 2009 +0100 @@ -120,8 +120,6 @@ extern struct irq_cfg irq_cfg[]; extern struct irq_cfg irq_cfg[]; #else -extern struct irq_desc *irq_desc; - extern int setup_irq(unsigned int irq, struct irqaction *); extern void release_irq(unsigned int irq); extern int request_irq(unsigned int irq, diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/xen/pci.h --- a/xen/include/xen/pci.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/xen/pci.h Wed Oct 07 07:50:20 2009 +0100 @@ -104,6 +104,8 @@ void pci_conf_write32( void pci_conf_write32( unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg, uint32_t data); +uint32_t pci_conf_read(uint32_t cf8, uint8_t offset, uint8_t bytes); +void pci_conf_write(uint32_t cf8, uint8_t offset, uint8_t bytes, uint32_t data); int pci_mmcfg_read(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 *value); int pci_mmcfg_write(unsigned int seg, unsigned int bus, diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/xen/pmstat.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xen/include/xen/pmstat.h Wed Oct 07 07:50:20 2009 +0100 @@ -0,0 +1,16 @@ +#ifndef __XEN_PMSTAT_H_ +#define __XEN_PMSTAT_H_ + +#include <xen/types.h> +#include <public/platform.h> /* for struct xen_processor_power */ +#include <public/sysctl.h> /* for struct pm_cx_stat */ + +long set_cx_pminfo(uint32_t cpu, struct xen_processor_power *power); +uint32_t pmstat_get_cx_nr(uint32_t cpuid); +int pmstat_get_cx_stat(uint32_t cpuid, struct pm_cx_stat *stat); +int pmstat_reset_cx_stat(uint32_t cpuid); + +int do_get_pm_info(struct xen_sysctl_get_pmstat *op); +int do_pm_op(struct xen_sysctl_pm_op *op); + +#endif /* __XEN_PMSTAT_H_ */ diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/xen/xenoprof.h --- a/xen/include/xen/xenoprof.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/xen/xenoprof.h Wed Oct 07 07:50:20 2009 +0100 @@ -64,10 +64,10 @@ struct xenoprof { #endif struct domain; +int is_active(struct domain *d); int is_passive(struct domain *d); void free_xenoprof_pages(struct domain *d); -int do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg); int xenoprof_add_trace(struct domain *d, struct vcpu *v, unsigned long eip, int mode); @@ -77,4 +77,8 @@ int acquire_pmu_ownship(int pmu_ownershi int acquire_pmu_ownship(int pmu_ownership); void release_pmu_ownship(int pmu_ownership); +void xenoprof_log_event(struct vcpu *vcpu, + struct cpu_user_regs * regs, unsigned long eip, + int mode, int event); + #endif /* __XEN__XENOPROF_H__ */ diff -r f254f4a9a02c -r 30bfa1d8895d xen/include/xsm/xsm.h --- a/xen/include/xsm/xsm.h Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/include/xsm/xsm.h Wed Oct 07 07:50:20 2009 +0100 @@ -20,8 +20,6 @@ typedef void xsm_op_t; DEFINE_XEN_GUEST_HANDLE(xsm_op_t); - -extern long do_xsm_op (XEN_GUEST_HANDLE(xsm_op_t) op); #ifdef XSM_ENABLE #define xsm_call(fn) xsm_ops->fn diff -r f254f4a9a02c -r 30bfa1d8895d xen/xsm/xsm_core.c --- a/xen/xsm/xsm_core.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/xsm/xsm_core.c Wed Oct 07 07:50:20 2009 +0100 @@ -14,6 +14,7 @@ #include <xen/errno.h> #include <xen/lib.h> +#include <xen/hypercall.h> #include <xsm/xsm.h> #ifdef XSM_ENABLE diff -r f254f4a9a02c -r 30bfa1d8895d xen/xsm/xsm_policy.c --- a/xen/xsm/xsm_policy.c Wed Oct 07 07:47:50 2009 +0100 +++ b/xen/xsm/xsm_policy.c Wed Oct 07 07:50:20 2009 +0100 @@ -19,6 +19,7 @@ * */ +#define XSM_ENABLE #include <xsm/xsm.h> #include <xen/multiboot.h> _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |