Whamcloud - gitweb
land v0.9.1 on HEAD, in preparation for a 1.0.x branch
[fs/lustre-release.git] / lustre / kernel_patches / patches / kexec-2.6.0-test6-full.patch
@@ -1,51 +1,10 @@
-# This is a BitKeeper generated patch for the following project:
-# Project Name: Linux kernel tree
-# This patch format is intended for GNU patch command version 2.5 or higher.
-# This patch includes the following deltas:
-#                 ChangeSet    1.1376  -> 1.1380 
-#      arch/i386/kernel/smp.c  1.32    -> 1.33   
-#              kernel/sys.c    1.47    -> 1.48   
-#         arch/i386/Kconfig    1.62    -> 1.63   
-#      arch/i386/kernel/Makefile       1.44    -> 1.45   
-#           kernel/Makefile    1.28    -> 1.29   
-#      arch/i386/kernel/entry.S        1.64    -> 1.65   
-#      arch/i386/kernel/reboot.c       1.8     -> 1.9    
-#      arch/i386/kernel/io_apic.c      1.71    -> 1.72   
-#      arch/i386/kernel/dmi_scan.c     1.36    -> 1.37   
-#                  fs/aio.c    1.32    -> 1.33   
-#      include/asm-i386/apicdef.h      1.8     -> 1.9    
-#               MAINTAINERS    1.149   -> 1.150  
-#      include/asm-i386/unistd.h       1.26    -> 1.27   
-#       arch/i386/defconfig    1.96    -> 1.97   
-#      arch/i386/kernel/i8259.c        1.25    -> 1.26   
-#      include/asm-i386/apic.h 1.13    -> 1.14   
-#      arch/i386/kernel/apic.c 1.42    -> 1.43   
-#      include/linux/reboot.h  1.4     -> 1.5    
-#                     (new)            -> 1.1     include/linux/kexec.h
-#                     (new)            -> 1.1     include/asm-i386/kexec.h
-#                     (new)            -> 1.1     kernel/kexec.c 
-#                     (new)            -> 1.1     arch/i386/kernel/relocate_kernel.S
-#                     (new)            -> 1.1     arch/i386/kernel/machine_kexec.c
-#
-# The following is the BitKeeper ChangeSet Log
-# --------------------------------------------
-# 03/06/23     andyp@andyp.pdx.osdl.net        1.1377
-# kexec2-2.5.73-common.patch
-# --------------------------------------------
-# 03/06/23     andyp@andyp.pdx.osdl.net        1.1378
-# kexec2-2.5.73-x86.patch
-# --------------------------------------------
-# 03/06/23     andyp@andyp.pdx.osdl.net        1.1379
-# kexec2-2.5.73-syscall.patch
-# --------------------------------------------
-# 03/06/23     andyp@andyp.pdx.osdl.net        1.1380
-# kexec2-2.5.73-defconfig.patch
-# --------------------------------------------
-#
-diff -Nru a/MAINTAINERS b/MAINTAINERS
---- a/MAINTAINERS      Mon Jun 23 12:22:26 2003
-+++ b/MAINTAINERS      Mon Jun 23 12:22:26 2003
-@@ -1067,6 +1067,17 @@
+ 0 files changed
+
+Index: linux-2.6.0-test6/MAINTAINERS
+===================================================================
+--- linux-2.6.0-test6.orig/MAINTAINERS 2003-10-07 16:08:42.000000000 +0800
++++ linux-2.6.0-test6/MAINTAINERS      2003-10-07 16:09:00.000000000 +0800
+@@ -1174,6 +1174,17 @@
  W:    http://www.cse.unsw.edu.au/~neilb/patches/linux-devel/
  S:    Maintained
  
@@ -63,11 +22,12 @@ diff -Nru a/MAINTAINERS b/MAINTAINERS
  LANMEDIA WAN CARD DRIVER
  P:    Andrew Stanley-Jones
  M:    asj@lanmedia.com
-diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig
---- a/arch/i386/Kconfig        Mon Jun 23 12:22:26 2003
-+++ b/arch/i386/Kconfig        Mon Jun 23 12:22:26 2003
-@@ -794,6 +794,23 @@
-       depends on ((X86_SUMMIT || X86_GENERICARCH) && NUMA)
+Index: linux-2.6.0-test6/arch/i386/Kconfig
+===================================================================
+--- linux-2.6.0-test6.orig/arch/i386/Kconfig   2003-10-07 16:08:59.000000000 +0800
++++ linux-2.6.0-test6/arch/i386/Kconfig        2003-10-07 16:09:00.000000000 +0800
+@@ -845,6 +845,23 @@
+ # depends on (((X86_SUMMIT || X86_GENERICARCH) && NUMA)) || X86_GENERICARCH
        default y
  
 +config KEXEC
@@ -90,31 +50,34 @@ diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig
  endmenu
  
  
-diff -Nru a/arch/i386/defconfig b/arch/i386/defconfig
---- a/arch/i386/defconfig      Mon Jun 23 12:22:26 2003
-+++ b/arch/i386/defconfig      Mon Jun 23 12:22:26 2003
-@@ -72,6 +72,7 @@
+Index: linux-2.6.0-test6/arch/i386/defconfig
+===================================================================
+--- linux-2.6.0-test6.orig/arch/i386/defconfig 2003-10-07 15:47:25.000000000 +0800
++++ linux-2.6.0-test6/arch/i386/defconfig      2003-10-07 16:09:00.000000000 +0800
+@@ -82,6 +82,7 @@
+ # CONFIG_HUGETLB_PAGE is not set
+ CONFIG_SMP=y
+ CONFIG_NR_CPUS=8
++CONFIG_KEXEC=y
+ CONFIG_PREEMPT=y
  CONFIG_X86_LOCAL_APIC=y
  CONFIG_X86_IO_APIC=y
- CONFIG_NR_CPUS=32
-+CONFIG_KEXEC=y
- CONFIG_X86_MCE=y
- # CONFIG_X86_MCE_NONFATAL is not set
- CONFIG_X86_MCE_P4THERMAL=y
-diff -Nru a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
---- a/arch/i386/kernel/Makefile        Mon Jun 23 12:22:26 2003
-+++ b/arch/i386/kernel/Makefile        Mon Jun 23 12:22:26 2003
+Index: linux-2.6.0-test6/arch/i386/kernel/Makefile
+===================================================================
+--- linux-2.6.0-test6.orig/arch/i386/kernel/Makefile   2003-10-07 16:08:34.000000000 +0800
++++ linux-2.6.0-test6/arch/i386/kernel/Makefile        2003-10-07 16:09:00.000000000 +0800
 @@ -24,6 +24,7 @@
  obj-$(CONFIG_X86_MPPARSE)     += mpparse.o
  obj-$(CONFIG_X86_LOCAL_APIC)  += apic.o nmi.o
  obj-$(CONFIG_X86_IO_APIC)     += io_apic.o
 +obj-$(CONFIG_KEXEC)           += machine_kexec.o relocate_kernel.o
- obj-$(CONFIG_SOFTWARE_SUSPEND)        += suspend.o suspend_asm.o
  obj-$(CONFIG_X86_NUMAQ)               += numaq.o
  obj-$(CONFIG_X86_SUMMIT)      += summit.o
-diff -Nru a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
---- a/arch/i386/kernel/apic.c  Mon Jun 23 12:22:26 2003
-+++ b/arch/i386/kernel/apic.c  Mon Jun 23 12:22:26 2003
+ obj-$(CONFIG_EDD)                     += edd.o
+Index: linux-2.6.0-test6/arch/i386/kernel/apic.c
+===================================================================
+--- linux-2.6.0-test6.orig/arch/i386/kernel/apic.c     2003-10-07 15:47:25.000000000 +0800
++++ linux-2.6.0-test6/arch/i386/kernel/apic.c  2003-10-07 16:09:01.000000000 +0800
 @@ -26,6 +26,7 @@
  #include <linux/mc146818rtc.h>
  #include <linux/kernel_stat.h>
