From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757317AbXGOVcO (ORCPT ); Sun, 15 Jul 2007 17:32:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752174AbXGOVb5 (ORCPT ); Sun, 15 Jul 2007 17:31:57 -0400 Received: from omr5.networksolutionsemail.com ([205.178.146.55]:58246 "EHLO omr5.networksolutionsemail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752147AbXGOVbv (ORCPT ); Sun, 15 Jul 2007 17:31:51 -0400 X-Greylist: delayed 1885 seconds by postgrey-1.27 at vger.kernel.org; Sun, 15 Jul 2007 17:31:51 EDT Message-ID: <469A8AED.7070207@nerdgrounds.com> Date: Sun, 15 Jul 2007 14:00:29 -0700 From: Jonathan Campbell User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: linux-kernel@vger.kernel.org CC: torvalds@transmeta.com Subject: Patches for REALLY TINY 386 kernels Content-Type: multipart/mixed; boundary="------------030109090009080104010309" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --------------030109090009080104010309 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I wrote a set of patches out of concern that even if you compile a 386 kernel a lot of code irrelevent to legacy machines still remains. Things like the Pentium TSC register, DMI information, ESCD parsing, and the use of CPUID do not apply to these machines, but looking at System.map you can see they're still there. Already with these patches I can compile a zImage kernel that is 450kb large (890kb decompressed) with a small initramfs payload, floppy and kernel module support, FPU emulation, that can successfully boot on an ancient 386 laptop with only 1MB of extended memory. Eventually what I'd like to have is the ability to compile a pure 386 kernel with all non-386 functions removed (and perhaps the same for 486 machines). These patches were written against the vanilla 2.6.21.1 kernel. They will have no effect UNLESS you make menuconfig and explicitly enable them there. --------------030109090009080104010309 Content-Type: text/plain; name="linux-2.6.21.1-386-reduction.patches" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="linux-2.6.21.1-386-reduction.patches" Only in linux-2.6.21.1: .config Only in linux-2.6.21.1: .config.old Only in linux-2.6.21.1: .config.saved Only in linux-2.6.21.1: .config~ Only in linux-2.6.21.1: .gitignore Only in linux-2.6.21.1: .mailmap Only in linux-2.6.21.1: .tmp_versions Only in linux-2.6.21.1: .version Only in linux-2.6.21.1: .vmlinux.cmd Only in linux-2.6.21.1: Module.symvers Only in linux-2.6.21.1: System.map diff -r -u linux-2.6.21.1/arch/i386/Kconfig linux-2.6.21.1-386/arch/i386/Kconfig --- linux-2.6.21.1/arch/i386/Kconfig 2007-04-27 21:49:26.000000000 +0000 +++ linux-2.6.21.1-386/arch/i386/Kconfig 2007-07-03 13:15:12.000000000 +0000 @@ -362,6 +362,15 @@ to disable it. MCE support simply ignores non-MCE processors like the 386 and 486, so nearly everyone can say Y here. +config X86_DONT_CPUID + bool "Disable CPUID support" + depends on M386 || M486 + default n + ---help--- + Enable this option if your kernel is strictly intended to run on legacy + 386/486 systems that don't have CPUID. This option disables all CPU detection + code that is not relevant to pre-Pentium systems. + config X86_MCE_NONFATAL tristate "Check for non-fatal errors on AMD Athlon/Duron / Intel Pentium 4" depends on X86_MCE @@ -444,6 +453,16 @@ enable this option even if you don't need it. Say N otherwise. +config X86_TSC + bool "Enable X86 use TSC timesource" + depends on X86_PC + default y + ---help--- + This enables your kernel to use the TSC register, present in all + Pentium and newer CPUs, as a timesource as an alternative to the + legacy PIT. This is highly recommended unless building a kernel + for legacy 386/486 systems. + config MICROCODE tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support" select FW_LOADER Only in linux-2.6.21.1/arch/i386/boot: .bootsect.cmd Only in linux-2.6.21.1/arch/i386/boot: .bootsect.o.cmd Only in linux-2.6.21.1/arch/i386/boot: .setup.cmd Only in linux-2.6.21.1/arch/i386/boot: .setup.o.cmd Only in linux-2.6.21.1/arch/i386/boot: .vmlinux.bin.cmd Only in linux-2.6.21.1/arch/i386/boot: .zImage.cmd Only in linux-2.6.21.1/arch/i386/boot: bootsect Only in linux-2.6.21.1/arch/i386/boot: bootsect.o Only in linux-2.6.21.1/arch/i386/boot/compressed: .head.o.cmd Only in linux-2.6.21.1/arch/i386/boot/compressed: .misc.o.cmd Only in linux-2.6.21.1/arch/i386/boot/compressed: .piggy.o.cmd Only in linux-2.6.21.1/arch/i386/boot/compressed: .vmlinux.bin.cmd Only in linux-2.6.21.1/arch/i386/boot/compressed: .vmlinux.bin.gz.cmd Only in linux-2.6.21.1/arch/i386/boot/compressed: .vmlinux.cmd Only in linux-2.6.21.1/arch/i386/boot/compressed: head.o Only in linux-2.6.21.1/arch/i386/boot/compressed: misc.o Only in linux-2.6.21.1/arch/i386/boot/compressed: piggy.o Only in linux-2.6.21.1/arch/i386/boot/compressed: vmlinux Only in linux-2.6.21.1/arch/i386/boot/compressed: vmlinux.bin Only in linux-2.6.21.1/arch/i386/boot/compressed: vmlinux.bin.gz Only in linux-2.6.21.1/arch/i386/boot: setup Only in linux-2.6.21.1/arch/i386/boot: setup.o Only in linux-2.6.21.1/arch/i386/boot/tools: .build.cmd Only in linux-2.6.21.1/arch/i386/boot/tools: build Only in linux-2.6.21.1/arch/i386/boot: vmlinux.bin Only in linux-2.6.21.1/arch/i386/boot: zImage Only in linux-2.6.21.1/arch/i386/crypto: .built-in.o.cmd Only in linux-2.6.21.1/arch/i386/crypto: built-in.o Only in linux-2.6.21.1/arch/i386/kernel: .alternative.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .asm-offsets.s.cmd Only in linux-2.6.21.1/arch/i386/kernel: .bootflag.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .built-in.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .e820.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .entry.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .head.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .i386_ksyms.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .i387.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .i8237.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .i8253.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .i8259.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .init_task.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .ioport.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .irq.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .ldt.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .module.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .pci-dma.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .pcspeaker.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .process.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .ptrace.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .quirks.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .reboot.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .setup.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .signal.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .sys_i386.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .sysenter.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .time.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .topology.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .traps.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .tsc.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .vmlinux.lds.cmd Only in linux-2.6.21.1/arch/i386/kernel: .vsyscall-int80.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .vsyscall-int80.so.cmd Only in linux-2.6.21.1/arch/i386/kernel: .vsyscall-note.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .vsyscall-syms.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .vsyscall-sysenter.o.cmd Only in linux-2.6.21.1/arch/i386/kernel: .vsyscall-sysenter.so.cmd Only in linux-2.6.21.1/arch/i386/kernel: .vsyscall.lds.cmd Only in linux-2.6.21.1/arch/i386/kernel: .vsyscall.o.cmd diff -r -u linux-2.6.21.1/arch/i386/kernel/Makefile linux-2.6.21.1-386/arch/i386/kernel/Makefile --- linux-2.6.21.1/arch/i386/kernel/Makefile 2007-04-27 21:49:26.000000000 +0000 +++ linux-2.6.21.1-386/arch/i386/kernel/Makefile 2007-07-03 12:27:34.000000000 +0000 @@ -7,7 +7,11 @@ obj-y := process.o signal.o entry.o traps.o irq.o \ ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \ pci-dma.o i386_ksyms.o i387.o bootflag.o e820.o\ - quirks.o i8237.o topology.o alternative.o i8253.o tsc.o + quirks.o i8237.o topology.o alternative.o i8253.o + +ifdef CONFIG_X86_TSC +obj-y := tsc.o +endif obj-$(CONFIG_STACKTRACE) += stacktrace.o obj-y += cpu/ Only in linux-2.6.21.1/arch/i386/kernel/acpi: .built-in.o.cmd Only in linux-2.6.21.1/arch/i386/kernel/acpi: built-in.o Only in linux-2.6.21.1/arch/i386/kernel: alternative.o Only in linux-2.6.21.1/arch/i386/kernel: asm-offsets.s Only in linux-2.6.21.1/arch/i386/kernel: bootflag.o Only in linux-2.6.21.1/arch/i386/kernel: built-in.o Only in linux-2.6.21.1/arch/i386/kernel/cpu: .amd.o.cmd Only in linux-2.6.21.1/arch/i386/kernel/cpu: .built-in.o.cmd Only in linux-2.6.21.1/arch/i386/kernel/cpu: .centaur.o.cmd Only in linux-2.6.21.1/arch/i386/kernel/cpu: .common.o.cmd Only in linux-2.6.21.1/arch/i386/kernel/cpu: .cyrix.o.cmd Only in linux-2.6.21.1/arch/i386/kernel/cpu: .intel.o.cmd Only in linux-2.6.21.1/arch/i386/kernel/cpu: .intel_cacheinfo.o.cmd Only in linux-2.6.21.1/arch/i386/kernel/cpu: .nexgen.o.cmd Only in linux-2.6.21.1/arch/i386/kernel/cpu: .proc.o.cmd Only in linux-2.6.21.1/arch/i386/kernel/cpu: .rise.o.cmd Only in linux-2.6.21.1/arch/i386/kernel/cpu: .transmeta.o.cmd Only in linux-2.6.21.1/arch/i386/kernel/cpu: .umc.o.cmd diff -r -u linux-2.6.21.1/arch/i386/kernel/cpu/Makefile linux-2.6.21.1-386/arch/i386/kernel/cpu/Makefile --- linux-2.6.21.1/arch/i386/kernel/cpu/Makefile 2007-04-27 21:49:26.000000000 +0000 +++ linux-2.6.21.1-386/arch/i386/kernel/cpu/Makefile 2007-07-03 13:17:57.000000000 +0000 @@ -4,14 +4,18 @@ obj-y := common.o proc.o +ifndef CONFIG_X86_DONT_CPUID obj-y += amd.o obj-y += cyrix.o obj-y += centaur.o obj-y += transmeta.o +endif obj-y += intel.o intel_cacheinfo.o +ifndef CONFIG_X86_DONT_CPUID obj-y += rise.o obj-y += nexgen.o obj-y += umc.o +endif obj-$(CONFIG_X86_MCE) += mcheck/ Only in linux-2.6.21.1/arch/i386/kernel/cpu: amd.o Only in linux-2.6.21.1/arch/i386/kernel/cpu: built-in.o Only in linux-2.6.21.1/arch/i386/kernel/cpu: centaur.o diff -r -u linux-2.6.21.1/arch/i386/kernel/cpu/common.c linux-2.6.21.1-386/arch/i386/kernel/cpu/common.c --- linux-2.6.21.1/arch/i386/kernel/cpu/common.c 2007-04-27 21:49:26.000000000 +0000 +++ linux-2.6.21.1-386/arch/i386/kernel/cpu/common.c 2007-07-03 14:05:41.000000000 +0000 @@ -20,6 +20,11 @@ #endif #include +#ifdef CONFIG_X86_DONT_CPUID +# define cpuid __EVIL__EVIL__EVIL__ +# define cpuid_eax __EVIL__EVIL__EVIL__ +#endif + #include "cpu.h" DEFINE_PER_CPU(struct Xgt_desc_struct, cpu_gdt_descr); @@ -29,9 +34,11 @@ EXPORT_SYMBOL(_cpu_pda); static int cachesize_override __cpuinitdata = -1; +#ifndef CONFIG_X86_DONT_CPUID static int disable_x86_fxsr __cpuinitdata; static int disable_x86_serial_nr __cpuinitdata = 1; static int disable_x86_sep __cpuinitdata; +#endif struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {}; @@ -63,6 +70,7 @@ } __setup("cachesize=", cachesize_setup); +#ifndef CONFIG_X86_DONT_CPUID int __cpuinit get_model_name(struct cpuinfo_x86 *c) { unsigned int *v; @@ -128,12 +136,14 @@ printk(KERN_INFO "CPU: L2 Cache: %dK (%d bytes/line)\n", l2size, ecx & 0xFF); } +#endif /* Naming convention should be: [()] */ /* This table only is used unless init_() below doesn't set it; */ /* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */ /* Look up CPU names by table lookup. */ +#ifndef CONFIG_X86_DONT_CPUID static char __cpuinit *table_lookup_model(struct cpuinfo_x86 *c) { struct cpu_model_info *info; @@ -154,7 +164,6 @@ return NULL; /* Not found */ } - static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) { char *v = c->x86_vendor_id; @@ -182,7 +191,6 @@ this_cpu = &default_cpu; } - static int __init x86_fxsr_setup(char * s) { /* Tell all the other CPU's to not use it... */ @@ -206,7 +214,7 @@ return 1; } __setup("nosep", x86_sep_setup); - +#endif /* Standard macro to see if a specific flag is changeable */ static inline int flag_is_changeable_p(u32 flag) @@ -231,6 +239,9 @@ /* Probe for the CPUID instruction */ +#ifdef CONFIG_X86_DONT_CPUID +# define have_cpuid_p() ((int)0) +#else static int __cpuinit have_cpuid_p(void) { return flag_is_changeable_p(X86_EFLAGS_ID); @@ -259,6 +270,7 @@ c->x86_cache_alignment = ((misc >> 8) & 0xff) * 8; } } +#endif /* Do minimum CPU detection early. Fields really needed: vendor, cpuid_level, family, model, mask, cache alignment. @@ -272,14 +284,20 @@ c->x86_cache_alignment = 32; +#ifndef CONFIG_X86_DONT_CPUID if (!have_cpuid_p()) return; cpu_detect(c); get_cpu_vendor(c, 1); +#else + c->x86_vendor = X86_VENDOR_UNKNOWN; + this_cpu = &default_cpu; +#endif } +#ifndef CONFIG_X86_DONT_CPUID static void __cpuinit generic_identify(struct cpuinfo_x86 * c) { u32 tfms, xlvl; @@ -339,7 +357,9 @@ c->phys_proc_id = (cpuid_ebx(1) >> 24) & 0xff; #endif } +#endif +#ifndef CONFIG_X86_DONT_CPUID static void __cpuinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c) { if (cpu_has(c, X86_FEATURE_PN) && disable_x86_serial_nr ) { @@ -362,7 +382,7 @@ return 1; } __setup("serialnumber", x86_serial_nr_setup); - +#endif /* @@ -382,7 +402,6 @@ c->x86_max_cores = 1; c->x86_clflush_size = 32; memset(&c->x86_capability, 0, sizeof c->x86_capability); - if (!have_cpuid_p()) { /* First of all, decide if this is a 486 or higher */ /* It's a 486 if we can modify the AC flag */ @@ -391,8 +410,9 @@ else c->x86 = 3; } - +#ifndef CONFIG_X86_DONT_CPUID generic_identify(c); +#endif printk(KERN_DEBUG "CPU: After generic identify, caps:"); for (i = 0; i < NCAPINTS; i++) @@ -421,14 +441,17 @@ if (this_cpu->c_init) this_cpu->c_init(c); +#ifndef CONFIG_X86_DONT_CPUID /* Disable the PN if appropriate */ squash_the_stupid_serial_number(c); +#endif /* * The vendor-specific functions might have changed features. Now * we do "generic changes." */ +#ifdef CONFIG_X86_TSC /* TSC disabled? */ if ( tsc_disable ) clear_bit(X86_FEATURE_TSC, c->x86_capability); @@ -457,6 +480,11 @@ sprintf(c->x86_model_id, "%02x/%02x", c->x86, c->x86_model); } +#else + if ( !c->x86_model_id[0] ) + sprintf(c->x86_model_id, "%02x/%02x", + c->x86, c->x86_model); +#endif /* Now the feature flags better reflect actual CPU features! */ @@ -465,6 +493,7 @@ printk(" %08lx", c->x86_capability[i]); printk("\n"); +#ifdef CONFIG_SMP /* * On SMP, boot_cpu_data holds the common feature set between * all CPUs; so make sure that we indicate which features are @@ -476,6 +505,7 @@ for ( i = 0 ; i < NCAPINTS ; i++ ) boot_cpu_data.x86_capability[i] &= c->x86_capability[i]; } +#endif /* Init Machine Check Exception if available. */ mcheck_init(c); @@ -581,6 +611,7 @@ void __init early_cpu_init(void) { +#ifndef CONFIG_X86_DONT_CPUID intel_cpu_init(); cyrix_init_cpu(); nsc_init_cpu(); @@ -590,6 +621,7 @@ rise_init_cpu(); nexgen_init_cpu(); umc_init_cpu(); +#endif early_cpu_detect(); #ifdef CONFIG_DEBUG_PAGEALLOC @@ -736,12 +768,14 @@ if (cpu_has_vme || cpu_has_tsc || cpu_has_de) clear_in_cr4(X86_CR4_VME|X86_CR4_PVI|X86_CR4_TSD|X86_CR4_DE); +#ifdef CONFIG_X86_TSC if (tsc_disable && cpu_has_tsc) { printk(KERN_NOTICE "Disabling TSC...\n"); /**** FIX-HPA: DOES THIS REALLY BELONG HERE? ****/ clear_bit(X86_FEATURE_TSC, boot_cpu_data.x86_capability); set_in_cr4(X86_CR4_TSD); } +#endif load_idt(&idt_descr); Only in linux-2.6.21.1/arch/i386/kernel/cpu: common.o Only in linux-2.6.21.1/arch/i386/kernel/cpu: cyrix.o diff -r -u linux-2.6.21.1/arch/i386/kernel/cpu/intel.c linux-2.6.21.1-386/arch/i386/kernel/cpu/intel.c --- linux-2.6.21.1/arch/i386/kernel/cpu/intel.c 2007-04-27 21:49:26.000000000 +0000 +++ linux-2.6.21.1-386/arch/i386/kernel/cpu/intel.c 2007-07-03 13:51:39.000000000 +0000 @@ -19,6 +19,12 @@ #include #endif +#ifdef CONFIG_X86_DONT_CPUID +# define cpuid __EVIL__EVIL__EVIL__ +# define cpuid_eax __EVIL__EVIL__EVIL__ +# define cpuid_count __EVIL__EVIL__EVIL__ +#endif + extern int trap_init_f00f_bug(void); #ifdef CONFIG_X86_INTEL_USERCOPY @@ -28,6 +34,7 @@ struct movsl_mask movsl_mask __read_mostly; #endif +#ifndef CONFIG_X86_DONT_CPUID void __cpuinit early_intel_workaround(struct cpuinfo_x86 *c) { if (c->x86_vendor != X86_VENDOR_INTEL) @@ -94,13 +101,14 @@ else return 1; } +#endif static void __cpuinit init_intel(struct cpuinfo_x86 *c) { unsigned int l2 = 0; char *p = NULL; -#ifdef CONFIG_X86_F00F_BUG +#if defined(CONFIG_X86_F00F_BUG) && !defined(CONFIG_X86_DONT_CPUID) /* * All current models of Pentium and Pentium with MMX technology CPUs * have the F0 0F bug, which lets nonprivileged users lock up the system. @@ -120,6 +128,7 @@ #endif select_idle_routine(c); +#ifndef CONFIG_X86_DONT_CPUID l2 = init_intel_cacheinfo(c); if (c->cpuid_level > 9 ) { unsigned eax = cpuid_eax(10); @@ -164,12 +173,15 @@ strcpy(c->x86_model_id, p); c->x86_max_cores = num_cpu_cores(c); - detect_ht(c); /* Work around errata */ Intel_errata_workarounds(c); +#else + c->x86_max_cores = 1; +#endif +#ifndef CONFIG_X86_DONT_CPUID #ifdef CONFIG_X86_INTEL_USERCOPY /* * Set up the preferred alignment for movsl bulk memory moves @@ -204,8 +216,10 @@ if (!(l1 & (1<<12))) set_bit(X86_FEATURE_PEBS, c->x86_capability); } +#endif } +#ifndef CONFIG_X86_DONT_CPUID static unsigned int __cpuinit intel_size_cache(struct cpuinfo_x86 * c, unsigned int size) { /* Intel PIII Tualatin. This comes in two flavours. @@ -217,7 +231,9 @@ size = 256; return size; } +#endif +#ifndef CONFIG_X86_DONT_CPUID static struct cpu_dev intel_cpu_dev __cpuinitdata = { .c_vendor = "Intel", .c_ident = { "GenuineIntel" }, @@ -279,6 +295,7 @@ cpu_devs[X86_VENDOR_INTEL] = &intel_cpu_dev; return 0; } +#endif #ifndef CONFIG_X86_CMPXCHG unsigned long cmpxchg_386_u8(volatile void *ptr, u8 old, u8 new) Only in linux-2.6.21.1/arch/i386/kernel/cpu: intel.o Only in linux-2.6.21.1/arch/i386/kernel/cpu: intel_cacheinfo.o Only in linux-2.6.21.1/arch/i386/kernel/cpu: nexgen.o Only in linux-2.6.21.1/arch/i386/kernel/cpu: proc.o Only in linux-2.6.21.1/arch/i386/kernel/cpu: rise.o Only in linux-2.6.21.1/arch/i386/kernel/cpu: transmeta.o Only in linux-2.6.21.1/arch/i386/kernel/cpu: umc.o Only in linux-2.6.21.1/arch/i386/kernel: e820.o Only in linux-2.6.21.1/arch/i386/kernel: entry.o Only in linux-2.6.21.1/arch/i386/kernel: head.o Only in linux-2.6.21.1/arch/i386/kernel: i386_ksyms.o Only in linux-2.6.21.1/arch/i386/kernel: i387.o Only in linux-2.6.21.1/arch/i386/kernel: i8237.o Only in linux-2.6.21.1/arch/i386/kernel: i8253.o Only in linux-2.6.21.1/arch/i386/kernel: i8259.o Only in linux-2.6.21.1/arch/i386/kernel: init_task.o Only in linux-2.6.21.1/arch/i386/kernel: ioport.o Only in linux-2.6.21.1/arch/i386/kernel: irq.o Only in linux-2.6.21.1/arch/i386/kernel: ldt.o Only in linux-2.6.21.1/arch/i386/kernel: module.o Only in linux-2.6.21.1/arch/i386/kernel: pci-dma.o Only in linux-2.6.21.1/arch/i386/kernel: pcspeaker.o Only in linux-2.6.21.1/arch/i386/kernel: process.o Only in linux-2.6.21.1/arch/i386/kernel: ptrace.o Only in linux-2.6.21.1/arch/i386/kernel: quirks.o diff -r -u linux-2.6.21.1/arch/i386/kernel/reboot.c linux-2.6.21.1-386/arch/i386/kernel/reboot.c --- linux-2.6.21.1/arch/i386/kernel/reboot.c 2007-04-27 21:49:26.000000000 +0000 +++ linux-2.6.21.1-386/arch/i386/kernel/reboot.c 2007-07-03 12:14:39.000000000 +0000 @@ -9,7 +9,9 @@ #include #include #include +#ifdef CONFIG_DMI_SCAN #include +#endif #include #include #include @@ -75,6 +77,7 @@ * Dell Inc. so their systems "just work". :-) */ +#ifdef CONFIG_DMI_SCAN /* * Some machines require the "reboot=b" commandline option, this quirk makes that automatic. */ @@ -122,10 +125,13 @@ }, { } }; +#endif static int __init reboot_init(void) { +#ifdef CONFIG_DMI_SCAN dmi_check_system(reboot_dmi_table); +#endif return 0; } Only in linux-2.6.21.1/arch/i386/kernel: reboot.o diff -r -u linux-2.6.21.1/arch/i386/kernel/setup.c linux-2.6.21.1-386/arch/i386/kernel/setup.c --- linux-2.6.21.1/arch/i386/kernel/setup.c 2007-04-27 21:49:26.000000000 +0000 +++ linux-2.6.21.1-386/arch/i386/kernel/setup.c 2007-07-03 12:18:46.000000000 +0000 @@ -44,7 +44,9 @@ #include #include #include +#ifdef CONFIG_DMI_SCAN #include +#endif #include #include