diff options
-rw-r--r-- | xen/arch/i386/acpitable.c | 4 | ||||
-rw-r--r-- | xen/arch/i386/apic.c | 8 | ||||
-rw-r--r-- | xen/arch/i386/boot/boot.S | 2 | ||||
-rw-r--r-- | xen/arch/i386/io_apic.c | 3 | ||||
-rw-r--r-- | xen/arch/i386/mpparse.c | 1 | ||||
-rw-r--r-- | xen/arch/i386/pci-i386.c | 2 | ||||
-rw-r--r-- | xen/arch/i386/setup.c | 6 | ||||
-rw-r--r-- | xen/arch/i386/smp.c | 3 | ||||
-rw-r--r-- | xen/arch/i386/smpboot.c | 4 | ||||
-rw-r--r-- | xen/arch/i386/trampoline.S | 4 | ||||
-rw-r--r-- | xen/drivers/block/xen_block.c | 2 | ||||
-rw-r--r-- | xen/drivers/pci/quirks.c | 2 | ||||
-rw-r--r-- | xen/drivers/pci/setup-res.c | 2 | ||||
-rw-r--r-- | xen/include/asm-i386/apic.h | 4 | ||||
-rw-r--r-- | xen/include/asm-i386/mpspec.h | 1 | ||||
-rw-r--r-- | xen/include/asm-i386/time.h | 2 | ||||
-rw-r--r-- | xen/include/xeno/time.h | 1 | ||||
-rw-r--r-- | xen/net/dev.c | 2 |
18 files changed, 40 insertions, 13 deletions
diff --git a/xen/arch/i386/acpitable.c b/xen/arch/i386/acpitable.c index 1078db3eee..a24050bb8b 100644 --- a/xen/arch/i386/acpitable.c +++ b/xen/arch/i386/acpitable.c @@ -41,6 +41,8 @@ #include <asm/page.h> /*#include <asm/pgtable.h>*/ +#ifdef CONFIG_X86_IO_APIC + #include "acpitable.h" static acpi_table_handler acpi_boot_ops[ACPI_TABLE_COUNT]; @@ -547,3 +549,5 @@ config_acpi_tables(void) printk("Enabling the CPU's according to the ACPI table\n"); } } + +#endif /* CONFIG_X86_IO_APIC */ diff --git a/xen/arch/i386/apic.c b/xen/arch/i386/apic.c index 35adba4ae1..2621bd1109 100644 --- a/xen/arch/i386/apic.c +++ b/xen/arch/i386/apic.c @@ -45,9 +45,8 @@ #include <asm/mpspec.h> #include <asm/pgalloc.h> #include <asm/hardirq.h> - +#include <asm/apic.h> #include <xeno/ac_timer.h> - #include <xeno/perfc.h> #undef APIC_TIME_TRACE @@ -839,7 +838,10 @@ int __init APIC_init_uniprocessor (void) connect_bsp_APIC(); - cpu_online_map = phys_cpu_present_map = 1; +#ifdef CONFIG_SMP + cpu_online_map = 1; +#endif + phys_cpu_present_map = 1; apic_write_around(APIC_ID, boot_cpu_physical_apicid); apic_pm_init2(); diff --git a/xen/arch/i386/boot/boot.S b/xen/arch/i386/boot/boot.S index 47bdb27519..1ef335d030 100644 --- a/xen/arch/i386/boot/boot.S +++ b/xen/arch/i386/boot/boot.S @@ -65,6 +65,7 @@ hal_entry: and $0x7f,%ecx /* disable GLOBAL bit */ mov %ecx,%cr4 +#ifdef CONFIG_SMP /* Is this a non-boot processor? */ cmp $(SECONDARY_CPU_FLAG),%ebx jne continue_boot_cpu @@ -72,6 +73,7 @@ hal_entry: call start_paging lidt idt_descr jmp initialize_secondary +#endif continue_boot_cpu: add $__PAGE_OFFSET,%ebx diff --git a/xen/arch/i386/io_apic.c b/xen/arch/i386/io_apic.c index fbea77e646..5935864c71 100644 --- a/xen/arch/i386/io_apic.c +++ b/xen/arch/i386/io_apic.c @@ -32,6 +32,7 @@ #include <asm/desc.h> #include <asm/smpboot.h> +#ifdef CONFIG_X86_IO_APIC static unsigned int nmi_watchdog; /* XXXX XEN */ @@ -1749,3 +1750,5 @@ void __init setup_IO_APIC(void) check_timer(); print_IO_APIC(); } + +#endif /* CONFIG_X86_IO_APIC */ diff --git a/xen/arch/i386/mpparse.c b/xen/arch/i386/mpparse.c index 0e2ca870a9..c0776a7387 100644 --- a/xen/arch/i386/mpparse.c +++ b/xen/arch/i386/mpparse.c @@ -18,6 +18,7 @@ #include <asm/io.h> #include <xeno/irq.h> #include <xeno/smp.h> +#include <asm/apic.h> #include <asm/mpspec.h> #include <asm/pgalloc.h> #include <asm/smpboot.h> diff --git a/xen/arch/i386/pci-i386.c b/xen/arch/i386/pci-i386.c index 7a213d824c..7eca534aec 100644 --- a/xen/arch/i386/pci-i386.c +++ b/xen/arch/i386/pci-i386.c @@ -86,7 +86,7 @@ */ #include <linux/types.h> -/*#include <linux/kernel.h>*/ +#include <linux/lib.h> #include <linux/pci.h> #include <linux/init.h> #include <linux/ioport.h> diff --git a/xen/arch/i386/setup.c b/xen/arch/i386/setup.c index 6b2c380adc..bbd2d65603 100644 --- a/xen/arch/i386/setup.c +++ b/xen/arch/i386/setup.c @@ -309,12 +309,16 @@ void __init start_of_day(void) identify_cpu(&boot_cpu_data); /* get CPU type info */ if ( cpu_has_fxsr ) set_in_cr4(X86_CR4_OSFXSR); if ( cpu_has_xmm ) set_in_cr4(X86_CR4_OSXMMEXCPT); +#ifdef CONFIG_SMP find_smp_config(); /* find ACPI tables */ smp_alloc_memory(); /* trampoline which other CPUs jump at */ +#endif paging_init(); /* not much here now, but sets up fixmap */ +#ifdef CONFIG_SMP if ( smp_found_config ) get_smp_config(); +#endif domain_init(); - scheduler_init(); + scheduler_init(); trap_init(); init_IRQ(); /* installs simple interrupt wrappers. Starts HZ clock. */ time_init(); /* installs software handler for HZ clock. */ diff --git a/xen/arch/i386/smp.c b/xen/arch/i386/smp.c index 008d1aa83a..bc0952fc31 100644 --- a/xen/arch/i386/smp.c +++ b/xen/arch/i386/smp.c @@ -17,6 +17,8 @@ #include <asm/pgalloc.h> #include <asm/smpboot.h> +#ifdef CONFIG_SMP + /* * Some notes on x86 processor bugs affecting SMP operation: * @@ -576,3 +578,4 @@ asmlinkage void smp_call_function_interrupt(void) } } +#endif /* CONFIG_SMP */ diff --git a/xen/arch/i386/smpboot.c b/xen/arch/i386/smpboot.c index 401b8f8020..4f198941f5 100644 --- a/xen/arch/i386/smpboot.c +++ b/xen/arch/i386/smpboot.c @@ -46,6 +46,8 @@ #include <xeno/delay.h> #include <xeno/lib.h> +#ifdef CONFIG_SMP + /* Set if we find a B stepping CPU */ static int smp_b_stepping; @@ -960,3 +962,5 @@ void __init smp_boot_cpus(void) smp_done: ; } + +#endif /* CONFIG_SMP */ diff --git a/xen/arch/i386/trampoline.S b/xen/arch/i386/trampoline.S index f0beef725a..79f58d746c 100644 --- a/xen/arch/i386/trampoline.S +++ b/xen/arch/i386/trampoline.S @@ -18,6 +18,8 @@ #include <xeno/config.h> #include <asm/page.h> +#ifdef CONFIG_SMP + .data .code16 @@ -52,3 +54,5 @@ gdt_48: .globl SYMBOL_NAME(trampoline_end) SYMBOL_NAME_LABEL(trampoline_end) + +#endif /* CONFIG_SMP */ diff --git a/xen/drivers/block/xen_block.c b/xen/drivers/block/xen_block.c index a49817d46f..156dcbb94c 100644 --- a/xen/drivers/block/xen_block.c +++ b/xen/drivers/block/xen_block.c @@ -13,7 +13,7 @@ #include <hypervisor-ifs/block.h> #include <hypervisor-ifs/hypervisor-if.h> #include <asm-i386/io.h> -#include <asm/spinlock.h> +#include <xeno/spinlock.h> #include <xeno/keyhandler.h> #include <xeno/interrupt.h> #include <xeno/segment.h> diff --git a/xen/drivers/pci/quirks.c b/xen/drivers/pci/quirks.c index 54e3e974d3..af7b7999c0 100644 --- a/xen/drivers/pci/quirks.c +++ b/xen/drivers/pci/quirks.c @@ -14,7 +14,7 @@ #include <linux/config.h> #include <linux/types.h> -/*#include <linux/kernel.h>*/ +#include <linux/lib.h> #include <linux/pci.h> #include <linux/init.h> #include <linux/delay.h> diff --git a/xen/drivers/pci/setup-res.c b/xen/drivers/pci/setup-res.c index 1053ad5489..bc27b906b4 100644 --- a/xen/drivers/pci/setup-res.c +++ b/xen/drivers/pci/setup-res.c @@ -17,7 +17,7 @@ */ #include <linux/init.h> -/*#include <linux/kernel.h>*/ +#include <linux/lib.h> #include <linux/pci.h> #include <linux/errno.h> #include <linux/ioport.h> diff --git a/xen/include/asm-i386/apic.h b/xen/include/asm-i386/apic.h index 574cc23203..264f6bd44b 100644 --- a/xen/include/asm-i386/apic.h +++ b/xen/include/asm-i386/apic.h @@ -1,8 +1,8 @@ #ifndef __ASM_APIC_H #define __ASM_APIC_H -//#include <linux/config.h> -//#include <linux/pm.h> +#include <linux/config.h> +#include <asm/ptrace.h> #include <asm/apicdef.h> #include <asm/system.h> diff --git a/xen/include/asm-i386/mpspec.h b/xen/include/asm-i386/mpspec.h index 2829cb54a3..4a8c499763 100644 --- a/xen/include/asm-i386/mpspec.h +++ b/xen/include/asm-i386/mpspec.h @@ -218,7 +218,6 @@ extern int mpc_default_type; extern int mp_current_pci_id; extern unsigned long mp_lapic_addr; extern int pic_mode; -extern int using_apic_timer; #endif diff --git a/xen/include/asm-i386/time.h b/xen/include/asm-i386/time.h index 2f834908a7..9c9ae87182 100644 --- a/xen/include/asm-i386/time.h +++ b/xen/include/asm-i386/time.h @@ -46,4 +46,6 @@ extern s_time_t stime_now; /* time in ns at last timer IRQ */ */ typedef u64 dv_time_t; +extern int using_apic_timer; + #endif /* _ASM_TIME_H_ */ diff --git a/xen/include/xeno/time.h b/xen/include/xeno/time.h index a017b0d2b0..51b8a3ecee 100644 --- a/xen/include/xeno/time.h +++ b/xen/include/xeno/time.h @@ -30,6 +30,7 @@ #include <asm/ptrace.h> /* XXX Only used for do_timer which should be moved */ #include <asm/time.h> /* pull in architecture specific time definition */ #include <xeno/types.h> +#include <hypervisor-ifs/hypervisor-if.h> /* * Init time diff --git a/xen/net/dev.c b/xen/net/dev.c index 352a3b1a56..51d9ef66e0 100644 --- a/xen/net/dev.c +++ b/xen/net/dev.c @@ -558,9 +558,7 @@ void deliver_packet(struct sk_buff *skb, net_vif_t *vif) int netif_rx(struct sk_buff *skb) { -#ifdef CONFIG_SMP unsigned long cpu_mask; -#endif int this_cpu = smp_processor_id(); unsigned long flags; net_vif_t *vif; |