@@ -123,7 +86,7 @@ diff -Nru a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
  
  #include <asm/atomic.h>
  #include <asm/smp.h>
-@@ -175,6 +176,39 @@
+@@ -183,6 +184,39 @@
                outb(0x70, 0x22);
                outb(0x00, 0x23);
        }
@@ -163,12 +126,10 @@ diff -Nru a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
  }
  
  void disable_local_APIC(void)
-@@ -1113,6 +1147,26 @@
-       printk (KERN_INFO "APIC error on CPU%d: %02lx(%02lx)\n",
-               smp_processor_id(), v , v1);
+@@ -1147,6 +1181,26 @@
        irq_exit();
-+}
-+
+ }
 +void stop_apics(void)
 +{
 +      /* By resetting the APIC's we disable the nmi watchdog */
@@ -187,12 +148,15 @@ diff -Nru a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
 +      }
 +#endif
 +      disconnect_bsp_APIC();
- }
++}
++
  /*
-diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c
---- a/arch/i386/kernel/dmi_scan.c      Mon Jun 23 12:22:26 2003
-+++ b/arch/i386/kernel/dmi_scan.c      Mon Jun 23 12:22:26 2003
+  * This initializes the IO-APIC and APIC hardware if this is
+  * a UP kernel.
+Index: linux-2.6.0-test6/arch/i386/kernel/dmi_scan.c
+===================================================================
+--- linux-2.6.0-test6.orig/arch/i386/kernel/dmi_scan.c 2003-10-07 16:08:34.000000000 +0800
++++ linux-2.6.0-test6/arch/i386/kernel/dmi_scan.c      2003-10-07 16:09:01.000000000 +0800
 @@ -222,31 +222,6 @@
        return 0;
  }
@@ -225,7 +189,7 @@ diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c
  
  /*
   * Some bioses have a broken protected mode poweroff and need to use realmode
-@@ -527,7 +502,7 @@
+@@ -581,7 +556,7 @@
                        MATCH(DMI_BIOS_VERSION, "4.60 PGMA"),
                        MATCH(DMI_BIOS_DATE, "134526184"), NO_MATCH
                        } },
@@ -234,19 +198,22 @@ diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c
                        MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
                        MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/"),
                        NO_MATCH, NO_MATCH
-diff -Nru a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
---- a/arch/i386/kernel/entry.S Mon Jun 23 12:22:26 2003
-+++ b/arch/i386/kernel/entry.S Mon Jun 23 12:22:26 2003
-@@ -876,5 +876,6 @@
-       .long sys_clock_nanosleep
-       .long sys_statfs64
-       .long sys_fstatfs64     
-+      .long sys_kexec_load            /* 270 */
-  
+Index: linux-2.6.0-test6/arch/i386/kernel/entry.S
+===================================================================
+--- linux-2.6.0-test6.orig/arch/i386/kernel/entry.S    2003-10-07 16:08:34.000000000 +0800
++++ linux-2.6.0-test6/arch/i386/kernel/entry.S 2003-10-07 16:09:01.000000000 +0800
+@@ -1046,6 +1046,7 @@
+       .long sys_utimes
+       .long sys_fadvise64_64
+       .long sys_ni_syscall    /* sys_vserver */
++        .long sys_kexec_load
  nr_syscalls=(.-sys_call_table)/4
-diff -Nru a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c
---- a/arch/i386/kernel/i8259.c Mon Jun 23 12:22:26 2003
-+++ b/arch/i386/kernel/i8259.c Mon Jun 23 12:22:26 2003
+Index: linux-2.6.0-test6/arch/i386/kernel/i8259.c
+===================================================================
+--- linux-2.6.0-test6.orig/arch/i386/kernel/i8259.c    2003-10-07 16:08:34.000000000 +0800
++++ linux-2.6.0-test6/arch/i386/kernel/i8259.c 2003-10-07 16:09:01.000000000 +0800
 @@ -244,9 +244,21 @@
        return 0;
  }
