SOURCES (LINUX_2_6): xen-3.0-2.6.16.patch - updated

cieciwa cieciwa at pld-linux.org
Wed Apr 19 15:41:03 CEST 2006


Author: cieciwa                      Date: Wed Apr 19 13:41:03 2006 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- updated

---- Files affected:
SOURCES:
   xen-3.0-2.6.16.patch (1.1.2.1 -> 1.1.2.2) 

---- Diffs:

================================================================
Index: SOURCES/xen-3.0-2.6.16.patch
diff -u SOURCES/xen-3.0-2.6.16.patch:1.1.2.1 SOURCES/xen-3.0-2.6.16.patch:1.1.2.2
--- SOURCES/xen-3.0-2.6.16.patch:1.1.2.1	Wed Apr 19 13:56:37 2006
+++ SOURCES/xen-3.0-2.6.16.patch	Wed Apr 19 15:40:57 2006
@@ -1,218 +1,56 @@
---- linux-2.6.16/drivers/base/bus.c	2006-03-16 10:50:20.000000000 -0500
-+++ linux-2.6.16/drivers/base/bus.c	2006-03-16 11:02:08.000000000 -0500
-@@ -188,6 +188,11 @@ static ssize_t driver_bind(struct device
- 		up(&dev->sem);
- 		if (dev->parent)
- 			up(&dev->parent->sem);
-+
-+		if (err > 0) 		/* success */
-+			err = count;
-+		else if (err == 0)	/* driver didn't accept device */
-+			err = -ENODEV;
- 	}
- 	put_device(dev);
- 	put_bus(bus);
-diff -pruN ../pristine-linux-2.6.16/arch/i386/kernel/traps.c ./arch/i386/kernel/traps.c
---- ../pristine-linux-2.6.16/arch/i386/kernel/traps.c	2006-03-20 05:53:29.000000000 +0000
-+++ ./arch/i386/kernel/traps.c	2006-03-20 19:38:17.000000000 +0000
-@@ -567,18 +567,11 @@ static void mem_parity_error(unsigned ch
- 
- static void io_check_error(unsigned char reason, struct pt_regs * regs)
- {
--	unsigned long i;
--
- 	printk(KERN_EMERG "NMI: IOCK error (debug interrupt?)\n");
- 	show_registers(regs);
- 
- 	/* Re-enable the IOCK line, wait for a few seconds */
--	reason = (reason & 0xf) | 8;
--	outb(reason, 0x61);
--	i = 2000;
--	while (--i) udelay(1000);
--	reason &= ~8;
--	outb(reason, 0x61);
-+	clear_io_check_error(reason);
- }
- 
- static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
-diff -pruN ../pristine-linux-2.6.16/include/asm-i386/mach-default/mach_traps.h ./include/asm-i386/mach-default/mach_traps.h
---- ../pristine-linux-2.6.16/include/asm-i386/mach-default/mach_traps.h	2006-03-20 05:53:29.000000000 +0000
-+++ ./include/asm-i386/mach-default/mach_traps.h	2006-03-20 19:38:17.000000000 +0000
-@@ -15,6 +15,18 @@ static inline void clear_mem_error(unsig
- 	outb(reason, 0x61);
- }
- 
-+static inline void clear_io_check_error(unsigned char reason)
-+{
-+	unsigned long i;
-+
-+	reason = (reason & 0xf) | 8;
-+	outb(reason, 0x61);
-+	i = 2000;
-+	while (--i) udelay(1000);
-+	reason &= ~8;
-+	outb(reason, 0x61);
-+}
+diff -Nurp ref-linux-2.6.16.9/arch/i386/boot-xen/Makefile tmp-linux-2.6-xen.patch/arch/i386/boot-xen/Makefile
+--- ref-linux-2.6.16.9/arch/i386/boot-xen/Makefile	1970-01-01 01:00:00.000000000 +0100
++++ tmp-linux-2.6-xen.patch/arch/i386/boot-xen/Makefile	2006-04-10 00:05:52.000000000 +0200
+@@ -0,0 +1,21 @@
 +
- static inline unsigned char get_nmi_reason(void)
- {
- 	return inb(0x61);
-diff -pruN ../pristine-linux-2.6.16/net/ipv4/netfilter/ip_nat_proto_tcp.c ./net/ipv4/netfilter/ip_nat_proto_tcp.c
---- ../pristine-linux-2.6.16/net/ipv4/netfilter/ip_nat_proto_tcp.c	2006-03-20 05:53:29.000000000 +0000
-+++ ./net/ipv4/netfilter/ip_nat_proto_tcp.c	2006-03-20 19:38:19.000000000 +0000
-@@ -129,10 +129,14 @@ tcp_manip_pkt(struct sk_buff **pskb,
- 	if (hdrsize < sizeof(*hdr))
- 		return 1;
- 
--	hdr->check = ip_nat_cheat_check(~oldip, newip,
-+	if ((*pskb)->proto_csum_blank) {
-+		hdr->check = ip_nat_cheat_check(oldip, ~newip, hdr->check);
-+	} else {
-+		hdr->check = ip_nat_cheat_check(~oldip, newip,
- 					ip_nat_cheat_check(oldport ^ 0xFFFF,
- 							   newport,
- 							   hdr->check));
-+	}
- 	return 1;
- }
- 
-diff -pruN ../pristine-linux-2.6.16/net/ipv4/netfilter/ip_nat_proto_udp.c ./net/ipv4/netfilter/ip_nat_proto_udp.c
---- ../pristine-linux-2.6.16/net/ipv4/netfilter/ip_nat_proto_udp.c	2006-03-20 05:53:29.000000000 +0000
-+++ ./net/ipv4/netfilter/ip_nat_proto_udp.c	2006-03-20 19:38:19.000000000 +0000
-@@ -113,11 +113,16 @@ udp_manip_pkt(struct sk_buff **pskb,
- 		newport = tuple->dst.u.udp.port;
- 		portptr = &hdr->dest;
- 	}
--	if (hdr->check) /* 0 is a special case meaning no checksum */
--		hdr->check = ip_nat_cheat_check(~oldip, newip,
-+	if (hdr->check) { /* 0 is a special case meaning no checksum */
-+		if ((*pskb)->proto_csum_blank) {
-+			hdr->check = ip_nat_cheat_check(oldip, ~newip, hdr->check);
-+		} else {
-+			hdr->check = ip_nat_cheat_check(~oldip, newip,
- 					ip_nat_cheat_check(*portptr ^ 0xFFFF,
- 							   newport,
- 							   hdr->check));
-+		}
-+	}
- 	*portptr = newport;
- 	return 1;
- }
-diff -pruN ../pristine-linux-2.6.16/arch/i386/mm/pageattr.c ./arch/i386/mm/pageattr.c
---- ../pristine-linux-2.6.16/arch/i386/mm/pageattr.c	2006-03-20 05:53:29.000000000 +0000
-+++ ./arch/i386/mm/pageattr.c	2006-03-20 19:38:23.000000000 +0000
-@@ -78,7 +78,7 @@ static void set_pmd_pte(pte_t *kpte, uns
- 	unsigned long flags;
- 
- 	set_pte_atomic(kpte, pte); 	/* change init_mm */
--	if (PTRS_PER_PMD > 1)
-+	if (HAVE_SHARED_KERNEL_PMD)
- 		return;
- 
- 	spin_lock_irqsave(&pgd_lock, flags);
-diff -pruN ../pristine-linux-2.6.16/arch/i386/mm/pgtable.c ./arch/i386/mm/pgtable.c
---- ../pristine-linux-2.6.16/arch/i386/mm/pgtable.c	2006-03-20 05:53:29.000000000 +0000
-+++ ./arch/i386/mm/pgtable.c	2006-03-20 19:38:23.000000000 +0000
-@@ -215,9 +215,10 @@ void pgd_ctor(void *pgd, kmem_cache_t *c
- 		spin_lock_irqsave(&pgd_lock, flags);
- 	}
- 
--	clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
--			swapper_pg_dir + USER_PTRS_PER_PGD,
--			KERNEL_PGD_PTRS);
-+	if (PTRS_PER_PMD == 1 || HAVE_SHARED_KERNEL_PMD)
-+		clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
-+				swapper_pg_dir + USER_PTRS_PER_PGD,
-+				KERNEL_PGD_PTRS);
- 	if (PTRS_PER_PMD > 1)
- 		return;
- 
-@@ -249,6 +250,30 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
- 			goto out_oom;
- 		set_pgd(&pgd[i], __pgd(1 + __pa(pmd)));
- 	}
++OBJCOPYFLAGS := -g --strip-unneeded
 +
-+	if (!HAVE_SHARED_KERNEL_PMD) {
-+		unsigned long flags;
++vmlinuz: vmlinux-stripped FORCE
++	$(call if_changed,gzip)
 +
-+		for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
-+			pmd_t *pmd = kmem_cache_alloc(pmd_cache, GFP_KERNEL);
-+			if (!pmd)
-+				goto out_oom;
-+			set_pgd(&pgd[USER_PTRS_PER_PGD], __pgd(1 + __pa(pmd)));
-+		}
++vmlinux-stripped: vmlinux FORCE
++	$(call if_changed,objcopy)
 +
-+		spin_lock_irqsave(&pgd_lock, flags);
-+		for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
-+			unsigned long v = (unsigned long)i << PGDIR_SHIFT;
-+			pgd_t *kpgd = pgd_offset_k(v);
-+			pud_t *kpud = pud_offset(kpgd, v);
-+			pmd_t *kpmd = pmd_offset(kpud, v);
-+			pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
-+			memcpy(pmd, kpmd, PAGE_SIZE);
-+		}
-+		pgd_list_add(pgd);
-+		spin_unlock_irqrestore(&pgd_lock, flags);
-+	}
++INSTALL_ROOT := $(patsubst %/boot,%,$(INSTALL_PATH))
 +
