Re: [PATCH] Patches for tiny 386 kernels, again. Linux kernel 2.6.22.7
Heh, well of course I vigoursly checked System.map. On my x86 and amd64 systems it removes them all. What a stupid question :-p Nope. I expect(ed) you to do that, i.e., make sure that the patch does that the description says that it does. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Patches for tiny 386 kernels, again. Linux kernel 2.6.22.7
Sorry about that. That's the reason I send them as attachments. Any suggestions for someone like myself using Mozilla Thunderbird? Damaged as the patch is, I was able to apply it by using 'patch -l' (ignore whitespace) + some fuzz. Not something that Linus or Andrew would or should do. I built and booted the kernel, it's running fine (x86_32 notebook). - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Patches for tiny 386 kernels, again. Linux kernel 2.6.22.7
Here is the DMI patch again, written against linux-2.6.23-rc8, with some of the #ifdef CONFIG_DMI's removed and moved to include/linux/dmi.h. Putting them there in the way I've done ensures that you don't have to put #ifdef CONFIG_DMI around each dmi_check_machine() and that you don't have to apply little patches to so many device drivers. diff -u -r linux-2.6.23-rc8-old/arch/i386/Kconfig linux-2.6.23-rc8/arch/i386/Kconfig --- linux-2.6.23-rc8-old/arch/i386/Kconfig2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/Kconfig2007-09-26 00:01:48.0 + @@ -83,10 +83,6 @@ bool default y -config DMI -bool -default y - source "init/Kconfig" menu "Processor type and features" diff -u -r linux-2.6.23-rc8-old/arch/i386/kernel/acpi/boot.c linux-2.6.23-rc8/arch/i386/kernel/acpi/boot.c --- linux-2.6.23-rc8-old/arch/i386/kernel/acpi/boot.c2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/kernel/acpi/boot.c2007-09-26 00:40:42.0 + @@ -869,7 +869,7 @@ return; } -#ifdef __i386__ +#if defined(__i386__) && defined(CONFIG_DMI) static int __init disable_acpi_irq(struct dmi_system_id *d) { @@ -1097,8 +1097,7 @@ }, {} }; - -#endif/* __i386__ */ +#endif /* CONFIG_DMI && __i386__ */ /* * acpi_boot_table_init() and acpi_boot_init() diff -u -r linux-2.6.23-rc8-old/arch/i386/kernel/acpi/sleep.c linux-2.6.23-rc8/arch/i386/kernel/acpi/sleep.c --- linux-2.6.23-rc8-old/arch/i386/kernel/acpi/sleep.c2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/kernel/acpi/sleep.c2007-09-25 23:59:14.0 + @@ -86,6 +86,7 @@ return 0; } +#ifdef CONFIG_DMI static __initdata struct dmi_system_id acpisleep_dmi_table[] = { {/* Reset video mode after returning from ACPI S3 sleep */ .callback = reset_videomode_after_s3, @@ -104,3 +105,5 @@ } core_initcall(acpisleep_dmi_init); +#endif + diff -u -r linux-2.6.23-rc8-old/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c linux-2.6.23-rc8/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c --- linux-2.6.23-rc8-old/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c 2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c 2007-09-26 00:59:26.0 + @@ -535,7 +535,7 @@ return 0; } -#ifdef CONFIG_SMP +#if defined(CONFIG_SMP) && defined(CONFIG_DMI) /* * Some BIOSes do SW_ANY coordination internally, either set it up in hw * or do it in BIOS firmware and won't inform about it to OS. If not @@ -562,7 +562,9 @@ }, { } }; -#endif +#else +# define bios_with_sw_any_bug 0 +#endif /* CONFIG_SMP && CONFIG_DMI */ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) { diff -u -r linux-2.6.23-rc8-old/arch/i386/kernel/reboot.c linux-2.6.23-rc8/arch/i386/kernel/reboot.c --- linux-2.6.23-rc8-old/arch/i386/kernel/reboot.c2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/kernel/reboot.c2007-09-26 01:00:08.0 + @@ -71,6 +71,7 @@ __setup("reboot=", reboot_setup); +#ifdef CONFIG_DMI /* * Reboot options and system auto-detection code provided by * Dell Inc. so their systems "just work". :-) @@ -131,6 +132,7 @@ }, { } }; +#endif /* CONFIG_DMI */ static int __init reboot_init(void) { diff -u -r linux-2.6.23-rc8-old/arch/i386/kernel/tsc.c linux-2.6.23-rc8/arch/i386/kernel/tsc.c --- linux-2.6.23-rc8-old/arch/i386/kernel/tsc.c2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/kernel/tsc.c2007-09-26 00:39:52.0 + @@ -290,6 +290,7 @@ } EXPORT_SYMBOL_GPL(mark_tsc_unstable); +#ifdef CONFIG_DMI static int __init dmi_mark_tsc_unstable(struct dmi_system_id *d) { printk(KERN_NOTICE "%s detected: marking TSC unstable.\n", @@ -310,6 +311,7 @@ }, {} }; +#endif /* * Make an educated guess if the TSC is trustworthy and synchronized diff -u -r linux-2.6.23-rc8-old/arch/i386/mach-generic/bigsmp.c linux-2.6.23-rc8/arch/i386/mach-generic/bigsmp.c --- linux-2.6.23-rc8-old/arch/i386/mach-generic/bigsmp.c2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/mach-generic/bigsmp.c2007-09-26 00:57:13.0 + @@ -21,6 +21,7 @@ static int dmi_bigsmp; /* can be set by dmi scanners */ +#ifdef CONFIG_DMI static int hp_ht_bigsmp(struct dmi_system_id *d) { #ifdef CONFIG_X86_GENERICARCH @@ -30,7 +31,6 @@ return 0; } - static struct dmi_system_id bigsmp_dmi_table[] = { { hp_ht_bigsmp, "HP ProLiant DL760 G2", { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), @@ -43,7 +43,7 @@ }}, { } }; - +#endif /* CONFIG_DMI */ static int probe_bigsmp(void) { diff -u -r linux-2.6.23-rc8-old/arch/i386/pci/fixup.c linux-2.6.23-rc8/arch/i386/pci/fixup.c --- linux-2.6.23-rc8-old/arch/i386/pci/fixup.c2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/pci/fixup.c2007-09-26 01:17:23.0 + @@ -367,6 +367,7 @@ */ static u16 toshiba_line_size;
Re: [PATCH] Patches for tiny 386 kernels, again. Linux kernel 2.6.22.7
Here is the DMI patch again, written against linux-2.6.23-rc8, with some of the #ifdef CONFIG_DMI's removed and moved to include/linux/dmi.h. Putting them there in the way I've done ensures that you don't have to put #ifdef CONFIG_DMI around each dmi_check_machine() and that you don't have to apply little patches to so many device drivers. diff -u -r linux-2.6.23-rc8-old/arch/i386/Kconfig linux-2.6.23-rc8/arch/i386/Kconfig --- linux-2.6.23-rc8-old/arch/i386/Kconfig2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/Kconfig2007-09-26 00:01:48.0 + @@ -83,10 +83,6 @@ bool default y -config DMI -bool -default y - source init/Kconfig menu Processor type and features diff -u -r linux-2.6.23-rc8-old/arch/i386/kernel/acpi/boot.c linux-2.6.23-rc8/arch/i386/kernel/acpi/boot.c --- linux-2.6.23-rc8-old/arch/i386/kernel/acpi/boot.c2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/kernel/acpi/boot.c2007-09-26 00:40:42.0 + @@ -869,7 +869,7 @@ return; } -#ifdef __i386__ +#if defined(__i386__) defined(CONFIG_DMI) static int __init disable_acpi_irq(struct dmi_system_id *d) { @@ -1097,8 +1097,7 @@ }, {} }; - -#endif/* __i386__ */ +#endif /* CONFIG_DMI __i386__ */ /* * acpi_boot_table_init() and acpi_boot_init() diff -u -r linux-2.6.23-rc8-old/arch/i386/kernel/acpi/sleep.c linux-2.6.23-rc8/arch/i386/kernel/acpi/sleep.c --- linux-2.6.23-rc8-old/arch/i386/kernel/acpi/sleep.c2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/kernel/acpi/sleep.c2007-09-25 23:59:14.0 + @@ -86,6 +86,7 @@ return 0; } +#ifdef CONFIG_DMI static __initdata struct dmi_system_id acpisleep_dmi_table[] = { {/* Reset video mode after returning from ACPI S3 sleep */ .callback = reset_videomode_after_s3, @@ -104,3 +105,5 @@ } core_initcall(acpisleep_dmi_init); +#endif + diff -u -r linux-2.6.23-rc8-old/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c linux-2.6.23-rc8/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c --- linux-2.6.23-rc8-old/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c 2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c 2007-09-26 00:59:26.0 + @@ -535,7 +535,7 @@ return 0; } -#ifdef CONFIG_SMP +#if defined(CONFIG_SMP) defined(CONFIG_DMI) /* * Some BIOSes do SW_ANY coordination internally, either set it up in hw * or do it in BIOS firmware and won't inform about it to OS. If not @@ -562,7 +562,9 @@ }, { } }; -#endif +#else +# define bios_with_sw_any_bug 0 +#endif /* CONFIG_SMP CONFIG_DMI */ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) { diff -u -r linux-2.6.23-rc8-old/arch/i386/kernel/reboot.c linux-2.6.23-rc8/arch/i386/kernel/reboot.c --- linux-2.6.23-rc8-old/arch/i386/kernel/reboot.c2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/kernel/reboot.c2007-09-26 01:00:08.0 + @@ -71,6 +71,7 @@ __setup(reboot=, reboot_setup); +#ifdef CONFIG_DMI /* * Reboot options and system auto-detection code provided by * Dell Inc. so their systems just work. :-) @@ -131,6 +132,7 @@ }, { } }; +#endif /* CONFIG_DMI */ static int __init reboot_init(void) { diff -u -r linux-2.6.23-rc8-old/arch/i386/kernel/tsc.c linux-2.6.23-rc8/arch/i386/kernel/tsc.c --- linux-2.6.23-rc8-old/arch/i386/kernel/tsc.c2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/kernel/tsc.c2007-09-26 00:39:52.0 + @@ -290,6 +290,7 @@ } EXPORT_SYMBOL_GPL(mark_tsc_unstable); +#ifdef CONFIG_DMI static int __init dmi_mark_tsc_unstable(struct dmi_system_id *d) { printk(KERN_NOTICE %s detected: marking TSC unstable.\n, @@ -310,6 +311,7 @@ }, {} }; +#endif /* * Make an educated guess if the TSC is trustworthy and synchronized diff -u -r linux-2.6.23-rc8-old/arch/i386/mach-generic/bigsmp.c linux-2.6.23-rc8/arch/i386/mach-generic/bigsmp.c --- linux-2.6.23-rc8-old/arch/i386/mach-generic/bigsmp.c2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/mach-generic/bigsmp.c2007-09-26 00:57:13.0 + @@ -21,6 +21,7 @@ static int dmi_bigsmp; /* can be set by dmi scanners */ +#ifdef CONFIG_DMI static int hp_ht_bigsmp(struct dmi_system_id *d) { #ifdef CONFIG_X86_GENERICARCH @@ -30,7 +31,6 @@ return 0; } - static struct dmi_system_id bigsmp_dmi_table[] = { { hp_ht_bigsmp, HP ProLiant DL760 G2, { DMI_MATCH(DMI_BIOS_VENDOR, HP), @@ -43,7 +43,7 @@ }}, { } }; - +#endif /* CONFIG_DMI */ static int probe_bigsmp(void) { diff -u -r linux-2.6.23-rc8-old/arch/i386/pci/fixup.c linux-2.6.23-rc8/arch/i386/pci/fixup.c --- linux-2.6.23-rc8-old/arch/i386/pci/fixup.c2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/arch/i386/pci/fixup.c2007-09-26 01:17:23.0 + @@ -367,6 +367,7 @@ */ static u16 toshiba_line_size; +#ifdef CONFIG_DMI static
Re: [PATCH] Patches for tiny 386 kernels, again. Linux kernel 2.6.22.7
Sorry about that. That's the reason I send them as attachments. Any suggestions for someone like myself using Mozilla Thunderbird? Damaged as the patch is, I was able to apply it by using 'patch -l' (ignore whitespace) + some fuzz. Not something that Linus or Andrew would or should do. I built and booted the kernel, it's running fine (x86_32 notebook). - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Patches for tiny 386 kernels, again. Linux kernel 2.6.22.7
Heh, well of course I vigoursly checked System.map. On my x86 and amd64 systems it removes them all. What a stupid question :-p Nope. I expect(ed) you to do that, i.e., make sure that the patch does that the description says that it does. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Patches for tiny 386 kernels, again. Linux kernel 2.6.22.7
Sorry for the long delay, been very busy since I last posted the 386 kernel patches back in July. Now that I have more free time I remade the patches in a cleaner manner, broken down into smaller patches, with fewer #ifdefs all over the place. most #ifdefs are in the include/asm-i386 headers now. linux-2.6.22.7-embedded-disable-rdtsc.patch: * Allows you to remove Pentium TSC register-based timing, which would never be used on a kernel targeting 386 and 486 boxes exclusively. Apparently there is already a CONFIG_X86_TSC out there, this patch makes it work as a means to disable TSC support entirely. Depends on CONFIG_EMBEDDED. linux-2.6.22.7-embedded-dmi-disable-option.patch: * Allows you to remove DMI (Desktop Management Interface) parsing. Older computers do not have DMI structures in the BIOS, on these computers the DMI code is a waste of space. In my tests with applying this patch and disabling DMI removes 6KB from arch/i386/boot/bzImage after compile. Apparently there is already a CONFIG_DMI out there, and #ifdef's in some parts to check this, so all this patch does is make CONFIG_DMI visible from "make menuconfig" while patching up other parts (like ACPI) that simply assume DMI functions are there. Depends on CONFIG_EMBEDDED. diff -u -r linux-2.6.22.7-old/arch/i386/Kconfig linux-2.6.22.7/arch/i386/Kconfig --- linux-2.6.22.7-old/arch/i386/Kconfig2007-09-21 22:38:23.0 + +++ linux-2.6.22.7/arch/i386/Kconfig2007-09-23 19:40:15.0 + @@ -83,10 +83,6 @@ bool default y -config DMI - bool - default y - source "init/Kconfig" menu "Processor type and features" @@ -395,6 +391,19 @@ XFree86 to initialize some video cards via BIOS. Disabling this option saves about 6k. +config DMI + default y + bool "Enable DMI support" if EMBEDDED + depends on X86 + help + This enables support for processing the Desktop Management + Interface structures present in most modern BIOSes. If you are + building a kernel for an older Pentium, 486, or 386 system and + memory is tight, you can disable this to help reduce the size + of your kernel by about 6K. + + If unsure, say Y + config TOSHIBA tristate "Toshiba Laptop support" ---help--- diff -u -r linux-2.6.22.7-old/arch/i386/kernel/acpi/boot.c linux-2.6.22.7/arch/i386/kernel/acpi/boot.c --- linux-2.6.22.7-old/arch/i386/kernel/acpi/boot.c 2007-09-21 22:38:23.0 + +++ linux-2.6.22.7/arch/i386/kernel/acpi/boot.c 2007-09-23 19:37:12.0 + @@ -891,6 +891,7 @@ return 0; } +#ifdef CONFIG_DMI static int __init dmi_disable_acpi(struct dmi_system_id *d) { if (!acpi_force) { @@ -1097,6 +1098,7 @@ }, {} }; +#endif /* CONFIG_DMI */ #endif /* __i386__ */ @@ -1127,7 +1129,7 @@ { int error; -#ifdef __i386__ +#if defined(__i386__) && defined(CONFIG_DMI) dmi_check_system(acpi_dmi_table); #endif diff -u -r linux-2.6.22.7-old/arch/i386/kernel/acpi/sleep.c linux-2.6.22.7/arch/i386/kernel/acpi/sleep.c --- linux-2.6.22.7-old/arch/i386/kernel/acpi/sleep.c2007-09-21 22:38:23.0 + +++ linux-2.6.22.7/arch/i386/kernel/acpi/sleep.c2007-09-23 19:36:07.0 + @@ -86,6 +86,7 @@ return 0; } +#ifdef CONFIG_DMI static __initdata struct dmi_system_id acpisleep_dmi_table[] = { { /* Reset video mode after returning from ACPI S3 sleep */ .callback = reset_videomode_after_s3, @@ -104,3 +105,5 @@ } core_initcall(acpisleep_dmi_init); +#endif + diff -u -r linux-2.6.22.7-old/arch/i386/kernel/setup.c linux-2.6.22.7/arch/i386/kernel/setup.c --- linux-2.6.22.7-old/arch/i386/kernel/setup.c 2007-09-21 22:38:23.0 + +++ linux-2.6.22.7/arch/i386/kernel/setup.c 2007-09-23 19:30:59.0 + @@ -611,7 +611,9 @@ * NOTE: at this point the bootmem allocator is fully available. */ +#ifdef CONFIG_DMI dmi_scan_machine(); +#endif #ifdef CONFIG_X86_GENERICARCH generic_apic_probe(); diff -u -r linux-2.6.22.7-old/arch/i386/kernel/tsc.c linux-2.6.22.7/arch/i386/kernel/tsc.c --- linux-2.6.22.7-old/arch/i386/kernel/tsc.c 2007-09-21 22:38:23.0 + +++ linux-2.6.22.7/arch/i386/kernel/tsc.c 2007-09-23 19:36:37.0 + @@ -290,6 +290,7 @@ } EXPORT_SYMBOL_GPL(mark_tsc_unstable); +#ifdef CONFIG_DMI static int __init dmi_mark_tsc_unstable(struct dmi_system_id *d) { printk(KERN_NOTICE "%s detected: marking TSC unstable.\n", @@ -310,6 +311,7 @@ }, {} }; +#endif /* * Make an educated guess if the TSC is trustworthy and synchronized @@ -369,8 +371,10 @@ set_cyc2ns_scale(cpu_khz); use_tsc_delay(); +#ifdef CONFIG_DMI /* Check and install
[PATCH] Patches for tiny 386 kernels, again. Linux kernel 2.6.22.7
Sorry for the long delay, been very busy since I last posted the 386 kernel patches back in July. Now that I have more free time I remade the patches in a cleaner manner, broken down into smaller patches, with fewer #ifdefs all over the place. most #ifdefs are in the include/asm-i386 headers now. linux-2.6.22.7-embedded-disable-rdtsc.patch: * Allows you to remove Pentium TSC register-based timing, which would never be used on a kernel targeting 386 and 486 boxes exclusively. Apparently there is already a CONFIG_X86_TSC out there, this patch makes it work as a means to disable TSC support entirely. Depends on CONFIG_EMBEDDED. linux-2.6.22.7-embedded-dmi-disable-option.patch: * Allows you to remove DMI (Desktop Management Interface) parsing. Older computers do not have DMI structures in the BIOS, on these computers the DMI code is a waste of space. In my tests with applying this patch and disabling DMI removes 6KB from arch/i386/boot/bzImage after compile. Apparently there is already a CONFIG_DMI out there, and #ifdef's in some parts to check this, so all this patch does is make CONFIG_DMI visible from make menuconfig while patching up other parts (like ACPI) that simply assume DMI functions are there. Depends on CONFIG_EMBEDDED. diff -u -r linux-2.6.22.7-old/arch/i386/Kconfig linux-2.6.22.7/arch/i386/Kconfig --- linux-2.6.22.7-old/arch/i386/Kconfig2007-09-21 22:38:23.0 + +++ linux-2.6.22.7/arch/i386/Kconfig2007-09-23 19:40:15.0 + @@ -83,10 +83,6 @@ bool default y -config DMI - bool - default y - source init/Kconfig menu Processor type and features @@ -395,6 +391,19 @@ XFree86 to initialize some video cards via BIOS. Disabling this option saves about 6k. +config DMI + default y + bool Enable DMI support if EMBEDDED + depends on X86 + help + This enables support for processing the Desktop Management + Interface structures present in most modern BIOSes. If you are + building a kernel for an older Pentium, 486, or 386 system and + memory is tight, you can disable this to help reduce the size + of your kernel by about 6K. + + If unsure, say Y + config TOSHIBA tristate Toshiba Laptop support ---help--- diff -u -r linux-2.6.22.7-old/arch/i386/kernel/acpi/boot.c linux-2.6.22.7/arch/i386/kernel/acpi/boot.c --- linux-2.6.22.7-old/arch/i386/kernel/acpi/boot.c 2007-09-21 22:38:23.0 + +++ linux-2.6.22.7/arch/i386/kernel/acpi/boot.c 2007-09-23 19:37:12.0 + @@ -891,6 +891,7 @@ return 0; } +#ifdef CONFIG_DMI static int __init dmi_disable_acpi(struct dmi_system_id *d) { if (!acpi_force) { @@ -1097,6 +1098,7 @@ }, {} }; +#endif /* CONFIG_DMI */ #endif /* __i386__ */ @@ -1127,7 +1129,7 @@ { int error; -#ifdef __i386__ +#if defined(__i386__) defined(CONFIG_DMI) dmi_check_system(acpi_dmi_table); #endif diff -u -r linux-2.6.22.7-old/arch/i386/kernel/acpi/sleep.c linux-2.6.22.7/arch/i386/kernel/acpi/sleep.c --- linux-2.6.22.7-old/arch/i386/kernel/acpi/sleep.c2007-09-21 22:38:23.0 + +++ linux-2.6.22.7/arch/i386/kernel/acpi/sleep.c2007-09-23 19:36:07.0 + @@ -86,6 +86,7 @@ return 0; } +#ifdef CONFIG_DMI static __initdata struct dmi_system_id acpisleep_dmi_table[] = { { /* Reset video mode after returning from ACPI S3 sleep */ .callback = reset_videomode_after_s3, @@ -104,3 +105,5 @@ } core_initcall(acpisleep_dmi_init); +#endif + diff -u -r linux-2.6.22.7-old/arch/i386/kernel/setup.c linux-2.6.22.7/arch/i386/kernel/setup.c --- linux-2.6.22.7-old/arch/i386/kernel/setup.c 2007-09-21 22:38:23.0 + +++ linux-2.6.22.7/arch/i386/kernel/setup.c 2007-09-23 19:30:59.0 + @@ -611,7 +611,9 @@ * NOTE: at this point the bootmem allocator is fully available. */ +#ifdef CONFIG_DMI dmi_scan_machine(); +#endif #ifdef CONFIG_X86_GENERICARCH generic_apic_probe(); diff -u -r linux-2.6.22.7-old/arch/i386/kernel/tsc.c linux-2.6.22.7/arch/i386/kernel/tsc.c --- linux-2.6.22.7-old/arch/i386/kernel/tsc.c 2007-09-21 22:38:23.0 + +++ linux-2.6.22.7/arch/i386/kernel/tsc.c 2007-09-23 19:36:37.0 + @@ -290,6 +290,7 @@ } EXPORT_SYMBOL_GPL(mark_tsc_unstable); +#ifdef CONFIG_DMI static int __init dmi_mark_tsc_unstable(struct dmi_system_id *d) { printk(KERN_NOTICE %s detected: marking TSC unstable.\n, @@ -310,6 +311,7 @@ }, {} }; +#endif /* * Make an educated guess if the TSC is trustworthy and synchronized @@ -369,8 +371,10 @@ set_cyc2ns_scale(cpu_khz); use_tsc_delay(); +#ifdef CONFIG_DMI /* Check and install the TSC