[kernel] r6661 - in dists/sid/linux-2.6/debian/patches: series
Bastian Blank
waldi at costa.debian.org
Sun May 21 08:02:52 UTC 2006
Author: waldi
Date: Sun May 21 08:02:50 2006
New Revision: 6661
Added:
dists/sid/linux-2.6/debian/patches/xen-tree-3.0-testing-9687-update.patch (contents, props changed)
Modified:
dists/sid/linux-2.6/debian/patches/series/14-extra
Log:
Update xen patch to changeset 9687.
* debian/patches/series/14-extra: Add xen-tree-3.0-testing-9687-update.patch.
* debian/patches/xen-tree-3.0-testing-9687-update.patch: Add.
Modified: dists/sid/linux-2.6/debian/patches/series/14-extra
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/14-extra (original)
+++ dists/sid/linux-2.6/debian/patches/series/14-extra Sun May 21 08:02:50 2006
@@ -3,3 +3,4 @@
+ m68k-sun3.patch m68k
+ m68k-sun3-scsi.patch m68k
+ vserver-vs2.0.2-rc20-update.patch *_vserver *_xen-vserver
++ xen-tree-3.0-testing-9687-update.patch *_xen *_xen-vserver
Added: dists/sid/linux-2.6/debian/patches/xen-tree-3.0-testing-9687-update.patch
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/xen-tree-3.0-testing-9687-update.patch Sun May 21 08:02:50 2006
@@ -0,0 +1,1672 @@
+diff -u tmp-linux-2.6-xen.patch/arch/i386/kernel/fixup.c tmp-linux-2.6-xen.patch/arch/i386/kernel/fixup.c
+--- tmp-linux-2.6-xen.patch/arch/i386/kernel/fixup.c 2006-05-21 09:53:23.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/fixup.c 2006-05-21 09:54:51.000000000 +0200
+@@ -87,10 +86,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/arch/i386/kernel/pci-dma-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/pci-dma-xen.c
+--- tmp-linux-2.6-xen.patch/arch/i386/kernel/pci-dma-xen.c 2006-05-21 09:53:23.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/pci-dma-xen.c 2006-05-21 09:54:51.000000000 +0200
+@@ -335,10 +334,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/arch/i386/kernel/swiotlb.c tmp-linux-2.6-xen.patch/arch/i386/kernel/swiotlb.c
+--- tmp-linux-2.6-xen.patch/arch/i386/kernel/swiotlb.c 2006-05-21 09:53:23.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/swiotlb.c 2006-05-21 09:54:51.000000000 +0200
+@@ -665,10 +664,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/arch/i386/kernel/time-xen.c tmp-linux-2.6-xen.patch/arch/i386/kernel/time-xen.c
+--- tmp-linux-2.6-xen.patch/arch/i386/kernel/time-xen.c 2006-05-21 09:53:23.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/time-xen.c 2006-05-21 09:54:51.000000000 +0200
+@@ -1088,10 +1087,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/arch/i386/kernel/vm86.c tmp-linux-2.6-xen.patch/arch/i386/kernel/vm86.c
+--- tmp-linux-2.6-xen.patch/arch/i386/kernel/vm86.c 2006-05-21 09:53:23.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/i386/kernel/vm86.c 2006-05-21 09:54:51.000000000 +0200
+@@ -43,6 +43,7 @@
+ #include <linux/smp_lock.h>
+ #include <linux/highmem.h>
+ #include <linux/ptrace.h>
++#include <linux/audit.h>
+
+ #include <asm/uaccess.h>
+ #include <asm/io.h>
+@@ -258,6 +259,7 @@
+ #ifndef CONFIG_X86_NO_TSS
+ struct tss_struct *tss;
+ #endif
++ long eax;
+ /*
+ * make sure the vm86() system call doesn't try to do anything silly
+ */
+@@ -313,13 +315,19 @@
+ tsk->thread.screen_bitmap = info->screen_bitmap;
+ if (info->flags & VM86_SCREEN_BITMAP)
+ mark_screen_rdonly(tsk->mm);
++ __asm__ __volatile__("xorl %eax,%eax; movl %eax,%fs; movl %eax,%gs\n\t");
++ __asm__ __volatile__("movl %%eax, %0\n" :"=r"(eax));
++
++ /*call audit_syscall_exit since we do not exit via the normal paths */
++ if (unlikely(current->audit_context))
++ audit_syscall_exit(current, AUDITSC_RESULT(eax), eax);
++
+ __asm__ __volatile__(
+- "xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs\n\t"
+ "movl %0,%%esp\n\t"
+ "movl %1,%%ebp\n\t"
+ "jmp resume_userspace"
+ : /* no outputs */
+- :"r" (&info->regs), "r" (task_thread_info(tsk)) : "ax");
++ :"r" (&info->regs), "r" (task_thread_info(tsk)));
+ /* we never return here */
+ }
+
+diff -u tmp-linux-2.6-xen.patch/arch/i386/mm/hypervisor.c tmp-linux-2.6-xen.patch/arch/i386/mm/hypervisor.c
+--- tmp-linux-2.6-xen.patch/arch/i386/mm/hypervisor.c 2006-05-21 09:53:23.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/i386/mm/hypervisor.c 2006-05-21 09:54:51.000000000 +0200
+@@ -415,10 +414,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/arch/i386/mm/ioremap-xen.c tmp-linux-2.6-xen.patch/arch/i386/mm/ioremap-xen.c
+--- tmp-linux-2.6-xen.patch/arch/i386/mm/ioremap-xen.c 2006-05-21 09:53:23.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/i386/mm/ioremap-xen.c 2006-05-21 09:54:51.000000000 +0200
+@@ -455,10 +454,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable-xen.c tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable-xen.c
+--- tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable-xen.c 2006-05-21 09:53:23.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/i386/mm/pgtable-xen.c 2006-05-21 09:54:51.000000000 +0200
+@@ -643,10 +642,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/arch/x86_64/ia32/Makefile tmp-linux-2.6-xen.patch/arch/x86_64/ia32/Makefile
+--- tmp-linux-2.6-xen.patch/arch/x86_64/ia32/Makefile 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/x86_64/ia32/Makefile 2006-05-21 09:54:51.000000000 +0200
+@@ -28,11 +28,11 @@
+ $(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE
+ $(call if_changed,syscall)
+
+-AFLAGS_vsyscall-sysenter.o = -m32 -Iarch/i386/kernel
+-AFLAGS_vsyscall-syscall.o = -m32 -Iarch/i386/kernel
++AFLAGS_vsyscall-sysenter.o = -m32 -Wa,-32 -Iarch/i386/kernel
++AFLAGS_vsyscall-syscall.o = -m32 -Wa,-32 -Iarch/i386/kernel
+
+ ifdef CONFIG_XEN
+-AFLAGS_vsyscall-int80.o = -m32 -Iarch/i386/kernel
++AFLAGS_vsyscall-int80.o = -m32 -Wa,-32 -Iarch/i386/kernel
+ CFLAGS_syscall32-xen.o += -DUSE_INT80
+ AFLAGS_syscall32_syscall-xen.o += -DUSE_INT80
+
+diff -u tmp-linux-2.6-xen.patch/arch/x86_64/kernel/entry-xen.S tmp-linux-2.6-xen.patch/arch/x86_64/kernel/entry-xen.S
+--- tmp-linux-2.6-xen.patch/arch/x86_64/kernel/entry-xen.S 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/entry-xen.S 2006-05-21 09:54:51.000000000 +0200
+@@ -221,6 +221,10 @@
+ *
+ * XXX if we had a free scratch register we could save the RSP into the stack frame
+ * and report it properly in ps. Unfortunately we haven't.
++ *
++ * When user can change the frames always force IRET. That is because
++ * it deals with uncanonical addresses better. SYSRET has trouble
++ * with them due to bugs in both AMD and Intel CPUs.
+ */
+
+ ENTRY(system_call)
+@@ -289,7 +293,10 @@
+ xorl %esi,%esi # oldset -> arg2
+ call ptregscall_common
+ 1: movl $_TIF_NEED_RESCHED,%edi
+- jmp sysret_check
++ /* Use IRET because user could have changed frame. This
++ works because ptregscall_common has called FIXUP_TOP_OF_STACK. */
++ cli
++ jmp int_with_check
+
+ badsys:
+ movq $-ENOSYS,RAX-ARGOFFSET(%rsp)
+@@ -315,7 +322,8 @@
+ call syscall_trace_leave
+ RESTORE_TOP_OF_STACK %rbx
+ RESTORE_REST
+- jmp ret_from_sys_call
++ /* Use IRET because user could have changed frame */
++ jmp int_ret_from_sys_call
+ CFI_ENDPROC
+
+ /*
+@@ -449,25 +457,9 @@
+ CFI_ADJUST_CFA_OFFSET -8
+ CFI_REGISTER rip, r11
+ SAVE_REST
+- movq %r11, %r15
+- CFI_REGISTER rip, r15
+ FIXUP_TOP_OF_STACK %r11
+ call sys_execve
+- GET_THREAD_INFO(%rcx)
+- bt $TIF_IA32,threadinfo_flags(%rcx)
+- CFI_REMEMBER_STATE
+- jc exec_32bit
+ RESTORE_TOP_OF_STACK %r11
+- movq %r15, %r11
+- CFI_REGISTER rip, r11
+- RESTORE_REST
+- pushq %r11
+- CFI_ADJUST_CFA_OFFSET 8
+- CFI_REL_OFFSET rip, 0
+- ret
+-
+-exec_32bit:
+- CFI_RESTORE_STATE
+ movq %rax,RAX(%rsp)
+ RESTORE_REST
+ jmp int_ret_from_sys_call
+diff -u tmp-linux-2.6-xen.patch/arch/x86_64/kernel/process-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/process-xen.c
+--- tmp-linux-2.6-xen.patch/arch/x86_64/kernel/process-xen.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/process-xen.c 2006-05-21 09:54:51.000000000 +0200
+@@ -485,6 +485,10 @@
+ * This is basically '__unlazy_fpu', except that we queue a
+ * multicall to indicate FPU task switch, rather than
+ * synchronously trapping to Xen.
++ * This must be here to ensure both math_state_restore() and
++ * kernel_fpu_begin() work consistently.
++ * The AMD workaround requires it to be after DS reload, or
++ * after DS has been cleared, which we do in __prepare_arch_switch.
+ */
+ if (prev_p->thread_info->status & TS_USEDFPU) {
+ __save_init_fpu(prev_p); /* _not_ save_init_fpu() */
+diff -u tmp-linux-2.6-xen.patch/arch/x86_64/kernel/setup-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/kernel/setup-xen.c
+--- tmp-linux-2.6-xen.patch/arch/x86_64/kernel/setup-xen.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/x86_64/kernel/setup-xen.c 2006-05-21 09:54:51.000000000 +0200
+@@ -1158,6 +1158,10 @@
+ if (c->x86 == 15 && ((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58))
+ set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability);
+
++ /* Enable workaround for FXSAVE leak */
++ if (c->x86 >= 6)
++ set_bit(X86_FEATURE_FXSAVE_LEAK, &c->x86_capability);
++
+ r = get_model_name(c);
+ if (!r) {
+ switch (c->x86) {
+diff -u tmp-linux-2.6-xen.patch/arch/x86_64/mm/init-xen.c tmp-linux-2.6-xen.patch/arch/x86_64/mm/init-xen.c
+--- tmp-linux-2.6-xen.patch/arch/x86_64/mm/init-xen.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/arch/x86_64/mm/init-xen.c 2006-05-21 09:54:51.000000000 +0200
+@@ -1092,10 +1091,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/char/tty_io.c tmp-linux-2.6-xen.patch/drivers/char/tty_io.c
+--- tmp-linux-2.6-xen.patch/drivers/char/tty_io.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/char/tty_io.c 2006-05-21 09:54:51.000000000 +0200
+@@ -2708,7 +2708,11 @@
+ }
+ task_lock(p);
+ if (p->files) {
+- rcu_read_lock();
++ /*
++ * We don't take a ref to the file, so we must
++ * hold ->file_lock instead.
++ */
++ spin_lock(&p->files->file_lock);
+ fdt = files_fdtable(p->files);
+ for (i=0; i < fdt->max_fds; i++) {
+ filp = fcheck_files(p->files, i);
+@@ -2723,7 +2727,7 @@
+ break;
+ }
+ }
+- rcu_read_unlock();
++ spin_unlock(&p->files->file_lock);
+ }
+ task_unlock(p);
+ } while_each_task_pid(session, PIDTYPE_SID, p);
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/balloon/balloon.c tmp-linux-2.6-xen.patch/drivers/xen/balloon/balloon.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/balloon/balloon.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/balloon/balloon.c 2006-05-21 09:54:51.000000000 +0200
+@@ -583,10 +582,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/blkback/blkback.c tmp-linux-2.6-xen.patch/drivers/xen/blkback/blkback.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/blkback/blkback.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/blkback.c 2006-05-21 09:54:51.000000000 +0200
+@@ -573,24 +573,7 @@
+- __unsafe(THIS_MODULE);
++
+ return 0;
+ }
+
+ module_init(blkif_init);
+
+-static void blkif_exit(void)
+-{
+- BUG();
+-}
+-
+-module_exit(blkif_exit);
+-
+ MODULE_LICENSE("Dual BSD/GPL");
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/blkback/common.h tmp-linux-2.6-xen.patch/drivers/xen/blkback/common.h
+--- tmp-linux-2.6-xen.patch/drivers/xen/blkback/common.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/common.h 2006-05-21 09:54:51.000000000 +0200
+@@ -34,6 +34,7 @@
+ #include <linux/slab.h>
+ #include <linux/blkdev.h>
+ #include <linux/vmalloc.h>
++#include <linux/wait.h>
+ #include <asm/io.h>
+ #include <asm/setup.h>
+ #include <asm/pgalloc.h>
+@@ -91,21 +92,21 @@
+ int st_wr_req;
+ int st_oo_req;
+
+- struct work_struct free_work;
++ wait_queue_head_t waiting_to_free;
+
+ grant_handle_t shmem_handle;
+ grant_ref_t shmem_ref;
+ } blkif_t;
+
+-blkif_t *alloc_blkif(domid_t domid);
+-void free_blkif_callback(blkif_t *blkif);
++blkif_t *blkif_alloc(domid_t domid);
++void blkif_free(blkif_t *blkif);
+ int blkif_map(blkif_t *blkif, unsigned long shared_page, unsigned int evtchn);
+
+ #define blkif_get(_b) (atomic_inc(&(_b)->refcnt))
+ #define blkif_put(_b) \
+ do { \
+ if (atomic_dec_and_test(&(_b)->refcnt)) \
+- free_blkif_callback(_b); \
++ wake_up(&(_b)->waiting_to_free);\
+ } while (0)
+
+ /* Create a vbd. */
+@@ -139,10 +139,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/blkback/interface.c tmp-linux-2.6-xen.patch/drivers/xen/blkback/interface.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/blkback/interface.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/interface.c 2006-05-21 09:54:51.000000000 +0200
+@@ -35,7 +35,7 @@
+
+ static kmem_cache_t *blkif_cachep;
+
+-blkif_t *alloc_blkif(domid_t domid)
++blkif_t *blkif_alloc(domid_t domid)
+ {
+ blkif_t *blkif;
+
+@@ -50,6 +50,7 @@
+ atomic_set(&blkif->refcnt, 1);
+ init_waitqueue_head(&blkif->wq);
+ blkif->st_print = jiffies;
++ init_waitqueue_head(&blkif->waiting_to_free);
+
+ return blkif;
+ }
+@@ -147,42 +148,24 @@
+-static void free_blkif(void *arg)
++void blkif_free(blkif_t *blkif)
+ {
+- blkif_t *blkif = (blkif_t *)arg;
++ atomic_dec(&blkif->refcnt);
++ wait_event(blkif->waiting_to_free, atomic_read(&blkif->refcnt) == 0);
+
+ /* Already disconnected? */
+- if (blkif->irq) {
++ if (blkif->irq)
+ unbind_from_irqhandler(blkif->irq, blkif);
+- blkif->irq = 0;
+- }
+
+ vbd_free(&blkif->vbd);
+
+ if (blkif->blk_ring.sring) {
+ unmap_frontend_page(blkif);
+ free_vm_area(blkif->blk_ring_area);
+- blkif->blk_ring.sring = NULL;
+ }
+
+ kmem_cache_free(blkif_cachep, blkif);
+ }
+
+-void free_blkif_callback(blkif_t *blkif)
+-{
+- INIT_WORK(&blkif->free_work, free_blkif, (void *)blkif);
+- schedule_work(&blkif->free_work);
+-}
+-
+ void __init blkif_interface_init(void)
+ {
+ blkif_cachep = kmem_cache_create("blkif_cache", sizeof(blkif_t),
+ 0, 0, NULL, NULL);
+ }
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/blkback/vbd.c tmp-linux-2.6-xen.patch/drivers/xen/blkback/vbd.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/blkback/vbd.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/vbd.c 2006-05-21 09:54:51.000000000 +0200
+@@ -55,6 +55,7 @@
+ unsigned minor, int readonly)
+ {
+ struct vbd *vbd;
++ struct block_device *bdev;
+
+ vbd = &blkif->vbd;
+ vbd->handle = handle;
+@@ -63,15 +64,17 @@
+
+ vbd->pdevice = MKDEV(major, minor);
+
+- vbd->bdev = open_by_devnum(
+- vbd->pdevice,
+- vbd->readonly ? FMODE_READ : FMODE_WRITE);
+- if (IS_ERR(vbd->bdev)) {
+- DPRINTK("vbd_creat: device %08x doesn't exist.\n",
++ bdev = open_by_devnum(vbd->pdevice,
++ vbd->readonly ? FMODE_READ : FMODE_WRITE);
++
++ if (IS_ERR(bdev)) {
++ DPRINTK("vbd_creat: device %08x could not be opened.\n",
+ vbd->pdevice);
+ return -ENOENT;
+ }
+
++ vbd->bdev = bdev;
++
+ if (vbd->bdev->bd_disk == NULL) {
+ DPRINTK("vbd_creat: device %08x doesn't exist.\n",
+ vbd->pdevice);
+@@ -117,10 +119,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/blkback/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/blkback/xenbus.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/blkback/xenbus.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkback/xenbus.c 2006-05-21 09:54:51.000000000 +0200
+@@ -112,7 +112,7 @@
+ be->blkif->status = DISCONNECTED;
+ if (be->blkif->xenblkd)
+ kthread_stop(be->blkif->xenblkd);
+- blkif_put(be->blkif);
++ blkif_free(be->blkif);
+ be->blkif = NULL;
+ }
+
+@@ -144,7 +144,7 @@
+ be->dev = dev;
+ dev->data = be;
+
+- be->blkif = alloc_blkif(dev->otherend_id);
++ be->blkif = blkif_alloc(dev->otherend_id);
+ if (IS_ERR(be->blkif)) {
+ err = PTR_ERR(be->blkif);
+ be->blkif = NULL;
+@@ -415,11 +414,0 @@
+-
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/blkfront/blkfront.c tmp-linux-2.6-xen.patch/drivers/xen/blkfront/blkfront.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/blkfront/blkfront.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkfront/blkfront.c 2006-05-21 09:54:51.000000000 +0200
+@@ -810,10 +809,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/blkfront/block.h tmp-linux-2.6-xen.patch/drivers/xen/blkfront/block.h
+--- tmp-linux-2.6-xen.patch/drivers/xen/blkfront/block.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkfront/block.h 2006-05-21 09:54:51.000000000 +0200
+@@ -156,10 +155,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/blkfront/vbd.c tmp-linux-2.6-xen.patch/drivers/xen/blkfront/vbd.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/blkfront/vbd.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/blkfront/vbd.c 2006-05-21 09:54:51.000000000 +0200
+@@ -318,10 +317,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/blktap/blktap.c tmp-linux-2.6-xen.patch/drivers/xen/blktap/blktap.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/blktap/blktap.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/blktap.c 2006-05-21 09:54:51.000000000 +0200
+@@ -901,10 +900,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/blktap/common.h tmp-linux-2.6-xen.patch/drivers/xen/blktap/common.h
+--- tmp-linux-2.6-xen.patch/drivers/xen/blktap/common.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/common.h 2006-05-21 09:54:51.000000000 +0200
+@@ -101,10 +100,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/blktap/interface.c tmp-linux-2.6-xen.patch/drivers/xen/blktap/interface.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/blktap/interface.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/interface.c 2006-05-21 09:54:51.000000000 +0200
+@@ -137,10 +136,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/blktap/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/blktap/xenbus.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/blktap/xenbus.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/blktap/xenbus.c 2006-05-21 09:54:51.000000000 +0200
+@@ -224,10 +223,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/char/mem.c tmp-linux-2.6-xen.patch/drivers/xen/char/mem.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/char/mem.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/char/mem.c 2006-05-21 09:54:51.000000000 +0200
+@@ -183,10 +182,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/console/console.c tmp-linux-2.6-xen.patch/drivers/xen/console/console.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/console/console.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/console/console.c 2006-05-21 09:54:51.000000000 +0200
+@@ -639,10 +638,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/console/xencons_ring.c tmp-linux-2.6-xen.patch/drivers/xen/console/xencons_ring.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/console/xencons_ring.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/console/xencons_ring.c 2006-05-21 09:54:51.000000000 +0200
+@@ -142,10 +141,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/core/evtchn.c tmp-linux-2.6-xen.patch/drivers/xen/core/evtchn.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/core/evtchn.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/evtchn.c 2006-05-21 09:54:51.000000000 +0200
+@@ -860,10 +859,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/core/gnttab.c tmp-linux-2.6-xen.patch/drivers/xen/core/gnttab.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/core/gnttab.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/gnttab.c 2006-05-21 09:54:51.000000000 +0200
+@@ -455,10 +454,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/core/reboot.c tmp-linux-2.6-xen.patch/drivers/xen/core/reboot.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/core/reboot.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/reboot.c 2006-05-21 09:54:51.000000000 +0200
+@@ -372,10 +371,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/core/skbuff.c tmp-linux-2.6-xen.patch/drivers/xen/core/skbuff.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/core/skbuff.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/skbuff.c 2006-05-21 09:54:51.000000000 +0200
+@@ -135,10 +134,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/core/smpboot.c tmp-linux-2.6-xen.patch/drivers/xen/core/smpboot.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/core/smpboot.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/smpboot.c 2006-05-21 09:54:51.000000000 +0200
+@@ -107,6 +107,18 @@
+ {
+ }
+
++static inline void
++set_cpu_sibling_map(int cpu)
++{
++ phys_proc_id[cpu] = cpu;
++ cpu_core_id[cpu] = 0;
++
++ cpu_sibling_map[cpu] = cpumask_of_cpu(cpu);
++ cpu_core_map[cpu] = cpumask_of_cpu(cpu);
++
++ cpu_data[cpu].booted_cores = 1;
++}
++
+ static void xen_smp_intr_init(unsigned int cpu)
+ {
+ sprintf(resched_name[cpu], "resched%d", cpu);
+@@ -230,14 +242,20 @@
+ struct Xgt_desc_struct *gdt_descr;
+ #endif
+
++ boot_cpu_data.apicid = 0;
+ cpu_data[0] = boot_cpu_data;
+
+ cpu_2_logical_apicid[0] = 0;
+ x86_cpu_to_apicid[0] = 0;
+
+ current_thread_info()->cpu = 0;
+- cpu_sibling_map[0] = cpumask_of_cpu(0);
+- cpu_core_map[0] = cpumask_of_cpu(0);
++
++ for (cpu = 0; cpu < NR_CPUS; cpu++) {
++ cpus_clear(cpu_sibling_map[cpu]);
++ cpus_clear(cpu_core_map[cpu]);
++ }
++
++ set_cpu_sibling_map(0);
+
+ xen_smp_intr_init(0);
+
+@@ -262,6 +280,8 @@
+ XENFEAT_writable_descriptor_tables);
+
+ cpu_data[cpu] = boot_cpu_data;
++ cpu_data[cpu].apicid = cpu;
++
+ cpu_2_logical_apicid[cpu] = cpu;
+ x86_cpu_to_apicid[cpu] = cpu;
+
+@@ -470,6 +490,18 @@
+ vcpu_hotplug(i);
+ }
+
++static void
++remove_siblinginfo(int cpu)
++{
++ phys_proc_id[cpu] = BAD_APICID;
++ cpu_core_id[cpu] = BAD_APICID;
++
++ cpus_clear(cpu_sibling_map[cpu]);
++ cpus_clear(cpu_core_map[cpu]);
++
++ cpu_data[cpu].booted_cores = 0;
++}
++
+ int __cpu_disable(void)
+ {
+ cpumask_t map = cpu_online_map;
+@@ -478,6 +510,8 @@
+ if (cpu == 0)
+ return -EBUSY;
+
++ remove_siblinginfo(cpu);
++
+ cpu_clear(cpu, map);
+ fixup_irqs(map);
+ cpu_clear(cpu, cpu_online_map);
+@@ -549,6 +583,10 @@
+ prepare_for_smp();
+ #endif
+
++ /* This must be done before setting cpu_online_map */
++ set_cpu_sibling_map(cpu);
++ wmb();
++
+ xen_smp_intr_init(cpu);
+ cpu_set(cpu, cpu_online_map);
+
+@@ -572,10 +609,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/core/xen_proc.c tmp-linux-2.6-xen.patch/drivers/xen/core/xen_proc.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/core/xen_proc.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/core/xen_proc.c 2006-05-21 09:54:51.000000000 +0200
+@@ -20,10 +19,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/evtchn/evtchn.c tmp-linux-2.6-xen.patch/drivers/xen/evtchn/evtchn.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/evtchn/evtchn.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/evtchn/evtchn.c 2006-05-21 09:54:51.000000000 +0200
+@@ -455,10 +454,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/netback/common.h tmp-linux-2.6-xen.patch/drivers/xen/netback/common.h
+--- tmp-linux-2.6-xen.patch/drivers/xen/netback/common.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/netback/common.h 2006-05-21 09:54:51.000000000 +0200
+@@ -38,6 +38,7 @@
+ #include <linux/in.h>
+ #include <linux/netdevice.h>
+ #include <linux/etherdevice.h>
++#include <linux/wait.h>
+ #include <xen/evtchn.h>
+ #include <xen/interface/io/netif.h>
+ #include <asm/io.h>
+@@ -91,7 +92,7 @@
+ struct net_device *dev;
+ struct net_device_stats stats;
+
+- struct work_struct free_work;
++ wait_queue_head_t waiting_to_free;
+ } netif_t;
+
+ #define NET_TX_RING_SIZE __RING_SIZE((netif_tx_sring_t *)0, PAGE_SIZE)
+@@ -99,8 +100,7 @@
+
+ void netif_disconnect(netif_t *netif);
+
+-netif_t *alloc_netif(domid_t domid, unsigned int handle, u8 be_mac[ETH_ALEN]);
+-void free_netif(netif_t *netif);
++netif_t *netif_alloc(domid_t domid, unsigned int handle, u8 be_mac[ETH_ALEN]);
+ int netif_map(netif_t *netif, unsigned long tx_ring_ref,
+ unsigned long rx_ring_ref, unsigned int evtchn);
+
+@@ -108,7 +108,7 @@
+ #define netif_put(_b) \
+ do { \
+ if ( atomic_dec_and_test(&(_b)->refcnt) ) \
+- free_netif(_b); \
++ wake_up(&(_b)->waiting_to_free); \
+ } while (0)
+
+ void netif_xenbus_init(void);
+@@ -124,10 +123,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/netback/interface.c tmp-linux-2.6-xen.patch/drivers/xen/netback/interface.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/netback/interface.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/netback/interface.c 2006-05-21 09:54:51.000000000 +0200
+@@ -78,7 +78,7 @@
+ .set_tx_csum = ethtool_op_set_tx_csum,
+ };
+
+-netif_t *alloc_netif(domid_t domid, unsigned int handle, u8 be_mac[ETH_ALEN])
++netif_t *netif_alloc(domid_t domid, unsigned int handle, u8 be_mac[ETH_ALEN])
+ {
+ int err = 0, i;
+ struct net_device *dev;
+@@ -97,7 +97,8 @@
+ netif->domid = domid;
+ netif->handle = handle;
+ netif->status = DISCONNECTED;
+- atomic_set(&netif->refcnt, 0);
++ atomic_set(&netif->refcnt, 1);
++ init_waitqueue_head(&netif->waiting_to_free);
+ netif->dev = dev;
+
+ netif->credit_bytes = netif->remaining_credit = ~0UL;
+@@ -278,9 +279,10 @@
+ return err;
+ }
+
+-static void free_netif_callback(void *arg)
++static void netif_free(netif_t *netif)
+ {
+- netif_t *netif = (netif_t *)arg;
++ atomic_dec(&netif->refcnt);
++ wait_event(netif->waiting_to_free, atomic_read(&netif->refcnt) == 0);
+
+ if (netif->irq)
+ unbind_from_irqhandler(netif->irq, netif);
+@@ -296,12 +298,6 @@
+ free_netdev(netif->dev);
+ }
+
+-void free_netif(netif_t *netif)
+-{
+- INIT_WORK(&netif->free_work, free_netif_callback, (void *)netif);
+- schedule_work(&netif->free_work);
+-}
+-
+ void netif_disconnect(netif_t *netif)
+ {
+ switch (netif->status) {
+@@ -316,19 +312,8 @@
+- break;
++ /* fall through */
+ case DISCONNECTED:
+- BUG_ON(atomic_read(&netif->refcnt) != 0);
+- free_netif(netif);
++ netif_free(netif);
+ break;
+ default:
+ BUG();
+ }
+ }
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/netback/loopback.c tmp-linux-2.6-xen.patch/drivers/xen/netback/loopback.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/netback/loopback.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/netback/loopback.c 2006-05-21 09:54:51.000000000 +0200
+@@ -245,10 +244,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/netback/netback.c tmp-linux-2.6-xen.patch/drivers/xen/netback/netback.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/netback/netback.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/netback/netback.c 2006-05-21 09:54:51.000000000 +0200
+@@ -170,7 +170,9 @@
+ ret = skb_copy_bits(skb, -hlen, nskb->data - hlen,
+ skb->len + hlen);
+ BUG_ON(ret);
++ /* Copy only the header fields we use in this driver. */
+ nskb->dev = skb->dev;
++ nskb->ip_summed = skb->ip_summed;
+ nskb->proto_data_valid = skb->proto_data_valid;
+ dev_kfree_skb(skb);
+ skb = nskb;
+@@ -845,24 +847,6 @@
+- __unsafe(THIS_MODULE);
+-
+ return 0;
+ }
+
+-static void netback_cleanup(void)
+-{
+- BUG();
+-}
+-
+ module_init(netback_init);
+-module_exit(netback_cleanup);
+
+ MODULE_LICENSE("Dual BSD/GPL");
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/netback/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/netback/xenbus.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/netback/xenbus.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/netback/xenbus.c 2006-05-21 09:54:51.000000000 +0200
+@@ -172,7 +172,7 @@
+ if (be->netif == NULL) {
+ u8 be_mac[ETH_ALEN] = { 0, 0, 0, 0, 0, 0 };
+
+- be->netif = alloc_netif(dev->otherend_id, handle, be_mac);
++ be->netif = netif_alloc(dev->otherend_id, handle, be_mac);
+ if (IS_ERR(be->netif)) {
+ err = PTR_ERR(be->netif);
+ be->netif = NULL;
+@@ -356,11 +355,0 @@
+-
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/net_driver_util.c tmp-linux-2.6-xen.patch/drivers/xen/net_driver_util.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/net_driver_util.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/net_driver_util.c 2006-05-21 09:54:51.000000000 +0200
+@@ -59,10 +58,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/netfront/netfront.c tmp-linux-2.6-xen.patch/drivers/xen/netfront/netfront.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/netfront/netfront.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/netfront/netfront.c 2006-05-21 09:54:51.000000000 +0200
+@@ -663,7 +663,10 @@
+ goto drop;
+ skb_put(nskb, skb->len);
+ memcpy(nskb->data, skb->data, skb->len);
++ /* Copy only the header fields we use in this driver. */
+ nskb->dev = skb->dev;
++ nskb->ip_summed = skb->ip_summed;
++ nskb->proto_data_valid = skb->proto_data_valid;
+ dev_kfree_skb(skb);
+ skb = nskb;
+ }
+@@ -895,8 +898,11 @@
+ skb_reserve(nskb, 2);
+ skb_put(nskb, skb->len);
+ memcpy(nskb->data, skb->data, skb->len);
++ /* Copy any other fields we already set up. */
+ nskb->dev = skb->dev;
+ nskb->ip_summed = skb->ip_summed;
++ nskb->proto_data_valid = skb->proto_data_valid;
++ nskb->proto_csum_blank = skb->proto_csum_blank;
+ }
+
+ /* Reinitialise and then destroy the old skbuff. */
+@@ -1509,11 +1514,0 @@
+-
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/privcmd/privcmd.c tmp-linux-2.6-xen.patch/drivers/xen/privcmd/privcmd.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/privcmd/privcmd.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/privcmd/privcmd.c 2006-05-21 09:54:51.000000000 +0200
+@@ -293,10 +292,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/tpmback/common.h tmp-linux-2.6-xen.patch/drivers/xen/tpmback/common.h
+--- tmp-linux-2.6-xen.patch/drivers/xen/tpmback/common.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/common.h 2006-05-21 09:54:51.000000000 +0200
+@@ -82,10 +81,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/tpmback/interface.c tmp-linux-2.6-xen.patch/drivers/xen/tpmback/interface.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/tpmback/interface.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/interface.c 2006-05-21 09:54:51.000000000 +0200
+@@ -185,10 +184,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/tpmback/tpmback.c tmp-linux-2.6-xen.patch/drivers/xen/tpmback/tpmback.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/tpmback/tpmback.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/tpmback.c 2006-05-21 09:54:51.000000000 +0200
+@@ -1051,10 +1050,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/tpmback/xenbus.c tmp-linux-2.6-xen.patch/drivers/xen/tpmback/xenbus.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/tpmback/xenbus.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/tpmback/xenbus.c 2006-05-21 09:54:51.000000000 +0200
+@@ -319,10 +318,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/tpmfront/tpmfront.c tmp-linux-2.6-xen.patch/drivers/xen/tpmfront/tpmfront.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/tpmfront/tpmfront.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/tpmfront/tpmfront.c 2006-05-21 09:54:51.000000000 +0200
+@@ -722,10 +721,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/tpmfront/tpmfront.h tmp-linux-2.6-xen.patch/drivers/xen/tpmfront/tpmfront.h
+--- tmp-linux-2.6-xen.patch/drivers/xen/tpmfront/tpmfront.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/tpmfront/tpmfront.h 2006-05-21 09:54:51.000000000 +0200
+@@ -31,10 +30,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/util.c tmp-linux-2.6-xen.patch/drivers/xen/util.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/util.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/util.c 2006-05-21 09:54:51.000000000 +0200
+@@ -71,10 +70,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_backend_client.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_backend_client.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_backend_client.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_backend_client.c 2006-05-21 09:54:51.000000000 +0200
+@@ -143,10 +142,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_client.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_client.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_client.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_client.c 2006-05-21 09:54:51.000000000 +0200
+@@ -274,11 +273,0 @@
+-
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.c 2006-05-21 09:54:51.000000000 +0200
+@@ -209,10 +208,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.h tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.h
+--- tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_comms.h 2006-05-21 09:54:51.000000000 +0200
+@@ -44,10 +43,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_dev.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_dev.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_dev.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_dev.c 2006-05-21 09:54:51.000000000 +0200
+@@ -246,10 +245,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_probe.c 2006-05-21 09:54:51.000000000 +0200
+@@ -1083,11 +1082,0 @@
+-
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_xs.c tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_xs.c
+--- tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_xs.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/drivers/xen/xenbus/xenbus_xs.c 2006-05-21 09:54:51.000000000 +0200
+@@ -847,10 +846,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hypercall.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hypercall.h
+--- tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hypercall.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/hypercall.h 2006-05-21 09:54:51.000000000 +0200
+@@ -333,10 +332,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-2level.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-2level.h
+--- tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-2level.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-2level.h 2006-05-21 09:54:51.000000000 +0200
+@@ -33,6 +33,9 @@
+
+ #define set_pmd(pmdptr, pmdval) xen_l2_entry_update((pmdptr), (pmdval))
+
++#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0)
++#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0)
++
+ #define ptep_get_and_clear(mm,addr,xp) __pte_ma(xchg(&(xp)->pte_low, 0))
+ #define pte_same(a, b) ((a).pte_low == (b).pte_low)
+ #define pte_mfn(_pte) ((_pte).pte_low >> PAGE_SHIFT)
+diff -u tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-3level.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-3level.h
+--- tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-3level.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable-3level.h 2006-05-21 09:54:51.000000000 +0200
+@@ -107,6 +107,20 @@
+ #define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \
+ pmd_index(address))
+
++/*
++ * For PTEs and PDEs, we must clear the P-bit first when clearing a page table
++ * entry, so clear the bottom half first and enforce ordering with a compiler
++ * barrier.
++ */
++static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
++{
++ ptep->pte_low = 0;
++ smp_wmb();
++ ptep->pte_high = 0;
++}
++
++#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0)
++
+ static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
+ {
+ pte_t res;
+diff -u tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable.h tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable.h
+--- tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/asm-i386/mach-xen/asm/pgtable.h 2006-05-21 09:54:51.000000000 +0200
+@@ -205,14 +205,12 @@
+ extern unsigned long pg0[];
+
+ #define pte_present(x) ((x).pte_low & (_PAGE_PRESENT | _PAGE_PROTNONE))
+-#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0)
+
+ /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */
+ #define pmd_none(x) (!(unsigned long)pmd_val(x))
+ /* pmd_present doesn't just test the _PAGE_PRESENT bit since wr.p.t.
+ can temporarily clear it. */
+ #define pmd_present(x) (pmd_val(x))
+-#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0)
+ #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER & ~_PAGE_PRESENT)) != (_KERNPG_TABLE & ~_PAGE_PRESENT))
+
+
+@@ -272,16 +270,7 @@
+ pte_t pte;
+ if (full) {
+ pte = *ptep;
+-#ifdef CONFIG_X86_PAE
+- /* Cannot do this in a single step, as the compiler may
+- issue the two stores in either order, but the hypervisor
+- must not see the high part before the low one. */
+- ptep->pte_low = 0;
+- barrier();
+- ptep->pte_high = 0;
+-#else
+- *ptep = __pte(0);
+-#endif
++ pte_clear(mm, addr, ptep);
+ } else {
+ pte = ptep_get_and_clear(mm, addr, ptep);
+ }
+diff -u tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hypercall.h tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hypercall.h
+--- tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hypercall.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/asm-x86_64/mach-xen/asm/hypercall.h 2006-05-21 09:54:51.000000000 +0200
+@@ -334,10 +333,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/include/linux/mm.h tmp-linux-2.6-xen.patch/include/linux/mm.h
+--- tmp-linux-2.6-xen.patch/include/linux/mm.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/linux/mm.h 2006-05-21 09:54:51.000000000 +0200
+@@ -232,10 +232,9 @@
+ unsigned long private; /* Mapping-private opaque data:
+ * usually used for buffer_heads
+ * if PagePrivate set; used for
+- * swp_entry_t if PageSwapCache.
+- * When page is free, this
++ * swp_entry_t if PageSwapCache;
+ * indicates order in the buddy
+- * system.
++ * system if PG_buddy is set.
+ */
+ struct address_space *mapping; /* If low bit clear, points to
+ * inode address_space, or NULL.
+diff -u tmp-linux-2.6-xen.patch/include/xen/balloon.h tmp-linux-2.6-xen.patch/include/xen/balloon.h
+--- tmp-linux-2.6-xen.patch/include/xen/balloon.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/xen/balloon.h 2006-05-21 09:54:51.000000000 +0200
+@@ -64,10 +63,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/include/xen/driver_util.h tmp-linux-2.6-xen.patch/include/xen/driver_util.h
+--- tmp-linux-2.6-xen.patch/include/xen/driver_util.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/xen/driver_util.h 2006-05-21 09:54:51.000000000 +0200
+@@ -17,10 +16,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/include/xen/evtchn.h tmp-linux-2.6-xen.patch/include/xen/evtchn.h
+--- tmp-linux-2.6-xen.patch/include/xen/evtchn.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/xen/evtchn.h 2006-05-21 09:54:51.000000000 +0200
+@@ -117,10 +116,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/include/xen/foreign_page.h tmp-linux-2.6-xen.patch/include/xen/foreign_page.h
+--- tmp-linux-2.6-xen.patch/include/xen/foreign_page.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/xen/foreign_page.h 2006-05-21 09:54:51.000000000 +0200
+@@ -31,10 +30,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/include/xen/gnttab.h tmp-linux-2.6-xen.patch/include/xen/gnttab.h
+--- tmp-linux-2.6-xen.patch/include/xen/gnttab.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/xen/gnttab.h 2006-05-21 09:54:51.000000000 +0200
+@@ -117,10 +116,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/include/xen/net_driver_util.h tmp-linux-2.6-xen.patch/include/xen/net_driver_util.h
+--- tmp-linux-2.6-xen.patch/include/xen/net_driver_util.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/xen/net_driver_util.h 2006-05-21 09:54:51.000000000 +0200
+@@ -49,10 +48,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/include/xen/public/evtchn.h tmp-linux-2.6-xen.patch/include/xen/public/evtchn.h
+--- tmp-linux-2.6-xen.patch/include/xen/public/evtchn.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/xen/public/evtchn.h 2006-05-21 09:54:51.000000000 +0200
+@@ -92,10 +91,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/include/xen/public/privcmd.h tmp-linux-2.6-xen.patch/include/xen/public/privcmd.h
+--- tmp-linux-2.6-xen.patch/include/xen/public/privcmd.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/xen/public/privcmd.h 2006-05-21 09:54:51.000000000 +0200
+@@ -85,10 +84,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/include/xen/xenbus.h tmp-linux-2.6-xen.patch/include/xen/xenbus.h
+--- tmp-linux-2.6-xen.patch/include/xen/xenbus.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/xen/xenbus.h 2006-05-21 09:54:51.000000000 +0200
+@@ -297,10 +296,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/include/xen/xen_proc.h tmp-linux-2.6-xen.patch/include/xen/xen_proc.h
+--- tmp-linux-2.6-xen.patch/include/xen/xen_proc.h 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/include/xen/xen_proc.h 2006-05-21 09:54:51.000000000 +0200
+@@ -14,10 +13,0 @@
+-
+-/*
+- * Local variables:
+- * c-file-style: "linux"
+- * indent-tabs-mode: t
+- * c-indent-level: 8
+- * c-basic-offset: 8
+- * tab-width: 8
+- * End:
+- */
+diff -u tmp-linux-2.6-xen.patch/mm/page_alloc.c tmp-linux-2.6-xen.patch/mm/page_alloc.c
+--- tmp-linux-2.6-xen.patch/mm/page_alloc.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/mm/page_alloc.c 2006-05-21 09:54:51.000000000 +0200
+@@ -153,7 +153,8 @@
+ 1 << PG_reclaim |
+ 1 << PG_slab |
+ 1 << PG_swapcache |
+- 1 << PG_writeback );
++ 1 << PG_writeback |
++ 1 << PG_buddy );
+ set_page_count(page, 0);
+ reset_page_mapcount(page);
+ page->mapping = NULL;
+@@ -224,12 +225,12 @@
+
+ static inline void set_page_order(struct page *page, int order) {
+ set_page_private(page, order);
+- __SetPagePrivate(page);
++ __SetPageBuddy(page);
+ }
+
+ static inline void rmv_page_order(struct page *page)
+ {
+- __ClearPagePrivate(page);
++ __ClearPageBuddy(page);
+ set_page_private(page, 0);
+ }
+
+@@ -268,11 +269,13 @@
+ * This function checks whether a page is free && is the buddy
+ * we can do coalesce a page and its buddy if
+ * (a) the buddy is not in a hole &&
+- * (b) the buddy is free &&
+- * (c) the buddy is on the buddy system &&
+- * (d) a page and its buddy have the same order.
+- * for recording page's order, we use page_private(page) and PG_private.
++ * (b) the buddy is in the buddy system &&
++ * (c) a page and its buddy have the same order.
++ *
++ * For recording whether a page is in the buddy system, we use PG_buddy.
++ * Setting, clearing, and testing PG_buddy is serialized by zone->lock.
+ *
++ * For recording page's order, we use page_private(page).
+ */
+ static inline int page_is_buddy(struct page *page, int order)
+ {
+@@ -281,10 +284,10 @@
+ return 0;
+ #endif
+
+- if (PagePrivate(page) &&
+- (page_order(page) == order) &&
+- page_count(page) == 0)
++ if (PageBuddy(page) && page_order(page) == order) {
++ BUG_ON(page_count(page) != 0);
+ return 1;
++ }
+ return 0;
+ }
+
+@@ -301,7 +304,7 @@
+ * as necessary, plus some accounting needed to play nicely with other
+ * parts of the VM system.
+ * At each level, we keep a list of pages, which are heads of continuous
+- * free pages of length of (1 << order) and marked with PG_Private.Page's
++ * free pages of length of (1 << order) and marked with PG_buddy. Page's
+ * order is recorded in page_private(page) field.
+ * So when we are allocating or freeing one, we can derive the state of the
+ * other. That is, if we allocate a small block, and both were
+@@ -364,7 +367,8 @@
+ 1 << PG_slab |
+ 1 << PG_swapcache |
+ 1 << PG_writeback |
+- 1 << PG_reserved ))))
++ 1 << PG_reserved |
++ 1 << PG_buddy ))))
+ bad_page(page);
+ if (PageDirty(page))
+ __ClearPageDirty(page);
+@@ -523,7 +527,8 @@
+ 1 << PG_slab |
+ 1 << PG_swapcache |
+ 1 << PG_writeback |
+- 1 << PG_reserved ))))
++ 1 << PG_reserved |
++ 1 << PG_buddy ))))
+ bad_page(page);
+
+ /*
+diff -u tmp-linux-2.6-xen.patch/net/core/dev.c tmp-linux-2.6-xen.patch/net/core/dev.c
+--- tmp-linux-2.6-xen.patch/net/core/dev.c 2006-05-21 09:53:24.000000000 +0200
++++ tmp-linux-2.6-xen.patch/net/core/dev.c 2006-05-21 09:54:51.000000000 +0200
+@@ -2994,11 +2994,11 @@
+
+ switch(dev->reg_state) {
+ case NETREG_REGISTERING:
++ dev->reg_state = NETREG_REGISTERED;
+ err = netdev_register_sysfs(dev);
+ if (err)
+ printk(KERN_ERR "%s: failed sysfs registration (%d)\n",
+ dev->name, err);
+- dev->reg_state = NETREG_REGISTERED;
+ break;
+
+ case NETREG_UNREGISTERING:
More information about the Kernel-svn-changes
mailing list