Subject: Fix x86_64 xen build.
From: jbeulich@novell.com
Patch-mainline: obsolete
$subject says all.
Index: head-2007-02-08/arch/x86_64/kernel/Makefile
===================================================================
--- head-2007-02-08.orig/arch/x86_64/kernel/Makefile 2007-02-08 15:14:00.000000000 +0100
+++ head-2007-02-08/arch/x86_64/kernel/Makefile 2007-02-08 16:59:13.000000000 +0100
@@ -63,7 +63,6 @@ ifdef CONFIG_XEN
time-y += ../../i386/kernel/time-xen.o
pci-dma-y += ../../i386/kernel/pci-dma-xen.o
microcode-$(subst m,y,$(CONFIG_MICROCODE)) := ../../i386/kernel/microcode-xen.o
-intel_cacheinfo-y := ../../i386/kernel/cpu/intel_cacheinfo-xen.o
quirks-y := ../../i386/kernel/quirks-xen.o
alternative-y := ../../i386/kernel/alternative-xen.o
Index: head-2007-02-08/arch/x86_64/kernel/crash.c
===================================================================
--- head-2007-02-08.orig/arch/x86_64/kernel/crash.c 2007-02-08 15:14:00.000000000 +0100
+++ head-2007-02-08/arch/x86_64/kernel/crash.c 2007-02-08 15:14:36.000000000 +0100
@@ -25,10 +25,10 @@
#include <asm/mach_apic.h>
#include <asm/kdebug.h>
+#ifndef CONFIG_XEN
/* This keeps a track of which one is crashing cpu. */
static int crashing_cpu;
-#ifndef CONFIG_XEN
#ifdef CONFIG_SMP
static atomic_t waiting_for_crash_ipi;
@@ -124,10 +124,10 @@ void machine_crash_shutdown(struct pt_re
/* The kernel is broken so disable interrupts */
local_irq_disable();
+#ifndef CONFIG_XEN
/* Make a note of crashing cpu. Will be used in NMI callback.*/
crashing_cpu = smp_processor_id();
-#ifndef CONFIG_XEN
nmi_shootdown_cpus();
if(cpu_has_apic)
Index: head-2007-02-08/arch/x86_64/kernel/pci-swiotlb-xen.c
===================================================================
--- head-2007-02-08.orig/arch/x86_64/kernel/pci-swiotlb-xen.c 2007-02-08 15:14:00.000000000 +0100
+++ head-2007-02-08/arch/x86_64/kernel/pci-swiotlb-xen.c 2007-02-08 16:59:13.000000000 +0100
@@ -13,6 +13,8 @@ int swiotlb __read_mostly;
EXPORT_SYMBOL(swiotlb);
#endif
+void swiotlb_init(void);
+
struct dma_mapping_ops swiotlb_dma_ops = {
#if 0
.mapping_error = swiotlb_dma_mapping_error,
Index: head-2007-02-08/arch/x86_64/kernel/process-xen.c
===================================================================
--- head-2007-02-08.orig/arch/x86_64/kernel/process-xen.c 2007-02-08 15:14:00.000000000 +0100
+++ head-2007-02-08/arch/x86_64/kernel/process-xen.c 2007-02-08 17:07:13.000000000 +0100
@@ -466,13 +466,6 @@ out:
return err;
}
-static inline void __save_init_fpu( struct task_struct *tsk )
-{
- asm volatile( "rex64 ; fxsave %0 ; fnclex"
- : "=m" (tsk->thread.i387.fxsave));
- tsk->thread_info->status &= ~TS_USEDFPU;
-}
-
/*
* switch_to(x,y) should switch tasks from x to y.
*
Index: head-2007-02-08/arch/x86_64/kernel/setup-xen.c
===================================================================
--- head-2007-02-08.orig/arch/x86_64/kernel/setup-xen.c 2007-02-08 15:14:00.000000000 +0100
+++ head-2007-02-08/arch/x86_64/kernel/setup-xen.c 2007-02-08 17:07:13.000000000 +0100
@@ -884,9 +884,6 @@ void __init setup_arch(char **cmdline_p)
init_apic_mappings();
#endif
#endif
-#if defined(CONFIG_XEN) && defined(CONFIG_SMP) && !defined(CONFIG_HOTPLUG_CPU)
- prefill_possible_map();
-#endif
/*
* Request address space for all standard RAM and ROM resources
Index: head-2007-02-08/arch/x86_64/kernel/setup64-xen.c
===================================================================
--- head-2007-02-08.orig/arch/x86_64/kernel/setup64-xen.c 2007-02-08 15:14:00.000000000 +0100
+++ head-2007-02-08/arch/x86_64/kernel/setup64-xen.c 2007-02-08 16:59:13.000000000 +0100
@@ -97,7 +97,7 @@ void __init setup_per_cpu_areas(void)
int i;
unsigned long size;
-#ifdef CONFIG_HOTPLUG_CPU
+#if defined(CONFIG_HOTPLUG_CPU) || (defined(CONFIG_XEN) && defined(CONFIG_SMP))
prefill_possible_map();
#endif
Index: head-2007-02-08/include/asm-x86_64/i387.h
===================================================================
--- head-2007-02-08.orig/include/asm-x86_64/i387.h 2007-02-04 19:44:54.000000000 +0100
+++ head-2007-02-08/include/asm-x86_64/i387.h 2007-02-08 15:14:36.000000000 +0100
@@ -191,10 +191,15 @@ static inline void kernel_fpu_end(void)
preempt_enable();
}
-static inline void save_init_fpu(struct task_struct *tsk)
+static inline void __save_init_fpu(struct task_struct *tsk)
{
__fxsave_clear(tsk);
task_thread_info(tsk)->status &= ~TS_USEDFPU;
+}
+
+static inline void save_init_fpu(struct task_struct *tsk)
+{
+ __save_init_fpu(tsk);
stts();
}
Index: head-2007-02-08/include/asm-x86_64/mach-xen/asm/page.h
===================================================================
--- head-2007-02-08.orig/include/asm-x86_64/mach-xen/asm/page.h 2007-02-08 15:14:00.000000000 +0100
+++ head-2007-02-08/include/asm-x86_64/mach-xen/asm/page.h 2007-02-08 15:14:36.000000000 +0100
@@ -9,14 +9,6 @@
#endif
#include <xen/interface/xen.h>
-#define arch_free_page(_page,_order) \
-({ int foreign = PageForeign(_page); \
- if (foreign) \
- PageForeignDestructor(_page); \
- foreign; \
-})
-#define HAVE_ARCH_FREE_PAGE
-
#ifdef CONFIG_XEN_SCRUB_PAGES
#define scrub_pages(_p,_n) memset((void *)(_p), 0, (_n) << PAGE_SHIFT)
#else