@@ -269,10 +236,11 @@ diff -Nru a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c
  };
  
  static struct sys_device device_i8259A = {
-diff -Nru a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
---- a/arch/i386/kernel/io_apic.c       Mon Jun 23 12:22:26 2003
-+++ b/arch/i386/kernel/io_apic.c       Mon Jun 23 12:22:26 2003
-@@ -1562,8 +1562,6 @@
+Index: linux-2.6.0-test6/arch/i386/kernel/io_apic.c
+===================================================================
+--- linux-2.6.0-test6.orig/arch/i386/kernel/io_apic.c  2003-10-07 16:08:34.000000000 +0800
++++ linux-2.6.0-test6/arch/i386/kernel/io_apic.c       2003-10-07 16:09:01.000000000 +0800
+@@ -1629,8 +1629,6 @@
         * Clear the IO-APIC before rebooting:
         */
        clear_IO_APIC();
@@ -281,9 +249,10 @@ diff -Nru a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
  }
  
  /*
-diff -Nru a/arch/i386/kernel/machine_kexec.c b/arch/i386/kernel/machine_kexec.c
---- /dev/null  Wed Dec 31 16:00:00 1969
-+++ b/arch/i386/kernel/machine_kexec.c Mon Jun 23 12:22:26 2003
+Index: linux-2.6.0-test6/arch/i386/kernel/machine_kexec.c
+===================================================================
+--- linux-2.6.0-test6.orig/arch/i386/kernel/machine_kexec.c    2003-10-07 16:09:00.000000000 +0800
++++ linux-2.6.0-test6/arch/i386/kernel/machine_kexec.c 2003-10-07 16:09:01.000000000 +0800
 @@ -0,0 +1,116 @@
 +#include <linux/config.h>
 +#include <linux/mm.h>
@@ -401,18 +370,11 @@ diff -Nru a/arch/i386/kernel/machine_kexec.c b/arch/i386/kernel/machine_kexec.c
 +      rnk = (relocate_new_kernel_t) reboot_code_buffer;
 +      (*rnk)(indirection_page, reboot_code_buffer, image->start);
 +}
-diff -Nru a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c
---- a/arch/i386/kernel/reboot.c        Mon Jun 23 12:22:26 2003
-+++ b/arch/i386/kernel/reboot.c        Mon Jun 23 12:22:26 2003
-@@ -8,6 +8,7 @@
- #include <linux/interrupt.h>
- #include <linux/mc146818rtc.h>
- #include <asm/uaccess.h>
-+#include <asm/apic.h>
- #include "mach_reboot.h"
- /*
-@@ -20,8 +21,7 @@
+Index: linux-2.6.0-test6/arch/i386/kernel/reboot.c
+===================================================================
+--- linux-2.6.0-test6.orig/arch/i386/kernel/reboot.c   2003-10-07 16:08:34.000000000 +0800
++++ linux-2.6.0-test6/arch/i386/kernel/reboot.c        2003-10-07 16:09:01.000000000 +0800
+@@ -21,8 +21,7 @@
  int reboot_thru_bios;
  
  #ifdef CONFIG_SMP
@@ -422,7 +384,7 @@ diff -Nru a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c
  /* shamelessly grabbed from lib/vsprintf.c for readability */
  #define is_digit(c)   ((c) >= '0' && (c) <= '9')
  #endif
-@@ -43,7 +43,6 @@
+@@ -44,7 +43,6 @@
                        break;
  #ifdef CONFIG_SMP
                case 's': /* "smp" reboot by executing reset on BSP or other CPU*/