- 	return pgd;
- 
- out_oom:
-@@ -263,9 +288,23 @@ void pgd_free(pgd_t *pgd)
- 	int i;
- 
- 	/* in the PAE case user pgd entries are overwritten before usage */
--	if (PTRS_PER_PMD > 1)
--		for (i = 0; i < USER_PTRS_PER_PGD; ++i)
--			kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i])-1));
-+	if (PTRS_PER_PMD > 1) {
-+		for (i = 0; i < USER_PTRS_PER_PGD; ++i) {
-+			pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
-+			kmem_cache_free(pmd_cache, pmd);
-+		}
-+		if (!HAVE_SHARED_KERNEL_PMD) {
-+			unsigned long flags;
-+			spin_lock_irqsave(&pgd_lock, flags);
-+			pgd_list_del(pgd);
-+			spin_unlock_irqrestore(&pgd_lock, flags);
-+			for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
-+				pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
-+				memset(pmd, 0, PTRS_PER_PMD*sizeof(pmd_t));
-+				kmem_cache_free(pmd_cache, pmd);
-+			}
-+		}
-+	}
- 	/* in the non-PAE case, free_pgtables() clears user pgd entries */
- 	kmem_cache_free(pgd_cache, pgd);
- }
-diff -pruN ../pristine-linux-2.6.16/include/asm-i386/pgtable-2level-defs.h ./include/asm-i386/pgtable-2level-defs.h
---- ../pristine-linux-2.6.16/include/asm-i386/pgtable-2level-defs.h	2006-03-20 05:53:29.000000000 +0000
-+++ ./include/asm-i386/pgtable-2level-defs.h	2006-03-20 19:38:23.000000000 +0000
-@@ -1,6 +1,8 @@
- #ifndef _I386_PGTABLE_2LEVEL_DEFS_H
- #define _I386_PGTABLE_2LEVEL_DEFS_H
++XINSTALL_NAME ?= $(KERNELRELEASE)
++install:
++	mkdir -p $(INSTALL_ROOT)/boot
++	ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
++	rm -f $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
++	install -m0644 vmlinuz $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
++	install -m0644 vmlinux $(INSTALL_ROOT)/boot/vmlinux-syms-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
++	install -m0664 .config $(INSTALL_ROOT)/boot/config-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
++	install -m0664 System.map $(INSTALL_ROOT)/boot/System.map-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
++	ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
+diff -Nurp ref-linux-2.6.16.9/arch/i386/Kconfig tmp-linux-2.6-xen.patch/arch/i386/Kconfig
+--- ref-linux-2.6.16.9/arch/i386/Kconfig	2006-04-19 08:10:14.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/i386/Kconfig	2006-04-10 00:05:52.000000000 +0200
+@@ -58,6 +58,15 @@ config X86_PC
+ 	help
+ 	  Choose this option if your computer is a standard PC or compatible.
  
