Whamcloud - gitweb
- mds->lmv->mdc propagate lower timeout down to import
[fs/lustre-release.git] / lustre / kernel_patches / patches / lkcd-kernel-changes-2.6.0-test6.patch
1  0 files changed
2
3 Index: linux-2.6.0-test6/drivers/Makefile
4 ===================================================================
5 --- linux-2.6.0-test6.orig/drivers/Makefile     2003-09-28 08:50:41.000000000 +0800
6 +++ linux-2.6.0-test6/drivers/Makefile  2003-10-09 20:57:41.884807280 +0800
7 @@ -49,3 +49,4 @@
8  obj-$(CONFIG_MCA)              += mca/
9  obj-$(CONFIG_EISA)             += eisa/
10  obj-$(CONFIG_CPU_FREQ)         += cpufreq/
11 +obj-$(CONFIG_CRASH_DUMP)       += dump/
12 Index: linux-2.6.0-test6/include/linux/sysctl.h
13 ===================================================================
14 --- linux-2.6.0-test6.orig/include/linux/sysctl.h       2003-10-09 20:52:02.839350024 +0800
15 +++ linux-2.6.0-test6/include/linux/sysctl.h    2003-10-09 20:57:41.885807128 +0800
16 @@ -127,6 +127,7 @@
17         KERN_PANIC_ON_OOPS=57,  /* int: whether we will panic on an oops */
18         KERN_HPPA_PWRSW=58,     /* int: hppa soft-power enable */
19         KERN_HPPA_UNALIGNED=59, /* int: hppa unaligned-trap enable */
20 +       KERN_DUMP=60,           /* directory: dump parameters */
21  };
22  
23  
24 Index: linux-2.6.0-test6/include/linux/major.h
25 ===================================================================
26 --- linux-2.6.0-test6.orig/include/linux/major.h        2003-09-28 08:50:13.000000000 +0800
27 +++ linux-2.6.0-test6/include/linux/major.h     2003-10-09 20:57:41.885807128 +0800
28 @@ -157,6 +157,8 @@
29  
30  #define OSST_MAJOR             206     /* OnStream-SCx0 SCSI tape */
31  
32 +#define CRASH_DUMP_MAJOR       221     /* crash dump interface */
33 +
34  #define IBM_TTY3270_MAJOR      227
35  #define IBM_FS3270_MAJOR       228
36  
37 Index: linux-2.6.0-test6/include/asm-i386/mach-default/irq_vectors.h
38 ===================================================================
39 --- linux-2.6.0-test6.orig/include/asm-i386/mach-default/irq_vectors.h  2003-10-09 20:52:02.764361424 +0800
40 +++ linux-2.6.0-test6/include/asm-i386/mach-default/irq_vectors.h       2003-10-09 20:57:41.885807128 +0800
41 @@ -48,6 +48,7 @@
42  #define INVALIDATE_TLB_VECTOR  0xfd
43  #define RESCHEDULE_VECTOR      0xfc
44  #define CALL_FUNCTION_VECTOR   0xfb
45 +#define DUMP_VECTOR            0xfa
46  
47  #define THERMAL_APIC_VECTOR    0xf0
48  /*
49 Index: linux-2.6.0-test6/include/asm-i386/kmap_types.h
50 ===================================================================
51 --- linux-2.6.0-test6.orig/include/asm-i386/kmap_types.h        2003-10-09 20:52:02.764361424 +0800
52 +++ linux-2.6.0-test6/include/asm-i386/kmap_types.h     2003-10-09 20:57:41.886806976 +0800
53 @@ -33,6 +33,7 @@
54          * Add new entries in pairs:
55          * the 4G/4G virtual stack must be 8K aligned on each cpu.
56          */
57 -       KM_TYPE_NR
58 +       KM_DUMP,
59 +       KM_TYPE_NR,
60  };
61  #endif
62 Index: linux-2.6.0-test6/include/asm-i386/smp.h
63 ===================================================================
64 --- linux-2.6.0-test6.orig/include/asm-i386/smp.h       2003-09-28 08:50:29.000000000 +0800
65 +++ linux-2.6.0-test6/include/asm-i386/smp.h    2003-10-09 20:57:41.886806976 +0800
66 @@ -37,6 +37,7 @@
67  extern int cpu_sibling_map[];
68  
69  extern void smp_flush_tlb(void);
70 +extern void dump_send_ipi(void);
71  extern void smp_message_irq(int cpl, void *dev_id, struct pt_regs *regs);
72  extern void smp_send_reschedule(int cpu);
73  extern void smp_invalidate_rcv(void);          /* Process an NMI */
74 Index: linux-2.6.0-test6/arch/i386/kernel/i386_ksyms.c
75 ===================================================================
76 --- linux-2.6.0-test6.orig/arch/i386/kernel/i386_ksyms.c        2003-10-09 20:56:19.104391816 +0800
77 +++ linux-2.6.0-test6/arch/i386/kernel/i386_ksyms.c     2003-10-09 20:58:33.601945080 +0800
78 @@ -16,6 +16,7 @@
79  #include <linux/tty.h>
80  #include <linux/highmem.h>
81  #include <linux/time.h>
82 +#include <linux/nmi.h>
83  
84  #include <asm/semaphore.h>
85  #include <asm/processor.h>
86 @@ -34,6 +35,7 @@
87  #include <asm/nmi.h>
88  #include <asm/edd.h>
89  #include <asm/ist.h>
90 +#include <asm/e820.h>
91  #include <asm/netconsole.h>
92  extern void dump_thread(struct pt_regs *, struct user *);
93  extern spinlock_t rtc_lock;
94 @@ -220,3 +222,20 @@
95  #if defined(CONFIG_X86_SPEEDSTEP_SMI) || defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE)
96  EXPORT_SYMBOL(ist_info);
97  #endif
98 +
99 +#ifdef CONFIG_CRASH_DUMP_MODULE
100 +#ifdef CONFIG_SMP
101 +extern irq_desc_t irq_desc[NR_IRQS];
102 +extern unsigned long irq_affinity[NR_IRQS];
103 +extern void stop_this_cpu(void *);
104 +EXPORT_SYMBOL(irq_desc);
105 +EXPORT_SYMBOL(irq_affinity);
106 +EXPORT_SYMBOL(stop_this_cpu);
107 +EXPORT_SYMBOL(dump_send_ipi);
108 +#endif
109 +extern int pfn_is_ram(unsigned long);
110 +EXPORT_SYMBOL(pfn_is_ram);
111 +#ifdef ARCH_HAS_NMI_WATCHDOG
112 +EXPORT_SYMBOL(touch_nmi_watchdog);
113 +#endif
114 +#endif
115 Index: linux-2.6.0-test6/arch/i386/kernel/nmi.c
116 ===================================================================
117 --- linux-2.6.0-test6.orig/arch/i386/kernel/nmi.c       2003-10-09 20:52:02.026473600 +0800
118 +++ linux-2.6.0-test6/arch/i386/kernel/nmi.c    2003-10-09 20:57:41.887806824 +0800
119 @@ -24,6 +24,7 @@
120  #include <linux/kernel_stat.h>
121  #include <linux/module.h>
122  #include <linux/nmi.h>
123 +#include <linux/dump.h>
124  #include <linux/sysdev.h>
125  
126  #include <asm/smp.h>
127 @@ -460,6 +461,7 @@
128                         bust_spinlocks(1);
129                         printk("NMI Watchdog detected LOCKUP on CPU%d, eip %08lx, registers:\n", cpu, regs->eip);
130                         show_registers(regs);
131 +                       dump("NMI Watchdog detected LOCKUP", regs);
132                         printk("console shuts up ...\n");
133                         console_silent();
134                         spin_unlock(&nmi_print_lock);
135 Index: linux-2.6.0-test6/arch/i386/kernel/setup.c
136 ===================================================================
137 --- linux-2.6.0-test6.orig/arch/i386/kernel/setup.c     2003-10-09 20:52:02.028473296 +0800
138 +++ linux-2.6.0-test6/arch/i386/kernel/setup.c  2003-10-09 20:57:41.888806672 +0800
139 @@ -471,6 +471,7 @@
140         print_memory_map(who);
141  } /* setup_memory_region */
142  
143 +unsigned long crashdump_addr = 0xdeadbeef;
144  
145  static void __init parse_cmdline_early (char ** cmdline_p)
146  {
147 @@ -588,6 +589,9 @@
148                 if (c == ' ' && !memcmp(from, "highmem=", 8))
149                         highmem_pages = memparse(from+8, &from) >> PAGE_SHIFT;
150         
151 +               if (c == ' ' && !memcmp(from, "crashdump=", 10))
152 +                       crashdump_addr = memparse(from+10, &from); 
153 +                       
154                 c = *(from++);
155                 if (!c)
156                         break;
157 @@ -1030,6 +1034,8 @@
158  
159  __setup("noreplacement", noreplacement_setup); 
160  
161 +extern void crashdump_reserve(void);
162
163  /*
164   * Determine if we were loaded by an EFI loader.  If so, then we have also been
165   * passed the efi memmap, systab, etc., so we should use these data structures
166 Index: linux-2.6.0-test6/arch/i386/kernel/smp.c
167 ===================================================================
168 --- linux-2.6.0-test6.orig/arch/i386/kernel/smp.c       2003-10-09 20:52:02.031472840 +0800
169 +++ linux-2.6.0-test6/arch/i386/kernel/smp.c    2003-10-09 20:57:41.889806520 +0800
170 @@ -19,6 +19,7 @@
171  #include <linux/mc146818rtc.h>
172  #include <linux/cache.h>
173  #include <linux/interrupt.h>
174 +#include <linux/dump.h>
175  
176  #include <asm/mtrr.h>
177  #include <asm/pgalloc.h>
178 @@ -144,6 +145,13 @@
179          */
180         cfg = __prepare_ICR(shortcut, vector);
181  
182 +       if (vector == DUMP_VECTOR) {
183 +               /*
184 +                * Setup DUMP IPI to be delivered as an NMI
185 +                */
186 +               cfg = (cfg&~APIC_VECTOR_MASK)|APIC_DM_NMI;
187 +       }
188 +
189         /*
190          * Send the IPI. The write to APIC_ICR fires this off.
191          */
192 @@ -477,6 +485,11 @@
193         send_IPI_mask(cpumask_of_cpu(cpu), RESCHEDULE_VECTOR);
194  }
195  
196 +void dump_send_ipi(void)
197 +{
198 +       send_IPI_allbutself(DUMP_VECTOR);
199 +}
200 +
201  /*
202   * Structure and data for smp_call_function(). This is designed to minimise
203   * static memory requirements. It also looks cleaner.
204 @@ -545,7 +558,7 @@
205         return 0;
206  }
207  
208 -static void stop_this_cpu (void * dummy)
209 +void stop_this_cpu (void * dummy)
210  {
211         /*
212          * Remove this CPU:
213 @@ -606,4 +619,3 @@
214                 atomic_inc(&call_data->finished);
215         }
216  }
217 -
218 Index: linux-2.6.0-test6/arch/i386/kernel/traps.c
219 ===================================================================
220 --- linux-2.6.0-test6.orig/arch/i386/kernel/traps.c     2003-10-09 20:52:02.033472536 +0800
221 +++ linux-2.6.0-test6/arch/i386/kernel/traps.c  2003-10-09 20:57:41.889806520 +0800
222 @@ -25,6 +25,7 @@
223  #include <linux/highmem.h>
224  #include <linux/kallsyms.h>
225  #include <linux/ptrace.h>
226 +#include <linux/dump.h>
227  
228  #ifdef CONFIG_EISA
229  #include <linux/ioport.h>
230 @@ -322,6 +323,7 @@
231  #endif
232         CHK_REMOTE_DEBUG(0,SIGTRAP,err,regs,)
233         show_registers(regs);
234 +       dump((char *)str, regs);
235         bust_spinlocks(0);
236         spin_unlock_irq(&die_lock);
237         if (in_interrupt())
238 Index: linux-2.6.0-test6/arch/i386/mm/init.c
239 ===================================================================
240 --- linux-2.6.0-test6.orig/arch/i386/mm/init.c  2003-10-09 20:52:02.041471320 +0800
241 +++ linux-2.6.0-test6/arch/i386/mm/init.c       2003-10-09 20:57:41.890806368 +0800
242 @@ -115,6 +115,12 @@
243                 SetPageReserved(page);
244  }
245  
246 +/* To enable modules to check if a page is in RAM */
247 +int pfn_is_ram(unsigned long pfn)
248 +{
249 +       return (page_is_ram(pfn));
250 +}
251 +
252  #ifdef CONFIG_HIGHMEM
253  
254  #ifndef CONFIG_DISCONTIGMEM
255 Index: linux-2.6.0-test6/arch/i386/boot/Makefile
256 ===================================================================
257 --- linux-2.6.0-test6.orig/arch/i386/boot/Makefile      2003-09-28 08:50:16.000000000 +0800
258 +++ linux-2.6.0-test6/arch/i386/boot/Makefile   2003-10-09 20:57:41.890806368 +0800
259 @@ -100,3 +100,4 @@
260  
261  install: $(BOOTIMAGE)
262         sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
263 +       if [ -f init/kerntypes.o ]; then cp init/kerntypes.o $(INSTALL_PATH)/Kerntypes; fi
264 Index: linux-2.6.0-test6/arch/i386/Kconfig
265 ===================================================================
266 --- linux-2.6.0-test6.orig/arch/i386/Kconfig    2003-10-09 20:52:01.999477704 +0800
267 +++ linux-2.6.0-test6/arch/i386/Kconfig 2003-10-09 20:57:41.891806216 +0800
268 @@ -1239,6 +1239,56 @@
269  
270  menu "Kernel hacking"
271  
272 +config CRASH_DUMP
273 +       tristate "Crash dump support (EXPERIMENTAL)"
274 +       depends on EXPERIMENTAL
275 +       default n
276 +       ---help---
277 +         Say Y here to enable saving an image of system memory when a panic
278 +         or other error occurs. Dumps can also be forced with the SysRq+d
279 +         key if MAGIC_SYSRQ is enabled.
280 +
281 +config CRASH_DUMP_BLOCKDEV
282 +       tristate "Crash dump block device driver"
283 +       depends on CRASH_DUMP
284 +       help
285 +         Say Y to allow saving crash dumps directly to a disk device.
286 +
287 +config CRASH_DUMP_NETDEV
288 +       tristate "Crash dump network device driver"
289 +       depends on CRASH_DUMP
290 +       help
291 +         Say Y to allow saving crash dumps over a network device.
292 +
293 +config CRASH_DUMP_MEMDEV
294 +       bool "Crash dump staged memory driver"
295 +       depends on CRASH_DUMP
296 +       help
297 +         Say Y to allow intermediate saving crash dumps in spare 
298 +         memory pages which would then be written out to disk
299 +         later.
300 +
301 +config CRASH_DUMP_SOFTBOOT
302 +       bool "Save crash dump across a soft reboot"
303 +       depends on CRASH_DUMP_MEMDEV
304 +       help
305 +         Say Y to allow a crash dump to be preserved in memory
306 +         pages across a soft reboot and written out to disk
307 +         thereafter. For this to work, CRASH_DUMP must be 
308 +         configured as part of the kernel (not as a module).
309 +
310 +config CRASH_DUMP_COMPRESS_RLE
311 +       tristate "Crash dump RLE compression"
312 +       depends on CRASH_DUMP
313 +       help
314 +         Say Y to allow saving dumps with Run Length Encoding compression.
315 +
316 +config CRASH_DUMP_COMPRESS_GZIP
317 +       tristate "Crash dump GZIP compression"
318 +       depends on CRASH_DUMP
319 +       help
320 +         Say Y to allow saving dumps with Gnu Zip compression.
321 +
322  config DEBUG_KERNEL
323         bool "Kernel debugging"
324         help
325 Index: linux-2.6.0-test6/arch/s390/boot/Makefile
326 ===================================================================
327 --- linux-2.6.0-test6.orig/arch/s390/boot/Makefile      2003-09-28 08:51:21.000000000 +0800
328 +++ linux-2.6.0-test6/arch/s390/boot/Makefile   2003-10-09 20:57:41.892806064 +0800
329 @@ -15,4 +15,4 @@
330  
331  install: $(CONFIGURE) $(obj)/image
332         sh -x $(obj)/install.sh $(KERNELRELEASE) $(obj)/image \
333 -             System.map Kerntypes "$(INSTALL_PATH)"
334 +             System.map init/kerntypes.o "$(INSTALL_PATH)"
335 Index: linux-2.6.0-test6/arch/s390/boot/install.sh
336 ===================================================================
337 --- linux-2.6.0-test6.orig/arch/s390/boot/install.sh    2003-09-28 08:50:30.000000000 +0800
338 +++ linux-2.6.0-test6/arch/s390/boot/install.sh 2003-10-09 20:57:41.892806064 +0800
339 @@ -16,7 +16,8 @@
340  #   $1 - kernel version
341  #   $2 - kernel image file
342  #   $3 - kernel map file
343 -#   $4 - default install path (blank if root directory)
344 +#   $4 - kernel type file
345 +#   $5 - default install path (blank if root directory)
346  #
347  
348  # User may have a custom install script
349 @@ -26,13 +27,22 @@
350  
351  # Default install - same as make zlilo
352  
353 -if [ -f $4/vmlinuz ]; then
354 -       mv $4/vmlinuz $4/vmlinuz.old
355 +if [ -f $5/vmlinuz ]; then
356 +       mv $5/vmlinuz $5/vmlinuz.old
357  fi
358  
359 -if [ -f $4/System.map ]; then
360 -       mv $4/System.map $4/System.old
361 +if [ -f $5/System.map ]; then
362 +       mv $5/System.map $5/System.old
363  fi
364  
365 -cat $2 > $4/vmlinuz
366 -cp $3 $4/System.map
367 +if [ -f $5/Kerntypes ]; then
368 +       mv $5/Kerntypes $5/Kerntypes.old
369 +fi
370 +
371 +cat $2 > $5/vmlinuz
372 +cp $3 $5/System.map
373 +
374 +# copy the kernel type file if it exists
375 +if [ -f $4 ]; then
376 +       cp $4 $5/Kerntypes
377 +fi
378 Index: linux-2.6.0-test6/scripts/mkcompile_h
379 ===================================================================
380 --- linux-2.6.0-test6.orig/scripts/mkcompile_h  2003-09-28 08:51:28.000000000 +0800
381 +++ linux-2.6.0-test6/scripts/mkcompile_h       2003-10-09 20:57:41.892806064 +0800
382 @@ -33,7 +33,7 @@
383  
384  UTS_LEN=64
385  UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/"
386 -
387 +LINUX_COMPILE_VERSION_ID="__linux_compile_version_id__`hostname | tr -c '[0-9A-Za-z\n]' '__'`_`LANG=C date | tr -c '[0-9A-Za-z\n]' '_'`"
388  # Generate a temporary compile.h
389  
390  ( echo /\* This file is auto generated, version $VERSION \*/
391 @@ -55,6 +55,8 @@
392    fi
393  
394    echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\"
395 +  echo \#define LINUX_COMPILE_VERSION_ID $LINUX_COMPILE_VERSION_ID
396 +  echo \#define LINUX_COMPILE_VERSION_ID_TYPE typedef char* "$LINUX_COMPILE_VERSION_ID""_t"
397  ) > .tmpcompile
398  
399  # Only replace the real compile.h if the new one is different,
400 Index: linux-2.6.0-test6/kernel/ksyms.c
401 ===================================================================
402 --- linux-2.6.0-test6.orig/kernel/ksyms.c       2003-10-09 20:52:02.855347592 +0800
403 +++ linux-2.6.0-test6/kernel/ksyms.c    2003-10-09 20:57:41.893805912 +0800
404 @@ -58,6 +58,8 @@
405  #include <linux/backing-dev.h>
406  #include <linux/percpu_counter.h>
407  #include <asm/checksum.h>
408 +#include <linux/dump.h>
409 +#include <linux/bootmem.h>
410  
411  #if defined(CONFIG_PROC_FS)
412  #include <linux/proc_fs.h>
413 @@ -378,3 +380,9 @@
414  EXPORT_SYMBOL(console_printk);
415  
416  EXPORT_SYMBOL(current_kernel_time);
417 +
418 +#ifdef CONFIG_CRASH_DUMP_MODULE
419 +EXPORT_SYMBOL(min_low_pfn);
420 +EXPORT_SYMBOL(dump_oncpu);
421 +EXPORT_SYMBOL(dump_function_ptr);
422 +#endif
423 Index: linux-2.6.0-test6/kernel/panic.c
424 ===================================================================
425 --- linux-2.6.0-test6.orig/kernel/panic.c       2003-09-28 08:51:05.000000000 +0800
426 +++ linux-2.6.0-test6/kernel/panic.c    2003-10-09 20:57:41.893805912 +0800
427 @@ -18,11 +18,16 @@
428  #include <linux/interrupt.h>
429  #include <linux/nmi.h>
430  
431 +#ifdef CONFIG_KEXEC
432 +#include <linux/kexec.h>
433 +#endif
434 +
435  asmlinkage void sys_sync(void);        /* it's really int */
436  
437  int panic_timeout;
438  int panic_on_oops;
439  int tainted;
440 +void (*dump_function_ptr)(const char *, const struct pt_regs *) = 0;
441  
442  struct notifier_block *panic_notifier_list;
443  
444 @@ -55,6 +60,7 @@
445         va_start(args, fmt);
446         vsnprintf(buf, sizeof(buf), fmt, args);
447         va_end(args);
448 +
449         printk(KERN_EMERG "Kernel panic: %s\n",buf);
450         if (in_interrupt())
451                 printk(KERN_EMERG "In interrupt handler - not syncing\n");
452 @@ -78,6 +84,19 @@
453                  * We can't use the "normal" timers since we just panicked..
454                  */
455                 printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);
456 +#ifdef CONFIG_KEXEC
457 +               {
458 +                       struct kimage *image;
459 +                       image = xchg(&kexec_image, 0);
460 +                       if (image) {
461 +                               printk(KERN_EMERG "by starting a new kernel ..\n");
462 +                               mdelay(panic_timeout*1000);
463 +                               machine_kexec(image);
464 +                       }
465 +               }
466 +#endif
467
468 +
469                 for (i = 0; i < panic_timeout; i++) {
470                         touch_nmi_watchdog();
471                         mdelay(1000);
472 Index: linux-2.6.0-test6/kernel/sched.c
473 ===================================================================
474 --- linux-2.6.0-test6.orig/kernel/sched.c       2003-10-09 20:52:02.864346224 +0800
475 +++ linux-2.6.0-test6/kernel/sched.c    2003-10-09 20:57:41.895805608 +0800
476 @@ -44,6 +44,9 @@
477  #define cpu_to_node_mask(cpu) (cpu_online_map)
478  #endif
479  
480 +/* used to soft spin in sched while dump is in progress */
481 +int dump_oncpu;
482 +
483  /*
484   * Convert user-nice values [ -20 ... 0 ... 19 ]
485   * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ],
486 @@ -1463,6 +1466,15 @@
487         unsigned long run_time;
488         int idx;
489  
490 +       /*
491 +        * If crash dump is in progress, this other cpu's
492 +        * need to wait until it completes.
493 +        * NB: this code is optimized away for kernels without
494 +        * dumping enabled.
495 +        */
496 +       if (unlikely(dump_oncpu))
497 +               goto dump_scheduling_disabled;
498 +
499         /*
500          * Test if we are atomic.  Since do_exit() needs to call into
501          * schedule() atomically, we ignore that path for now.
502 @@ -1586,6 +1598,16 @@
503         preempt_enable_no_resched();
504         if (test_thread_flag(TIF_NEED_RESCHED))
505                 goto need_resched;
506 +
507 +       return;
508 +
509 + dump_scheduling_disabled:
510 +       /* allow scheduling only if this is the dumping cpu */
511 +       if (dump_oncpu != smp_processor_id()+1) {
512 +               while (dump_oncpu)
513 +                       cpu_relax();
514 +       }
515 +       return;
516  }
517  
518  EXPORT_SYMBOL(schedule);
519 Index: linux-2.6.0-test6/lib/Kconfig
520 ===================================================================
521 --- linux-2.6.0-test6.orig/lib/Kconfig  2003-09-28 08:50:29.000000000 +0800
522 +++ linux-2.6.0-test6/lib/Kconfig       2003-10-09 20:57:41.895805608 +0800
523 @@ -16,10 +16,17 @@
524  # compression support is select'ed if needed
525  #
526  config ZLIB_INFLATE
527 -       tristate
528 +       tristate
529 +       default y if CRAMFS=y || PPP_DEFLATE=y || JFFS2_FS=y || ZISOFS_FS=y || BINFMT_ZFLAT=y || CRYPTO_DEFLATE=y || CRASH_DUMP_COMPRESS_GZIP=y
530 +       default m if CRAMFS=m || PPP_DEFLATE=m || JFFS2_FS=m || ZISOFS_FS=m || BINFMT_ZFLAT=m || CRYPTO_DEFLATE=m || CRASH_DUMP_COMPRESS_GZIP=m
531  
532  config ZLIB_DEFLATE
533         tristate
534 -
535 +       default m if PPP_DEFLATE!=y && JFFS2_FS!=y && CRYPTO_DEFLATE!=y && \
536 +               (PPP_DEFLATE=m || JFFS2_FS=m || CRYPTO_DEFLATE=m \
537 +                       || CRASH_DUMP_COMPRESS_GZIP=m )
538 +       default y if PPP_DEFLATE=y || JFFS2_FS=y || CRYPTO_DEFLATE=y \
539 +               || CRASH_DUMP_COMPRESS_GZIP=y
540
541  endmenu
542  
543 Index: linux-2.6.0-test6/mm/page_alloc.c
544 ===================================================================
545 --- linux-2.6.0-test6.orig/mm/page_alloc.c      2003-10-09 20:52:02.881343640 +0800
546 +++ linux-2.6.0-test6/mm/page_alloc.c   2003-10-09 20:57:41.897805304 +0800
547 @@ -89,7 +89,8 @@
548         page->mapping = NULL;
549  }
550  
551 -#ifndef CONFIG_HUGETLB_PAGE
552 +#if !defined(CONFIG_HUGETLB_PAGE) && !defined(CONFIG_CRASH_DUMP) \
553 +       && !defined(CONFIG_CRASH_DUMP_MODULE)
554  #define prep_compound_page(page, order) do { } while (0)
555  #define destroy_compound_page(page, order) do { } while (0)
556  #else
557 Index: linux-2.6.0-test6/init/Makefile
558 ===================================================================
559 --- linux-2.6.0-test6.orig/init/Makefile        2003-09-28 08:50:17.000000000 +0800
560 +++ linux-2.6.0-test6/init/Makefile     2003-10-09 20:57:41.897805304 +0800
561 @@ -9,6 +9,9 @@
562  mounts-$(CONFIG_BLK_DEV_INITRD)        += do_mounts_initrd.o
563  mounts-$(CONFIG_BLK_DEV_MD)    += do_mounts_md.o
564  
565 +extra-$(CONFIG_CRASH_DUMP)     += kerntypes.o
566 +CFLAGS_kerntypes.o             := -gstabs
567 +
568  # files to be removed upon make clean
569  clean-files := ../include/linux/compile.h
570  
571 @@ -24,3 +27,4 @@
572  include/linux/compile.h: FORCE
573         @echo '  CHK     $@'
574         @sh $(srctree)/scripts/mkcompile_h $@ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)"
575 +
576 Index: linux-2.6.0-test6/init/main.c
577 ===================================================================
578 --- linux-2.6.0-test6.orig/init/main.c  2003-10-09 20:52:02.850348352 +0800
579 +++ linux-2.6.0-test6/init/main.c       2003-10-09 20:57:41.897805304 +0800
580 @@ -97,6 +97,16 @@
581  int system_running = 0;
582  
583  /*
584 + * The kernel_magic value represents the address of _end, which allows
585 + * namelist tools to "match" each other respectively.  That way a tool
586 + * that looks at /dev/mem can verify that it is using the right System.map
587 + * file -- if kernel_magic doesn't equal the namelist value of _end,
588 + * something's wrong.
589 + */
590 +extern unsigned long _end;
591 +unsigned long *kernel_magic = &_end;
592 +
593 +/*
594   * Boot command-line arguments
595   */
596  #define MAX_INIT_ARGS 8
597 Index: linux-2.6.0-test6/init/version.c
598 ===================================================================
599 --- linux-2.6.0-test6.orig/init/version.c       2003-09-28 08:50:20.000000000 +0800
600 +++ linux-2.6.0-test6/init/version.c    2003-10-09 20:57:41.898805152 +0800
601 @@ -10,6 +10,7 @@
602  #include <linux/uts.h>
603  #include <linux/utsname.h>
604  #include <linux/version.h>
605 +#include <linux/stringify.h>
606  
607  #define version(a) Version_ ## a
608  #define version_string(a) version(a)
609 @@ -28,3 +29,6 @@
610  const char *linux_banner = 
611         "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
612         LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
613 +
614 +const char *LINUX_COMPILE_VERSION_ID = __stringify(LINUX_COMPILE_VERSION_ID);
615 +LINUX_COMPILE_VERSION_ID_TYPE;