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 +++++++++----
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 +
17 init/main.c | 10 +++++
19 kernel/ksyms.c | 8 ++++
20 kernel/panic.c | 17 +++++++++
21 kernel/sched.c | 22 ++++++++++++
22 lib/Kconfig | 10 +++--
24 scripts/mkcompile_h | 4 +-
25 24 files changed, 202 insertions(+), 18 deletions(-)
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
38 #define OSST_MAJOR 206 /* OnStream-SCx0 SCSI tape */
40 +#define CRASH_DUMP_MAJOR 221 /* crash dump interface */
42 #define IBM_TTY3270_MAJOR 227
43 #define IBM_FS3270_MAJOR 228
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
48 #define INVALIDATE_TLB_VECTOR 0xfd
49 #define RESCHEDULE_VECTOR 0xfc
50 #define CALL_FUNCTION_VECTOR 0xfb
51 +#define DUMP_VECTOR 0xfa
53 #define THERMAL_APIC_VECTOR 0xf0
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
58 -#ifndef _ASM_KMAP_TYPES_H
59 +22#ifndef _ASM_KMAP_TYPES_H
60 #define _ASM_KMAP_TYPES_H
62 #include <linux/config.h>
63 @@ -26,7 +26,8 @@ D(12) KM_IRQ0,
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[];
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
86 #include <linux/tty.h>
87 #include <linux/highmem.h>
88 #include <linux/time.h>
89 +#include <linux/nmi.h>
91 #include <asm/semaphore.h>
92 #include <asm/processor.h>
94 #include <asm/tlbflush.h>
97 +#include <asm/e820.h>
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);
103 EXPORT_SYMBOL(eddnr);
106 +#ifdef CONFIG_CRASH_DUMP_MODULE
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);
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);
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
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>
132 @@ -449,6 +450,7 @@ void nmi_watchdog_tick (struct pt_regs *
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");
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 */
146 +unsigned long crashdump_addr = 0xdeadbeef;
148 static void __init parse_cmdline_early (char ** cmdline_p)
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;
154 + if (c == ' ' && !memcmp(from, "crashdump=", 10))
155 + crashdump_addr = memparse(from+10, &from);
160 @@ -914,6 +918,8 @@ static int __init noreplacement_setup(ch
162 __setup("noreplacement", noreplacement_setup);
164 +extern void crashdump_reserve(void);
166 void __init setup_arch(char **cmdline_p)
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
172 #include <linux/mc146818rtc.h>
173 #include <linux/cache.h>
174 #include <linux/interrupt.h>
175 +#include <linux/dump.h>
177 #include <asm/mtrr.h>
178 #include <asm/pgalloc.h>
179 @@ -144,6 +145,13 @@ inline void __send_IPI_shortcut(unsigned
181 cfg = __prepare_ICR(shortcut, vector);
183 + if (vector == DUMP_VECTOR) {
185 + * Setup DUMP IPI to be delivered as an NMI
187 + cfg = (cfg&~APIC_VECTOR_MASK)|APIC_DM_NMI;
191 * Send the IPI. The write to APIC_ICR fires this off.
193 @@ -467,6 +475,11 @@ void flush_tlb_all(void)
194 on_each_cpu(do_flush_tlb_all, 0, 1, 1);
197 +void dump_send_ipi(void)
199 + send_IPI_allbutself(DUMP_VECTOR);
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
209 -static void stop_this_cpu (void * dummy)
210 +void stop_this_cpu (void * dummy)
214 @@ -616,4 +629,3 @@ asmlinkage void smp_call_function_interr
215 atomic_inc(&call_data->finished);
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
222 #include <linux/highmem.h>
223 #include <linux/kallsyms.h>
224 #include <linux/ptrace.h>
225 +#include <linux/dump.h>
228 #include <linux/ioport.h>
229 @@ -322,6 +323,7 @@ void die(const char * str, struct pt_reg
231 CHK_REMOTE_DEBUG(0,SIGTRAP,err,regs,)
232 show_registers(regs);
233 + dump((char *)str, regs);
235 spin_unlock_irq(&die_lock);
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
243 +/* To enable modules to check if a page is in RAM */
244 +int pfn_is_ram(unsigned long pfn)
246 + return (page_is_ram(pfn));
249 #ifdef CONFIG_HIGHMEM
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)
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"
263 menu "Kernel hacking"
266 + tristate "Crash dump support (EXPERIMENTAL)"
267 + depends on EXPERIMENTAL
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.
274 +config CRASH_DUMP_BLOCKDEV
275 + tristate "Crash dump block device driver"
276 + depends on CRASH_DUMP
278 + Say Y to allow saving crash dumps directly to a disk device.
280 +config CRASH_DUMP_NETDEV
281 + tristate "Crash dump network device driver"
282 + depends on CRASH_DUMP
284 + Say Y to allow saving crash dumps over a network device.
286 +config CRASH_DUMP_MEMDEV
287 + bool "Crash dump staged memory driver"
288 + depends on CRASH_DUMP
290 + Say Y to allow intermediate saving crash dumps in spare
291 + memory pages which would then be written out to disk
294 +config CRASH_DUMP_SOFTBOOT
295 + bool "Save crash dump across a soft reboot"
296 + depends on CRASH_DUMP_MEMDEV
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).
303 +config CRASH_DUMP_COMPRESS_RLE
304 + tristate "Crash dump RLE compression"
305 + depends on CRASH_DUMP
307 + Say Y to allow saving dumps with Run Length Encoding compression.
309 +config CRASH_DUMP_COMPRESS_GZIP
310 + tristate "Crash dump GZIP compression"
311 + depends on CRASH_DUMP
313 + Say Y to allow saving dumps with Gnu Zip compression.
316 bool "Kernel debugging"
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
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
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)
337 # User may have a custom install script
338 @@ -26,13 +27,22 @@ if [ -x /sbin/installkernel ]; then exec
340 # Default install - same as make zlilo
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
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
356 +if [ -f $5/Kerntypes ]; then
357 + mv $5/Kerntypes $5/Kerntypes.old
363 +# copy the kernel type file if it exists
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`"
372 UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/"
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
377 ( echo /\* This file is auto generated, version $VERSION \*/
378 @@ -55,6 +55,8 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}
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"
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
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>
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);
401 EXPORT_SYMBOL(current_kernel_time);
403 +#ifdef CONFIG_CRASH_DUMP_MODULE
404 +EXPORT_SYMBOL(min_low_pfn);
405 +EXPORT_SYMBOL(dump_oncpu);
406 +EXPORT_SYMBOL(dump_function_ptr);
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
411 #include <linux/init.h>
412 #include <linux/sysrq.h>
413 #include <linux/interrupt.h>
415 +#include <linux/kexec.h>
418 asmlinkage void sys_sync(void); /* it's really int */
423 +void (*dump_function_ptr)(const char *, const struct pt_regs *) = 0;
425 struct notifier_block *panic_notifier_list;
427 @@ -54,6 +58,7 @@ NORET_TYPE void panic(const char * fmt,
429 vsnprintf(buf, sizeof(buf), fmt, args);
432 printk(KERN_EMERG "Kernel panic: %s\n",buf);
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..
438 printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);
441 + struct kimage *image;
442 + image = xchg(&kexec_image, 0);
444 + printk(KERN_EMERG "by starting a new kernel ..\n");
445 + mdelay(panic_timeout*1000);
446 + machine_kexec(image);
451 mdelay(panic_timeout*1000);
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
457 #define cpu_to_node_mask(cpu) (cpu_online_map)
460 +/* used to soft spin in sched while dump is in progress */
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;
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
476 + if (unlikely(dump_oncpu))
477 + goto dump_scheduling_disabled;
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))
489 + dump_scheduling_disabled:
490 + /* allow scheduling only if this is the dumping cpu */
491 + if (dump_oncpu != smp_processor_id()+1) {
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
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
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
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;
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)
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
540 +extra-$(CONFIG_CRASH_DUMP) += kerntypes.o
541 +CFLAGS_kerntypes.o := -gstabs
543 # files to be removed upon make clean
544 clean-files := ../include/linux/compile.h
546 @@ -24,3 +27,4 @@ $(obj)/version.o: include/linux/compile.
547 include/linux/compile.h: FORCE
549 @sh $(srctree)/scripts/mkcompile_h $@ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)"
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;
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.
563 +extern unsigned long _end;
564 +unsigned long *kernel_magic = &_end;
567 * Boot command-line arguments
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
573 #include <linux/uts.h>
574 #include <linux/utsname.h>
575 #include <linux/version.h>
576 +#include <linux/stringify.h>
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";
585 +const char *LINUX_COMPILE_VERSION_ID = __stringify(LINUX_COMPILE_VERSION_ID);
586 +LINUX_COMPILE_VERSION_ID_TYPE;