-+#define HAVE_SHARED_KERNEL_PMD 0
++config X86_XEN
++	bool "Xen-compatible"
++	select X86_UP_APIC if !SMP && XEN_PRIVILEGED_GUEST
++	select X86_UP_IOAPIC if !SMP && XEN_PRIVILEGED_GUEST
++	select SWIOTLB
++	help
++	  Choose this option if you plan to run this kernel on top of the
++	  Xen Hypervisor.
 +
- /*
-  * traditional i386 two-level paging structure:
-  */
-diff -pruN ../pristine-linux-2.6.16/include/asm-i386/pgtable-3level-defs.h ./include/asm-i386/pgtable-3level-defs.h
---- ../pristine-linux-2.6.16/include/asm-i386/pgtable-3level-defs.h	2006-03-20 05:53:29.000000000 +0000
-+++ ./include/asm-i386/pgtable-3level-defs.h	2006-03-20 19:38:23.000000000 +0000
-@@ -1,6 +1,8 @@
- #ifndef _I386_PGTABLE_3LEVEL_DEFS_H
- #define _I386_PGTABLE_3LEVEL_DEFS_H
+ config X86_ELAN
+ 	bool "AMD Elan"
+ 	help
+@@ -159,6 +168,7 @@ source "arch/i386/Kconfig.cpu"
  
