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