@@ -430,7 +392,7 @@ diff -Nru a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c
                        if (is_digit(*(str+1))) {
                                reboot_cpu = (int) (*(str+1) - '0');
                                if (is_digit(*(str+2))) 
-@@ -215,42 +214,7 @@
+@@ -217,51 +215,7 @@
  
  void machine_restart(char * __unused)
  {
@@ -445,7 +407,7 @@ diff -Nru a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c
 -                 if its not, default to the BSP */
 -              if ((reboot_cpu == -1) ||  
 -                    (reboot_cpu > (NR_CPUS -1))  || 
--                    !(phys_cpu_present_map & (1<<cpuid))) 
+-                    !physid_isset(cpuid, phys_cpu_present_map))
 -                      reboot_cpu = boot_cpu_physical_apicid;
 -
 -              reboot_smp = 0;  /* use this as a flag to only go through this once*/
@@ -468,28 +430,40 @@ diff -Nru a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c
 -       * other OSs see a clean IRQ state.
 -       */
 -      smp_send_stop();
+-#elif defined(CONFIG_X86_LOCAL_APIC)
+-      if (cpu_has_apic) {
+-              local_irq_disable();
+-              disable_local_APIC();
+-              local_irq_enable();
+-      }
+-#endif
+-#ifdef CONFIG_X86_IO_APIC
 -      disable_IO_APIC();
 -#endif
-+      stop_apics();
-       if(!reboot_thru_bios) {
-               /* rebooting needs to touch the page at absolute addr 0 */
-@@ -268,10 +232,12 @@
+-
++        stop_apics();
+       if (!reboot_thru_bios) {
+               if (efi_enabled) {
+                       efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, 0);
+@@ -284,11 +238,13 @@
+ }
  
  void machine_halt(void)
- {
-+      stop_apics();
+-{
++{ 
++      stop_apics();
  }
  
  void machine_power_off(void)
  {
-+      stop_apics();
++      stop_apics();
+       if (efi_enabled)
+               efi.reset_system(EFI_RESET_SHUTDOWN, EFI_SUCCESS, 0, 0);
        if (pm_power_off)
-               pm_power_off();
- }
-diff -Nru a/arch/i386/kernel/relocate_kernel.S b/arch/i386/kernel/relocate_kernel.S
---- /dev/null  Wed Dec 31 16:00:00 1969
-+++ b/arch/i386/kernel/relocate_kernel.S       Mon Jun 23 12:22:26 2003
+Index: linux-2.6.0-test6/arch/i386/kernel/relocate_kernel.S
+===================================================================
+--- linux-2.6.0-test6.orig/arch/i386/kernel/relocate_kernel.S  2003-10-07 16:09:00.000000000 +0800
++++ linux-2.6.0-test6/arch/i386/kernel/relocate_kernel.S       2003-10-07 16:09:01.000000000 +0800
 @@ -0,0 +1,107 @@
 +#include <linux/config.h>
 +#include <linux/linkage.h>
@@ -598,16 +572,17 @@ diff -Nru a/arch/i386/kernel/relocate_kernel.S b/arch/i386/kernel/relocate_kerne
 +      .globl relocate_new_kernel_size
 +relocate_new_kernel_size:     
 +      .long relocate_new_kernel_end - relocate_new_kernel
-diff -Nru a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
---- a/arch/i386/kernel/smp.c   Mon Jun 23 12:22:26 2003
-+++ b/arch/i386/kernel/smp.c   Mon Jun 23 12:22:26 2003
-@@ -547,6 +547,30 @@
+Index: linux-2.6.0-test6/arch/i386/kernel/smp.c
+===================================================================
+--- linux-2.6.0-test6.orig/arch/i386/kernel/smp.c      2003-10-07 16:08:59.000000000 +0800
++++ linux-2.6.0-test6/arch/i386/kernel/smp.c   2003-10-07 16:09:01.000000000 +0800
+@@ -577,6 +577,30 @@
  
  void smp_send_stop(void)
  {
 +      extern int reboot_cpu;
 +      int reboot_cpu_id;
-+
++      
 +      /* The boot cpu is always logical cpu 0 */
 +      reboot_cpu_id = 0;
 +
@@ -624,7 +599,7 @@ diff -Nru a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
 +      }
 +
 +      /* Make certain I only run on the appropriate processor */
-+      set_cpus_allowed(current, 1 << reboot_cpu_id);
++      set_cpus_allowed(current, cpumask_of_cpu(reboot_cpu_id));
 +
 +      /* O.k. Now that I'm on the appropriate processor stop
 +       * all of the others.
@@ -632,22 +607,11 @@ diff -Nru a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
        smp_call_function(stop_this_cpu, NULL, 1, 0);
  
        local_irq_disable();
-diff -Nru a/fs/aio.c b/fs/aio.c
---- a/fs/aio.c Mon Jun 23 12:22:26 2003
-+++ b/fs/aio.c Mon Jun 23 12:22:26 2003
-@@ -536,7 +536,7 @@
-       return ioctx;
- }
--static void use_mm(struct mm_struct *mm)
-+void use_mm(struct mm_struct *mm)
- {
-       struct mm_struct *active_mm = current->active_mm;
-       atomic_inc(&mm->mm_count);
-diff -Nru a/include/asm-i386/apic.h b/include/asm-i386/apic.h
---- a/include/asm-i386/apic.h  Mon Jun 23 12:22:26 2003
-+++ b/include/asm-i386/apic.h  Mon Jun 23 12:22:26 2003
-@@ -97,6 +97,9 @@
+Index: linux-2.6.0-test6/include/asm-i386/apic.h
+===================================================================
+--- linux-2.6.0-test6.orig/include/asm-i386/apic.h     2003-10-07 15:47:25.000000000 +0800
++++ linux-2.6.0-test6/include/asm-i386/apic.h  2003-10-07 16:09:01.000000000 +0800
+@@ -99,6 +99,9 @@
  #define NMI_LOCAL_APIC        2
  #define NMI_INVALID   3
  
@@ -657,9 +621,10 @@ diff -Nru a/include/asm-i386/apic.h b/include/asm-i386/apic.h
  #endif /* CONFIG_X86_LOCAL_APIC */
  
  #endif /* __ASM_APIC_H */
-diff -Nru a/include/asm-i386/apicdef.h b/include/asm-i386/apicdef.h
---- a/include/asm-i386/apicdef.h       Mon Jun 23 12:22:26 2003
-+++ b/include/asm-i386/apicdef.h       Mon Jun 23 12:22:26 2003
+Index: linux-2.6.0-test6/include/asm-i386/apicdef.h
+===================================================================
+--- linux-2.6.0-test6.orig/include/asm-i386/apicdef.h  2003-10-07 15:47:25.000000000 +0800
++++ linux-2.6.0-test6/include/asm-i386/apicdef.h       2003-10-07 16:09:01.000000000 +0800
 @@ -86,6 +86,7 @@
  #define                       APIC_LVT_REMOTE_IRR             (1<<14)
  #define                       APIC_INPUT_POLARITY             (1<<13)
@@ -668,9 +633,10 @@ diff -Nru a/include/asm-i386/apicdef.h b/include/asm-i386/apicdef.h
  #define                       GET_APIC_DELIVERY_MODE(x)       (((x)>>8)&0x7)
  #define                       SET_APIC_DELIVERY_MODE(x,y)     (((x)&~0x700)|((y)<<8))
  #define                               APIC_MODE_FIXED         0x0
-diff -Nru a/include/asm-i386/kexec.h b/include/asm-i386/kexec.h
---- /dev/null  Wed Dec 31 16:00:00 1969
-+++ b/include/asm-i386/kexec.h Mon Jun 23 12:22:26 2003
+Index: linux-2.6.0-test6/include/asm-i386/kexec.h
+===================================================================
+--- linux-2.6.0-test6.orig/include/asm-i386/kexec.h    2003-10-07 16:09:00.000000000 +0800
++++ linux-2.6.0-test6/include/asm-i386/kexec.h 2003-10-07 16:09:01.000000000 +0800
 @@ -0,0 +1,23 @@
 +#ifndef _I386_KEXEC_H
 +#define _I386_KEXEC_H
@@ -695,23 +661,26 @@ diff -Nru a/include/asm-i386/kexec.h b/include/asm-i386/kexec.h
 +#define KEXEC_REBOOT_CODE_SIZE        4096
 +
 +#endif /* _I386_KEXEC_H */
-diff -Nru a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
---- a/include/asm-i386/unistd.h        Mon Jun 23 12:22:26 2003
-+++ b/include/asm-i386/unistd.h        Mon Jun 23 12:22:26 2003
-@@ -275,8 +275,9 @@
- #define __NR_clock_nanosleep  (__NR_timer_create+8)
- #define __NR_statfs64         268
- #define __NR_fstatfs64                269
-+#define __NR_sys_kexec_load   270
--#define NR_syscalls 270
-+#define NR_syscalls 271
+Index: linux-2.6.0-test6/include/asm-i386/unistd.h
+===================================================================
+--- linux-2.6.0-test6.orig/include/asm-i386/unistd.h   2003-10-07 16:08:41.000000000 +0800
++++ linux-2.6.0-test6/include/asm-i386/unistd.h        2003-10-07 16:09:01.000000000 +0800
+@@ -279,8 +279,9 @@
+ #define __NR_utimes           271
+ #define __NR_fadvise64_64     272
+ #define __NR_vserver          273
+-
+-#define NR_syscalls 274
++#define __NR_sys_kexec_load   274
++    
++#define NR_syscalls 275
  
  /* user-visible error numbers are in the range -1 - -124: see <asm-i386/errno.h> */
  
-diff -Nru a/include/linux/kexec.h b/include/linux/kexec.h
---- /dev/null  Wed Dec 31 16:00:00 1969
-+++ b/include/linux/kexec.h    Mon Jun 23 12:22:26 2003
+Index: linux-2.6.0-test6/include/linux/kexec.h
+===================================================================
+--- linux-2.6.0-test6.orig/include/linux/kexec.h       2003-10-07 16:09:00.000000000 +0800
++++ linux-2.6.0-test6/include/linux/kexec.h    2003-10-07 16:09:01.000000000 +0800
 @@ -0,0 +1,54 @@
 +#ifndef LINUX_KEXEC_H
 +#define LINUX_KEXEC_H
@@ -767,13 +736,14 @@ diff -Nru a/include/linux/kexec.h b/include/linux/kexec.h
 +#endif
 +#endif /* LINUX_KEXEC_H */
 +
-diff -Nru a/include/linux/reboot.h b/include/linux/reboot.h
---- a/include/linux/reboot.h   Mon Jun 23 12:22:26 2003
-+++ b/include/linux/reboot.h   Mon Jun 23 12:22:26 2003
+Index: linux-2.6.0-test6/include/linux/reboot.h
+===================================================================
+--- linux-2.6.0-test6.orig/include/linux/reboot.h      2003-10-07 15:47:25.000000000 +0800
++++ linux-2.6.0-test6/include/linux/reboot.h   2003-10-07 16:09:01.000000000 +0800
 @@ -22,6 +22,7 @@
   * POWER_OFF   Stop OS and remove all power from system, if possible.
   * RESTART2    Restart system using given command string.
-  * SW_SUSPEND  Suspend system using Software Suspend if compiled in
+  * SW_SUSPEND  Suspend system using software suspend if compiled in.
 + * KEXEC       Restart the system using a different kernel.
   */
  
@@ -786,20 +756,22 @@ diff -Nru a/include/linux/reboot.h b/include/linux/reboot.h
  
  
  #ifdef __KERNEL__
-diff -Nru a/kernel/Makefile b/kernel/Makefile
---- a/kernel/Makefile  Mon Jun 23 12:22:26 2003
-+++ b/kernel/Makefile  Mon Jun 23 12:22:26 2003
-@@ -18,6 +18,7 @@
- obj-$(CONFIG_CPU_FREQ) += cpufreq.o
+Index: linux-2.6.0-test6/kernel/Makefile
+===================================================================
+--- linux-2.6.0-test6.orig/kernel/Makefile     2003-10-07 16:08:42.000000000 +0800
++++ linux-2.6.0-test6/kernel/Makefile  2003-10-07 16:09:01.000000000 +0800
+@@ -17,6 +17,7 @@
+ obj-$(CONFIG_KALLSYMS) += kallsyms.o
+ obj-$(CONFIG_PM) += power/
  obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
- obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend.o
 +obj-$(CONFIG_KEXEC) += kexec.o
  obj-$(CONFIG_COMPAT) += compat.o
- ifneq ($(CONFIG_IA64),y)
-diff -Nru a/kernel/kexec.c b/kernel/kexec.c
---- /dev/null  Wed Dec 31 16:00:00 1969
-+++ b/kernel/kexec.c   Mon Jun 23 12:22:26 2003
+ obj-$(CONFIG_IKCONFIG) += configs.o
+ obj-$(CONFIG_IKCONFIG_PROC) += configs.o
+Index: linux-2.6.0-test6/kernel/kexec.c
+===================================================================
+--- linux-2.6.0-test6.orig/kernel/kexec.c      2003-10-07 16:09:00.000000000 +0800
++++ linux-2.6.0-test6/kernel/kexec.c   2003-10-07 16:09:01.000000000 +0800
 @@ -0,0 +1,629 @@
 +#include <linux/mm.h>
 +#include <linux/file.h>
@@ -1430,10 +1402,11 @@ diff -Nru a/kernel/kexec.c b/kernel/kexec.c
 +      kimage_free(image);
 +      return result;
 +}
-diff -Nru a/kernel/sys.c b/kernel/sys.c
---- a/kernel/sys.c     Mon Jun 23 12:22:26 2003
-+++ b/kernel/sys.c     Mon Jun 23 12:22:26 2003
-@@ -16,6 +16,7 @@
+Index: linux-2.6.0-test6/kernel/sys.c
+===================================================================
+--- linux-2.6.0-test6.orig/kernel/sys.c        2003-10-07 16:08:42.000000000 +0800
++++ linux-2.6.0-test6/kernel/sys.c     2003-10-09 18:38:57.000000000 +0800
+@@ -17,6 +17,7 @@
  #include <linux/init.h>
  #include <linux/highuid.h>
  #include <linux/fs.h>
@@ -1441,7 +1414,23 @@ diff -Nru a/kernel/sys.c b/kernel/sys.c
  #include <linux/workqueue.h>
  #include <linux/device.h>
  #include <linux/times.h>
-@@ -207,6 +208,7 @@
+@@ -94,6 +95,7 @@
+ int notifier_chain_register(struct notifier_block **list, struct notifier_block *n)
+ {
+       write_lock(&notifier_lock);
++      printk(KERN_EMERG"add noitifier nb %p \n", n);
+       while(*list)
+       {
+               if(n->priority > (*list)->priority)
+@@ -156,6 +158,7 @@
+       while(nb)
+       {
++              printk("nb %p notifier_call %p \n", nb, nb->notifier_call);
+               ret=nb->notifier_call(nb,val,v);
+               if(ret&NOTIFY_STOP_MASK)
+               {
+@@ -208,6 +211,7 @@
  cond_syscall(sys_lookup_dcookie)
  cond_syscall(sys_swapon)
  cond_syscall(sys_swapoff)
@@ -1449,7 +1438,7 @@ diff -Nru a/kernel/sys.c b/kernel/sys.c
  cond_syscall(sys_init_module)
  cond_syscall(sys_delete_module)
  cond_syscall(sys_socketpair)
-@@ -450,6 +452,27 @@
+@@ -454,6 +458,27 @@
                machine_restart(buffer);
                break;
  
@@ -1477,3 +1466,16 @@ diff -Nru a/kernel/sys.c b/kernel/sys.c
  #ifdef CONFIG_SOFTWARE_SUSPEND
        case LINUX_REBOOT_CMD_SW_SUSPEND:
                if (!software_suspend_enabled) {
+Index: linux-2.6.0-test6/fs/aio.c
+===================================================================
+--- linux-2.6.0-test6.orig/fs/aio.c    2003-10-07 16:08:40.000000000 +0800
++++ linux-2.6.0-test6/fs/aio.c 2003-10-07 16:09:01.000000000 +0800
+@@ -560,7 +560,7 @@
+  *    (Note: this routine is intended to be called only
+  *    from a kernel thread context)
+  */
+-static void use_mm(struct mm_struct *mm)
++void use_mm(struct mm_struct *mm)
+ {
+       struct mm_struct *active_mm;
+       struct task_struct *tsk = current;