Skip to contentSkip to conversation

pci-ioapic-x86-64.patch

PATCH New Arun Sharma 1 participant 1 message May 21, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

linux-2.6.11-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64 +36 -8
@@ -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
linux-2.6.11-xen-sparse/arch/xen/x86_64/Kconfig +6 -6
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
@@ -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"
linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/Makefile +6 -5
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
@@ -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/
linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/acpi/Makefile new file +16 -0
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
@@ -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))
linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/apic.c new file +200 -0

200 lines not on this page · raw message

linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/entry.S +2 -1
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/entry.S b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/entry.S
@@ -48,6 +48,7 @@
 #include <asm/errno.h>
 #include <asm-xen/xen-public/arch-x86_64.h>
 
+#include "irq_vectors.h"
 
 EVENT_MASK      = (CS+4)
 VGCF_IN_SYSCALL = (1<<8)
@@ -584,7 +585,7 @@
 	.macro apicinterrupt num,func
 	pushq $\num-256
 	interrupt \func
-	jmp ret_from_intr
+	jmp error_entry
 	CFI_ENDPROC
 	.endm
 
linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/io_apic.c new file +2051 -0

2,051 lines not on this page · raw message

linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/mpparse.c new file +954 -0

585 lines not on this page · raw message

linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c +14 -16
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c

Lines of this file are not shown. View the raw message.

linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/traps.c +0 -4
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/traps.c b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/traps.c

Lines of this file are not shown. View the raw message.

linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h +6 -0
diff -Nru a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h

Lines of this file are not shown. View the raw message.

linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/irq_vectors.h +3 -2
diff -Nru a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/irq_vectors.h b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/irq_vectors.h

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.