--- linux-2.6.8/arch/xen/i386/kernel/process.c.4g4g 2004-10-11 17:42:55.000000000 -0400 +++ linux-2.6.8/arch/xen/i386/kernel/process.c 2004-10-11 17:43:10.000000000 -0400 @@ -642,7 +642,7 @@ asmlinkage int sys_clone(struct pt_regs child_tidptr = (int __user *)regs.edi; if (!newsp) newsp = regs.esp; - return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, ®s, 0, parent_tidptr, child_tidptr); + return do_fork(clone_flags, newsp, ®s, 0, parent_tidptr, child_tidptr); } /* --- linux-2.6.8/arch/xen/i386/kernel/signal.c.4g4g 2004-10-11 17:44:46.000000000 -0400 +++ linux-2.6.8/arch/xen/i386/kernel/signal.c 2004-10-11 17:46:40.000000000 -0400 @@ -502,11 +502,9 @@ give_sigsegv: */ static void -handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, +handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, sigset_t *oldset, struct pt_regs * regs) { - struct k_sigaction *ka = ¤t->sighand->action[sig-1]; - /* Are we from a system call? */ if (regs->orig_eax >= 0) { /* If so, check system call restarting.. */ @@ -555,6 +553,7 @@ int fastcall do_signal(struct pt_regs *r { siginfo_t info; int signr; + struct k_sigaction ka; /* * We want the common case to go fast, which @@ -573,7 +572,7 @@ int fastcall do_signal(struct pt_regs *r if (!oldset) oldset = ¤t->blocked; - signr = get_signal_to_deliver(&info, regs, NULL); + signr = get_signal_to_deliver(&info, &ka, regs, NULL); if (signr > 0) { /* Reenable any watchpoints before delivering the * signal to user space. The processor register will @@ -585,7 +584,7 @@ int fastcall do_signal(struct pt_regs *r current->thread.debugreg[7]); /* Whee! Actually deliver the signal. */ - handle_signal(signr, &info, oldset, regs); + handle_signal(signr, &info, &ka, oldset, regs); return 1; } --- linux-2.6.8/arch/xen/i386/pci/fixup.c.newpci 2004-10-13 16:24:29.000000000 -0400 +++ linux-2.6.8/arch/xen/i386/pci/fixup.c 2004-10-13 16:38:47.000000000 -0400 @@ -29,6 +29,7 @@ static void __devinit pci_fixup_i450nx(s } pcibios_last_bus = -1; } +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx); static void __devinit pci_fixup_i450gx(struct pci_dev *d) { @@ -42,6 +43,7 @@ static void __devinit pci_fixup_i450gx(s pci_scan_bus(busno, &pci_root_ops, NULL); pcibios_last_bus = -1; } +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx); static void __devinit pci_fixup_umc_ide(struct pci_dev *d) { @@ -55,6 +57,7 @@ static void __devinit pci_fixup_umc_ide for(i=0; i<4; i++) d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO; } +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, pci_fixup_umc_ide); static void __devinit pci_fixup_ncr53c810(struct pci_dev *d) { @@ -67,6 +70,7 @@ static void __devinit pci_fixup_ncr53c8 d->class = PCI_CLASS_STORAGE_SCSI << 8; } } +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, pci_fixup_ncr53c810); static void __devinit pci_fixup_ide_bases(struct pci_dev *d) { @@ -86,6 +90,7 @@ static void __devinit pci_fixup_ide_base } } } +DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases); static void __devinit pci_fixup_ide_trash(struct pci_dev *d) { @@ -108,6 +113,10 @@ static void __devinit pci_fixup_ide_tra for(i=0; i<4; i++) d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0; } +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5513, pci_fixup_ide_trash); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_10, pci_fixup_ide_trash); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_11, pci_fixup_ide_trash); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_9, pci_fixup_ide_trash); static void __devinit pci_fixup_latency(struct pci_dev *d) { @@ -118,6 +127,8 @@ static void __devinit pci_fixup_latency DBG("PCI: Setting max latency to 32\n"); pcibios_max_latency = 32; } +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, pci_fixup_latency); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5598, pci_fixup_latency); static void __devinit pci_fixup_piix4_acpi(struct pci_dev *d) { @@ -126,6 +137,7 @@ static void __devinit pci_fixup_piix4_ac */ d->irq = 9; } +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, pci_fixup_piix4_acpi); /* * Addresses issues with problems in the memory write queue timer in @@ -179,6 +191,10 @@ static void __devinit pci_fixup_via_nort pci_write_config_byte(d, where, v); } } +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, pci_fixup_via_northbridge_bug); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8622, pci_fixup_via_northbridge_bug); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, pci_fixup_via_northbridge_bug); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_northbridge_bug); /* * For some reasons Intel decided that certain parts of their @@ -195,6 +211,7 @@ static void __devinit pci_fixup_transpar (dev->device & 0xff00) == 0x2400) dev->transparent = 1; } +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_fixup_transparent_bridge); /* * Fixup for C1 Halt Disconnect problem on nForce2 systems. @@ -236,115 +253,5 @@ static void __init pci_fixup_nforce2(str pci_write_config_dword(dev, 0x6c, fixed_val); } } +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2, pci_fixup_nforce2); -struct pci_fixup pcibios_fixups[] = { - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_INTEL_82451NX, - .hook = pci_fixup_i450nx - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_INTEL_82454GX, - .hook = pci_fixup_i450gx - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_UMC, - .device = PCI_DEVICE_ID_UMC_UM8886BF, - .hook = pci_fixup_umc_ide - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_SI, - .device = PCI_DEVICE_ID_SI_5513, - .hook = pci_fixup_ide_trash - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_ANY_ID, - .device = PCI_ANY_ID, - .hook = pci_fixup_ide_bases - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_SI, - .device = PCI_DEVICE_ID_SI_5597, - .hook = pci_fixup_latency - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_SI, - .device = PCI_DEVICE_ID_SI_5598, - .hook = pci_fixup_latency - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_INTEL_82371AB_3, - .hook = pci_fixup_piix4_acpi - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_INTEL_82801CA_10, - .hook = pci_fixup_ide_trash - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_INTEL_82801CA_11, - .hook = pci_fixup_ide_trash - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_INTEL_82801DB_9, - .hook = pci_fixup_ide_trash - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_VIA, - .device = PCI_DEVICE_ID_VIA_8363_0, - .hook = pci_fixup_via_northbridge_bug - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_VIA, - .device = PCI_DEVICE_ID_VIA_8622, - .hook = pci_fixup_via_northbridge_bug - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_VIA, - .device = PCI_DEVICE_ID_VIA_8361, - .hook = pci_fixup_via_northbridge_bug - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_VIA, - .device = PCI_DEVICE_ID_VIA_8367_0, - .hook = pci_fixup_via_northbridge_bug - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_NCR, - .device = PCI_DEVICE_ID_NCR_53C810, - .hook = pci_fixup_ncr53c810 - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_ANY_ID, - .hook = pci_fixup_transparent_bridge - }, - { - .pass = PCI_FIXUP_HEADER, - .vendor = PCI_VENDOR_ID_NVIDIA, - .device = PCI_DEVICE_ID_NVIDIA_NFORCE2, - .hook = pci_fixup_nforce2 - }, - { .pass = 0 } -}; --- linux-2.6.8/arch/xen/i386/kernel/Makefile.kbuild-lds 2004-10-13 18:09:59.000000000 -0400 +++ linux-2.6.8/arch/xen/i386/kernel/Makefile 2004-10-13 18:20:18.000000000 -0400 @@ -6,7 +6,7 @@ XENARCH := $(subst ",,$(CONFIG_XENARCH)) CFLAGS += -Iarch/$(XENARCH)/kernel -extra-y := head.o init_task.o vmlinux.lds.s +extra-y := head.o init_task.o vmlinux.lds obj-y := traps.o irq.o ldt.o setup.o entry.o time.o pci-dma.o process.o \ ioport.o signal.o i386_ksyms.o @@ -45,7 +45,7 @@ EXTRA_AFLAGS := -traditional c-obj-$(CONFIG_SCx200) += scx200.o -AFLAGS_vmlinux.lds.o += -U$(XENARCH) +CPPFLAGS_vmlinux.lds += -U$(XENARCH) # vsyscall.o contains the vsyscall DSO images as __initdata. # We must build both images before we can assemble it. --- linux-2.6.8/arch/xen/kernel/Makefile.kbuild-lds 2004-10-13 18:03:01.000000000 -0400 +++ linux-2.6.8/arch/xen/kernel/Makefile 2004-10-13 18:11:03.000000000 -0400 @@ -4,10 +4,10 @@ XENARCH := $(subst ",,$(CONFIG_XENARCH)) -$(obj)/vmlinux.lds.s: - @ln -fsn $(srctree)/arch/$(ARCH)/$(XENARCH)/kernel/vmlinux.lds.s $@ +$(obj)/vmlinux.lds: + @ln -fsn $(srctree)/arch/$(ARCH)/$(XENARCH)/kernel/vmlinux.lds $@ -extra-y += vmlinux.lds.s +extra-y += vmlinux.lds obj-y := ctrl_if.o evtchn.o fixup.o process.o reboot.o xen_proc.o empty.o \ gnttab.o skbuff.o --- linux-2.6.8/arch/xen/kernel/process.c.269fix 2004-10-13 18:31:09.000000000 -0400 +++ linux-2.6.8/arch/xen/kernel/process.c 2004-10-13 18:34:37.000000000 -0400 @@ -12,10 +12,10 @@ extern int set_timeout_timer(void); void xen_cpu_idle (void) { - int cpu = smp_processor_id(); + struct rcu_data *rdp = &__get_cpu_var(rcu_bh_data); local_irq_disable(); - if (need_resched() || RCU_curlist(cpu)) { + if (need_resched() || rdp->curlist){ local_irq_enable(); return; } --- linux-2.6.8/include/asm-xen/asm-i386/mach-xen/do_timer.h.269 2004-10-15 13:42:06.000000000 -0400 +++ linux-2.6.8/include/asm-xen/asm-i386/mach-xen/do_timer.h 2004-10-15 13:42:27.000000000 -0400 @@ -23,7 +23,7 @@ static inline void do_timer_interrupt_ho */ #ifndef CONFIG_X86_LOCAL_APIC if (regs) - x86_do_profile(regs); + profile_tick(CPU_PROFILING, regs); #else if (regs && !using_apic_timer) smp_local_timer_interrupt(regs); --- linux-2.6.8/include/asm-xen/asm-i386/ptrace.h.269 2004-10-15 13:45:01.000000000 -0400 +++ linux-2.6.8/include/asm-xen/asm-i386/ptrace.h 2004-10-15 15:03:33.000000000 -0400 @@ -54,6 +54,12 @@ struct pt_regs { #define PTRACE_GET_THREAD_AREA 25 #define PTRACE_SET_THREAD_AREA 26 +#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) +extern unsigned long profile_pc(struct pt_regs *regs); +#else +#define profile_pc(regs) instruction_pointer(regs) +#endif + #ifdef __KERNEL__ #define user_mode(regs) ((VM_MASK & (regs)->eflags) || (2 & (regs)->xcs)) #define instruction_pointer(regs) ((regs)->eip) --- linux-2.6.8/arch/xen/i386/kernel/time.c.269 2004-10-15 13:40:26.000000000 -0400 +++ linux-2.6.8/arch/xen/i386/kernel/time.c 2004-10-15 13:40:40.000000000 -0400 @@ -68,7 +68,7 @@ #include "io_ports.h" -extern spinlock_t i8259A_lock; +spinlock_t i8259A_lock = SPIN_LOCK_UNLOCKED; int pit_latch_buggy; /* extern */ #include "do_timer.h" --- linux-2.6.8/kernel/profile.c.269 2004-10-15 13:48:32.000000000 -0400 +++ linux-2.6.8/kernel/profile.c 2004-10-15 13:48:58.000000000 -0400 @@ -10,6 +10,7 @@ #include #include #include +#include #include static atomic_t *prof_buffer;