-+#define HAVE_SHARED_KERNEL_PMD 1
-+
- /*
-  * PGDIR_SHIFT determines what a top-level page table entry can map
-  */
-diff -pruN ../pristine-linux-2.6.16/arch/i386/Kconfig ./arch/i386/Kconfig
---- ../pristine-linux-2.6.16/arch/i386/Kconfig	2006-03-20 05:53:29.000000000 +0000
-+++ ./arch/i386/Kconfig	2006-03-20 19:38:27.000000000 +0000
-@@ -202,6 +202,19 @@ config SMP
+ config HPET_TIMER
+ 	bool "HPET Timer Support"
++	depends on !X86_XEN
+ 	help
+ 	  This enables the use of the HPET for the kernel's internal timer.
+ 	  HPET is the next generation timer replacing legacy 8254s.
+@@ -202,6 +212,19 @@ config SMP
  
  	  If you don't know what to do here, say N.
  
@@ -232,678 +70,83199 @@
  config NR_CPUS
  	int "Maximum number of CPUs (2-255)"
  	range 2 255
-diff -pruN ../pristine-linux-2.6.16/arch/i386/kernel/Makefile ./arch/i386/kernel/Makefile
---- ../pristine-linux-2.6.16/arch/i386/kernel/Makefile	2006-03-20 05:53:29.000000000 +0000
-+++ ./arch/i386/kernel/Makefile	2006-03-20 19:38:27.000000000 +0000
-@@ -37,6 +37,7 @@ obj-$(CONFIG_EFI) 		+= efi.o efi_stub.o
- obj-$(CONFIG_DOUBLEFAULT) 	+= doublefault.o
- obj-$(CONFIG_VM86)		+= vm86.o
- obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
-+obj-$(CONFIG_SMP_ALTERNATIVES)  += smpalts.o
+@@ -218,7 +241,7 @@ config NR_CPUS
  
- EXTRA_AFLAGS   := -traditional
+ config SCHED_SMT
+ 	bool "SMT (Hyperthreading) scheduler support"
+-	depends on SMP
++	depends on SMP && !X86_XEN
+ 	default off
+ 	help
+ 	  SMT scheduler support improves the CPU scheduler's decision making
+@@ -230,7 +253,7 @@ source "kernel/Kconfig.preempt"
  
