[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [PATCH] pci-ioapic-x86-64.patch



ChangeSet 1.1501, 2005/05/21 11:12:11+01:00, arun.sharma@xxxxxxxxx

        [PATCH] pci-ioapic-x86-64.patch
        
        Enable PCI, IOAPIC and ACPI on domain 0 for x86-64.
        
        This patch is based on apic.c,io_apic.c and mpparse.c on x86-64. It
        applies changes analogous to the i386 files for paravirtualization.
        
        The patch was tested on UP and DP with acpi=on and off. We did this
        on a 5/10 bk tree + Jun's fixes. The latest bk tree doesn't boot yet
        and needs more work.
        
        Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>



 arch/xen/configs/xen0_defconfig_x86_64            |   44 
 arch/xen/x86_64/Kconfig                           |   12 
 arch/xen/x86_64/kernel/Makefile                   |   11 
 arch/xen/x86_64/kernel/acpi/Makefile              |   16 
 arch/xen/x86_64/kernel/apic.c                     |  200 ++
 arch/xen/x86_64/kernel/entry.S                    |    3 
 arch/xen/x86_64/kernel/io_apic.c                  | 2051 ++++++++++++++++++++++
 arch/xen/x86_64/kernel/mpparse.c                  |  954 ++++++++++
 arch/xen/x86_64/kernel/setup.c                    |   30 
 arch/xen/x86_64/kernel/traps.c                    |    4 
 include/asm-xen/asm-x86_64/fixmap.h               |    6 
 include/asm-xen/asm-x86_64/mach-xen/irq_vectors.h |    5 
 12 files changed, 3294 insertions(+), 42 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64 
b/linux-2.6.11-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64
--- a/linux-2.6.11-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64    
2005-05-22 13:03:37 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64    
2005-05-22 13:03:37 -04:00
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-xen0
-# Thu Apr 14 19:45:44 2005
+# Linux kernel version: 2.6.11.1-xen0
+# Tue May 10 11:07:02 2005
 #
 CONFIG_XEN=y
 CONFIG_ARCH_XEN=y
@@ -88,8 +88,11 @@
 # CONFIG_X86_CPUID is not set
 # CONFIG_NUMA is not set
 # CONFIG_MTRR is not set
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_X86_IO_APIC=y
 CONFIG_PCI=y
 CONFIG_PCI_DIRECT=y
+# CONFIG_PCI_MMCONFIG is not set
 CONFIG_EARLY_PRINTK=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
@@ -118,11 +121,6 @@
 # CONFIG_PM is not set
 
 #
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-# CONFIG_ACPI is not set
-
-#
 # CPU Frequency scaling
 #
 # CONFIG_CPU_FREQ is not set
@@ -130,7 +128,6 @@
 #
 # Bus options (PCI etc.)
 #
-# CONFIG_PCI_MMCONFIG is not set
 # CONFIG_UNORDERED_IO is not set
 
 #
@@ -168,6 +165,7 @@
 #
 # Plug and Play support
 #
+# CONFIG_PNP is not set
 
 #
 # Block devices
@@ -725,6 +723,7 @@
 CONFIG_DRM_SIS=m
 # CONFIG_MWAVE is not set
 # CONFIG_RAW_DRIVER is not set
+# CONFIG_HPET is not set
 # CONFIG_HANGCHECK_TIMER is not set
 
 #
@@ -794,6 +793,35 @@
 # InfiniBand support
 #
 # CONFIG_INFINIBAND is not set
+
+#
+# Power management options
+#
+
+#
+# ACPI (Advanced Configuration and Power Interface) Support
+#
+CONFIG_ACPI=y
+CONFIG_ACPI_BOOT=y
+CONFIG_ACPI_INTERPRETER=y
+CONFIG_ACPI_AC=m
+CONFIG_ACPI_BATTERY=m
+CONFIG_ACPI_BUTTON=m
+CONFIG_ACPI_VIDEO=m
+CONFIG_ACPI_FAN=m
+CONFIG_ACPI_PROCESSOR=m
+CONFIG_ACPI_THERMAL=m
+CONFIG_ACPI_ASUS=m
+CONFIG_ACPI_IBM=m
+CONFIG_ACPI_TOSHIBA=m
+CONFIG_ACPI_BLACKLIST_YEAR=0
+# CONFIG_ACPI_DEBUG is not set
+CONFIG_ACPI_BUS=y
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_PCI=y
+CONFIG_ACPI_SYSTEM=y
+# CONFIG_ACPI_CONTAINER is not set
 
 #
 # File systems
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/x86_64/Kconfig 
b/linux-2.6.11-xen-sparse/arch/xen/x86_64/Kconfig
--- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/Kconfig   2005-05-22 13:03:37 
-04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/Kconfig   2005-05-22 13:03:37 
-04:00
@@ -188,13 +188,13 @@
 config EISA
        bool
 
-#config X86_IO_APIC
-#      bool
-#      default n
+config X86_LOCAL_APIC
+       bool
+       default y
 
-#config X86_LOCAL_APIC
-#      bool
-#      default n
+config X86_IO_APIC
+       bool
+       default y
 
 config MTRR
        bool "MTRR (Memory Type Range Register) support"
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/Makefile 
b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/Makefile
--- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/Makefile   2005-05-22 
13:03:37 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/Makefile   2005-05-22 
13:03:37 -04:00
@@ -12,7 +12,7 @@
                x8664_ksyms.o vsyscall.o \
                setup64.o e820.o irq.o early_printk.o
 c-obj-y        := semaphore.o i387.o sys_x86_64.o \
-               ptrace.o quirks.o syscall.o
+               ptrace.o quirks.o syscall.o bootflag.o
 
 i386-obj-y                     := time.o
 obj-y                          += ../../i386/kernel/timers/
@@ -21,14 +21,15 @@
 
 #obj-$(CONFIG_X86_MCE)         += mce.o
 #obj-$(CONFIG_MTRR)            += ../../i386/kernel/cpu/mtrr/
-#obj-$(CONFIG_ACPI_BOOT)               += acpi/
+obj-$(CONFIG_ACPI_BOOT)                += acpi/
 obj-$(CONFIG_X86_MSR)          += msr.o
 obj-$(CONFIG_MICROCODE)                += microcode.o
 obj-$(CONFIG_X86_CPUID)                += cpuid.o
 #obj-$(CONFIG_SMP)             += smp.o smpboot.o trampoline.o
-#obj-$(CONFIG_X86_LOCAL_APIC)  += apic.o  nmi.o
-#obj-$(CONFIG_X86_IO_APIC)     += io_apic.o mpparse.o \
-#              genapic.o genapic_cluster.o genapic_flat.o
+obj-$(CONFIG_X86_LOCAL_APIC)   += apic.o
+c-obj-$(CONFIG_X86_LOCAL_APIC) += nmi.o
+obj-$(CONFIG_X86_IO_APIC)      += io_apic.o mpparse.o
+c-obj-$(CONFIG_X86_IO_APIC)    += genapic.o genapic_cluster.o genapic_flat.o
 #obj-$(CONFIG_PM)              += suspend.o
 #obj-$(CONFIG_SOFTWARE_SUSPEND)        += suspend_asm.o
 #obj-$(CONFIG_CPU_FREQ)                += cpufreq/
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/acpi/Makefile 
b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/acpi/Makefile
--- /dev/null   Wed Dec 31 16:00:00 196900
+++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/acpi/Makefile      
2005-05-22 13:03:37 -04:00
@@ -0,0 +1,16 @@
+i386-obj-$(CONFIG_ACPI_BOOT)           := boot.o
+c-obj-$(CONFIG_X86_IO_APIC)            := earlyquirk.o
+c-obj-$(CONFIG_ACPI_SLEEP)             += sleep.o wakeup.o
+
+c-link                                  :=
+
+$(patsubst %.o,$(obj)/%.c,$(c-obj-y) $(c-link)):
+       @ln -fsn $(srctree)/arch/i386/kernel/acpi/$(notdir $@) $@
+
+$(patsubst %.o,$(obj)/%.c,$(i386-obj-y)):
+       ln -fsn $(srctree)/arch/xen/i386/kernel/acpi/$(notdir $@) $@
+
+obj-y  += $(c-obj-y) $(s-obj-y) $(i386-obj-y)
+
+clean-files += $(patsubst %.o,%.c,$(c-obj-y) $(c-obj-) $(c-link))
+clean-files += $(patsubst %.o,%.S,$(s-obj-y) $(s-obj-) $(s-link))
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/apic.c 
b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/apic.c
--- /dev/null   Wed Dec 31 16:00:00 196900
+++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/apic.c     2005-05-22 
13:03:37 -04:00
@@ -0,0 +1,200 @@
+/*
+ *     Local APIC handling, local APIC timers
+ *
+ *     (c) 1999, 2000 Ingo Molnar <mingo@xxxxxxxxxx>
+ *
+ *     Fixes
+ *     Maciej W. Rozycki       :       Bits for genuine 82489DX APICs;
+ *                                     thanks to Eric Gilmore
+ *                                     and Rolf G. Tews
+ *                                     for testing these extensively.
+ *     Maciej W. Rozycki       :       Various updates and fixes.
+ *     Mikael Pettersson       :       Power Management for UP-APIC.
+ *     Pavel Machek and
+ *     Mikael Pettersson       :       PM converted to driver model.
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+
+#include <linux/mm.h>
+#include <linux/irq.h>
+#include <linux/delay.h>
+#include <linux/bootmem.h>
+#include <linux/smp_lock.h>
+#include <linux/interrupt.h>
+#include <linux/mc146818rtc.h>
+#include <linux/kernel_stat.h>
+#include <linux/sysdev.h>
+
+#include <asm/atomic.h>
+#include <asm/smp.h>
+#include <asm/mtrr.h>
+#include <asm/mpspec.h>
+#include <asm/desc.h>
+#include <asm/arch_hooks.h>
+#include <asm/hpet.h>
+
+#include "io_ports.h"
+
+/*
+ * Debug level
+ */
+int apic_verbosity;
+int disable_apic;
+
+void smp_local_timer_interrupt(struct pt_regs *regs)
+{
+       int cpu = smp_processor_id();
+
+       profile_tick(CPU_PROFILING, regs);
+#if 0
+       if (--per_cpu(prof_counter, cpu) <= 0) {
+               /*
+                * The multiplier may have changed since the last time we got
+                * to this point as a result of the user writing to
+                * /proc/profile. In this case we need to adjust the APIC
+                * timer accordingly.
+                *
+                * Interrupts are already masked off at this point.
+                */
+               per_cpu(prof_counter, cpu) = per_cpu(prof_multiplier, cpu);
+               if (per_cpu(prof_counter, cpu) != 
+                   per_cpu(prof_old_multiplier, cpu)) {
+                       __setup_APIC_LVTT(calibration_result/
+                                       per_cpu(prof_counter, cpu));
+                       per_cpu(prof_old_multiplier, cpu) =
+                               per_cpu(prof_counter, cpu);
+               }
+
+#ifdef CONFIG_SMP
+               update_process_times(user_mode(regs));
+#endif
+       }
+#endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.