-diff -pruN ../pristine-linux-2.6.16/arch/i386/kernel/smpalts.c ./arch/i386/kernel/smpalts.c
---- ../pristine-linux-2.6.16/arch/i386/kernel/smpalts.c	1970-01-01 01:00:00.000000000 +0100
-+++ ./arch/i386/kernel/smpalts.c	2006-03-20 19:38:27.000000000 +0000
-@@ -0,0 +1,85 @@
-+#include <linux/kernel.h>
-+#include <asm/system.h>
-+#include <asm/smp_alt.h>
-+#include <asm/processor.h>
-+#include <asm/string.h>
+ config X86_UP_APIC
+ 	bool "Local APIC support on uniprocessors"
+-	depends on !SMP && !(X86_VISWS || X86_VOYAGER)
++	depends on !SMP && !(X86_VISWS || X86_VOYAGER || XEN_UNPRIVILEGED_GUEST)
+ 	help
+ 	  A local APIC (Advanced Programmable Interrupt Controller) is an
+ 	  integrated interrupt controller in the CPU. If you have a single-CPU
+@@ -255,12 +278,12 @@ config X86_UP_IOAPIC
+ 
+ config X86_LOCAL_APIC
+ 	bool
+-	depends on X86_UP_APIC || ((X86_VISWS || SMP) && !X86_VOYAGER)
++	depends on X86_UP_APIC || ((X86_VISWS || SMP) && !(X86_VOYAGER || XEN_UNPRIVILEGED_GUEST))
+ 	default y
+ 
+ config X86_IO_APIC
+ 	bool
+-	depends on X86_UP_IOAPIC || (SMP && !(X86_VISWS || X86_VOYAGER))
++	depends on X86_UP_IOAPIC || (SMP && !(X86_VISWS || X86_VOYAGER || XEN_UNPRIVILEGED_GUEST))
+ 	default y
+ 
+ config X86_VISWS_APIC
+@@ -268,9 +291,14 @@ config X86_VISWS_APIC
+ 	depends on X86_VISWS
+ 	default y
+ 
++config X86_TSC
++	bool
++	depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MGEODEGX1) && !X86_NUMAQ && !X86_XEN
++	default y
 +
-+struct smp_replacement_record {
-+	unsigned char targ_size;
-+	unsigned char smp1_size;
-+	unsigned char smp2_size;
-+	unsigned char up_size;
-+	unsigned char feature;
-+	unsigned char data[0];
-+};
+ config X86_MCE
+ 	bool "Machine Check Exception"
+-	depends on !X86_VOYAGER
++	depends on !(X86_VOYAGER || X86_XEN)
+ 	---help---
+ 	  Machine Check Exception support allows the processor to notify the
+ 	  kernel if it detects a problem (e.g. overheating, component failure).
+@@ -360,6 +388,7 @@ config X86_REBOOTFIXUPS
+ 
+ config MICROCODE
+ 	tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support"
++	depends on !XEN_UNPRIVILEGED_GUEST
+ 	---help---
+ 	  If you say Y here and also to "/dev file system support" in the
+ 	  'File systems' section, you will be able to update the microcode on
+@@ -377,6 +406,7 @@ config MICROCODE
+ 
+ config X86_MSR
+ 	tristate "/dev/cpu/*/msr - Model-specific register support"
++	depends on !X86_XEN
+ 	help
+ 	  This device gives privileged processes access to the x86
+ 	  Model-Specific Registers (MSRs).  It is a character device with
+@@ -392,6 +422,10 @@ config X86_CPUID
+ 	  with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
+ 	  /dev/cpu/31/cpuid.
+ 
++config SWIOTLB
++	bool
++	default n
 +
-+struct smp_alternative_record {
-+	void *targ_start;
-+	struct smp_replacement_record *repl;
-+};
+ source "drivers/firmware/Kconfig"
+ 
+ choice
+@@ -560,7 +594,7 @@ config HAVE_ARCH_EARLY_PFN_TO_NID
+ 
+ config HIGHPTE
+ 	bool "Allocate 3rd-level pagetables from highmem"
+-	depends on HIGHMEM4G || HIGHMEM64G
++	depends on (HIGHMEM4G || HIGHMEM64G) && !X86_XEN
+ 	help
+ 	  The VM uses one page table entry for each page of physical memory.
+ 	  For systems with a lot of RAM, this can be wasteful of precious
+@@ -569,6 +603,7 @@ config HIGHPTE
+ 
+ config MATH_EMULATION
+ 	bool "Math emulation"
++	depends on !X86_XEN
+ 	---help---
+ 	  Linux can emulate a math coprocessor (used for floating point
+ 	  operations) if you don't have one. 486DX and Pentium processors have
+@@ -594,6 +629,8 @@ config MATH_EMULATION
+ 
+ config MTRR
+ 	bool "MTRR (Memory Type Range Register) support"
++	depends on !XEN_UNPRIVILEGED_GUEST
++	default y if X86_XEN
+ 	---help---
+ 	  On Intel P6 family processors (Pentium Pro, Pentium II and later)
+ 	  the Memory Type Range Registers (MTRRs) may be used to control
+@@ -628,7 +665,7 @@ config MTRR
+ 
+ config EFI
+ 	bool "Boot from EFI support (EXPERIMENTAL)"
+-	depends on ACPI
++	depends on ACPI && !X86_XEN
+ 	default n
+ 	---help---
+ 	This enables the the kernel to boot on EFI platforms using
+@@ -646,7 +683,7 @@ config EFI
+ 
+ config IRQBALANCE
+  	bool "Enable kernel irq balancing"
+-	depends on SMP && X86_IO_APIC
++	depends on SMP && X86_IO_APIC && !X86_XEN
+ 	default y
+ 	help
+  	  The default yes will allow the kernel to do irq load balancing.
+@@ -689,7 +726,7 @@ source kernel/Kconfig.hz
+ 
+ config KEXEC
+ 	bool "kexec system call (EXPERIMENTAL)"
+-	depends on EXPERIMENTAL
++	depends on EXPERIMENTAL && !X86_XEN
+ 	help
+ 	  kexec is a system call that implements the ability to shutdown your
+ 	  current kernel, and to start another kernel.  It is like a reboot
+@@ -743,6 +780,7 @@ config HOTPLUG_CPU
+ config DOUBLEFAULT
+ 	default y
+ 	bool "Enable doublefault exception handler" if EMBEDDED
++	depends on !X86_NO_TSS
+ 	help
+           This option allows trapping of rare doublefault exceptions that
+           would otherwise cause a system to silently reboot. Disabling this
+@@ -753,18 +791,20 @@ endmenu
+ 
+ 
+ menu "Power management options (ACPI, APM)"
+-	depends on !X86_VOYAGER
++	depends on !(X86_VOYAGER || XEN_UNPRIVILEGED_GUEST)
+ 
++if !X86_XEN
+ source kernel/power/Kconfig
++endif
+ 
+ source "drivers/acpi/Kconfig"
+ 
+ menu "APM (Advanced Power Management) BIOS Support"
+-depends on PM && !X86_VISWS
++depends on PM && !(X86_VISWS || X86_XEN)
+ 
+ config APM
+ 	tristate "APM (Advanced Power Management) BIOS support"
+-	depends on PM
++	depends on PM && PM_LEGACY
+ 	---help---
+ 	  APM is a BIOS specification for saving power using several different
+ 	  techniques. This is mostly useful for battery powered laptops with
+@@ -949,6 +989,7 @@ choice
+ 
+ config PCI_GOBIOS
+ 	bool "BIOS"
++	depends on !X86_XEN
+ 
+ config PCI_GOMMCONFIG
+ 	bool "MMConfig"
+@@ -956,6 +997,13 @@ config PCI_GOMMCONFIG
+ config PCI_GODIRECT
+ 	bool "Direct"
+ 
++config PCI_GOXEN_FE
++	bool "Xen PCI Frontend"
++	depends on X86_XEN
++	help
++	  The PCI device frontend driver allows the kernel to import arbitrary
++	  PCI devices from a PCI backend to support PCI driver domains.
 +
-+extern struct smp_alternative_record __start_smp_alternatives_table,
-+  __stop_smp_alternatives_table;
-+extern unsigned long __init_begin, __init_end;
+ config PCI_GOANY
+ 	bool "Any"
+ 
+@@ -963,7 +1011,7 @@ endchoice
+ 
+ config PCI_BIOS
+ 	bool
+-	depends on !X86_VISWS && PCI && (PCI_GOBIOS || PCI_GOANY)
++	depends on !(X86_VISWS || X86_XEN) && PCI && (PCI_GOBIOS || PCI_GOANY)
+ 	default y
+ 
+ config PCI_DIRECT
+@@ -976,6 +1024,18 @@ config PCI_MMCONFIG
+ 	depends on PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY)
+ 	default y
+ 
++config XEN_PCIDEV_FRONTEND
++	bool
++	depends on PCI && X86_XEN && (PCI_GOXEN_FE || PCI_GOANY)
++	default y
 +
-+void prepare_for_smp(void)
-+{
-+	struct smp_alternative_record *r;
-+	printk(KERN_INFO "Enabling SMP...\n");
-+	for (r = &__start_smp_alternatives_table;
-+	     r != &__stop_smp_alternatives_table;
-+	     r++) {
-+		BUG_ON(r->repl->targ_size < r->repl->smp1_size);
-+		BUG_ON(r->repl->targ_size < r->repl->smp2_size);
-+		BUG_ON(r->repl->targ_size < r->repl->up_size);
-+               if (system_state == SYSTEM_RUNNING &&
-+                   r->targ_start >= (void *)&__init_begin &&
-+                   r->targ_start < (void *)&__init_end)
-+                       continue;
-+		if (r->repl->feature != (unsigned char)-1 &&
-+		    boot_cpu_has(r->repl->feature)) {
-+			memcpy(r->targ_start,
-+			       r->repl->data + r->repl->smp1_size,
-+			       r->repl->smp2_size);
-+			memset(r->targ_start + r->repl->smp2_size,
-+			       0x90,
-+			       r->repl->targ_size - r->repl->smp2_size);
-+		} else {
-+			memcpy(r->targ_start,
-+			       r->repl->data,
-+			       r->repl->smp1_size);
-+			memset(r->targ_start + r->repl->smp1_size,
-+			       0x90,
-+			       r->repl->targ_size - r->repl->smp1_size);
-+		}
-+	}
-+	/* Paranoia */
-+	asm volatile ("jmp 1f\n1:");
-+	mb();
-+}
++config XEN_PCIDEV_FE_DEBUG
++	bool "Xen PCI Frontend Debugging"
++	depends on XEN_PCIDEV_FRONTEND
++	default n
++	help
++	  Enables some debug statements within the PCI Frontend.
 +
-+void unprepare_for_smp(void)
-+{
-+	struct smp_alternative_record *r;
-+	printk(KERN_INFO "Disabling SMP...\n");
-+	for (r = &__start_smp_alternatives_table;
-+	     r != &__stop_smp_alternatives_table;
-+	     r++) {
-+		BUG_ON(r->repl->targ_size < r->repl->smp1_size);
-+		BUG_ON(r->repl->targ_size < r->repl->smp2_size);
-+		BUG_ON(r->repl->targ_size < r->repl->up_size);
-+               if (system_state == SYSTEM_RUNNING &&
-+                   r->targ_start >= (void *)&__init_begin &&
-+                   r->targ_start < (void *)&__init_end)
-+                       continue;
-+		memcpy(r->targ_start,
-+		       r->repl->data + r->repl->smp1_size + r->repl->smp2_size,
-+		       r->repl->up_size);
-+		memset(r->targ_start + r->repl->up_size,
-+		       0x90,
-+		       r->repl->targ_size - r->repl->up_size);
-+	}
-+	/* Paranoia */
-+	asm volatile ("jmp 1f\n1:");
-+	mb();
-+}
-diff -pruN ../pristine-linux-2.6.16/arch/i386/kernel/smpboot.c ./arch/i386/kernel/smpboot.c
---- ../pristine-linux-2.6.16/arch/i386/kernel/smpboot.c	2006-03-20 05:53:29.000000000 +0000
-+++ ./arch/i386/kernel/smpboot.c	2006-03-20 19:38:27.000000000 +0000
-@@ -1218,6 +1218,11 @@ static void __init smp_boot_cpus(unsigne
- 		if (max_cpus <= cpucount+1)
- 			continue;
+ source "drivers/pci/pcie/Kconfig"
  
-+#ifdef CONFIG_SMP_ALTERNATIVES
-+		if (kicked == 1)
-+			prepare_for_smp();
-+#endif
-+
- 		if (((cpu = alloc_cpu_id()) <= 0) || do_boot_cpu(apicid, cpu))
- 			printk("CPU #%d not responding - cannot use it.\n",
- 								apicid);
-@@ -1396,6 +1401,11 @@ int __devinit __cpu_up(unsigned int cpu)
- 		return -EIO;
- 	}
+ source "drivers/pci/Kconfig"
+@@ -986,7 +1046,7 @@ config ISA_DMA_API
  
-+#ifdef CONFIG_SMP_ALTERNATIVES
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/xen-3.0-2.6.16.patch?r1=1.1.2.1&r2=1.1.2.2&f=u



More information about the pld-cvs-commit mailing list