Re: [PATCH] Patches for tiny 386 kernels, again. Linux kernel 2.6.22.7
On Mon, Oct 01, 2007 at 10:28:30AM -0400, Bill Davidsen wrote: > Lennart Sorensen wrote: > >On Fri, Sep 28, 2007 at 05:24:20PM -0400, Bill Davidsen wrote: > > > >>I'll offer this suggestion, knowing it may piss you off, given the > >>difficulty of preserving whitespace on *many* mailers without using > >>attachments, and given that attachments can be saved easily without > >>prying them out of the message, why don't you (one person) switch to a > >>capable mail agent, if only for patches, instead of trying to teach many > >>people to jump through hoops to avoid whitespace issues? > >> > >>Not criticizing, just seems easier for everybody for you to avoid > >>teaching people things they don't find useful elsewhere, or getting > >>discouraged and not bothering. > >> > > > >Ehm, so you want people to save the patch, then when replying they > >should load the patch into their (much better) mail client where they > >can comment on the patch? That is the reason the patch should be > >inline. People need to comment on it just as they would comment on any > >other plain text email. > > > > And in a perfect world everyone would have a mail client which made that > easy, no one would be force by company policy or other circumstances to > use a client which didn't work the way you think it should, no company > or ISP would filter and mangle outgoing mail, and all vendors would > understand that pristine patches are more important that all that stuff > they do to make business communications look reasonable. > > In my world people send me attachments so they don't get mangled, and if > I need to quote them I know how to do so. > >Well that and some people use git to import patches from the email in a > >mostly automated way which also expects them to have the info at top > >with signed-off and then the patch, which attachments also screw up. > > > >So yes there are good reasons for getting a non broken mail client when > >sending patches to lkml. > > > > And reading them, many show attached text at the end of the message and > make turning it into inline text simple. Hey, if the poster knows his mail client is broken, nothing prevents him from attaching the patches (so that they don't get mangled) and at the same time inline them for an easy review. People who review patches won't bother about spaces or tabs when you indicate to them from the beginning that the patch may have been mangled. Willy - 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
Lennart Sorensen wrote: On Fri, Sep 28, 2007 at 05:24:20PM -0400, Bill Davidsen wrote: I'll offer this suggestion, knowing it may piss you off, given the difficulty of preserving whitespace on *many* mailers without using attachments, and given that attachments can be saved easily without prying them out of the message, why don't you (one person) switch to a capable mail agent, if only for patches, instead of trying to teach many people to jump through hoops to avoid whitespace issues? Not criticizing, just seems easier for everybody for you to avoid teaching people things they don't find useful elsewhere, or getting discouraged and not bothering. Ehm, so you want people to save the patch, then when replying they should load the patch into their (much better) mail client where they can comment on the patch? That is the reason the patch should be inline. People need to comment on it just as they would comment on any other plain text email. And in a perfect world everyone would have a mail client which made that easy, no one would be force by company policy or other circumstances to use a client which didn't work the way you think it should, no company or ISP would filter and mangle outgoing mail, and all vendors would understand that pristine patches are more important that all that stuff they do to make business communications look reasonable. In my world people send me attachments so they don't get mangled, and if I need to quote them I know how to do so. Well that and some people use git to import patches from the email in a mostly automated way which also expects them to have the info at top with signed-off and then the patch, which attachments also screw up. So yes there are good reasons for getting a non broken mail client when sending patches to lkml. And reading them, many show attached text at the end of the message and make turning it into inline text simple. -- Bill Davidsen <[EMAIL PROTECTED]> "We have more to fear from the bungling of the incompetent than from the machinations of the wicked." - from Slashdot - 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
On Fri, Sep 28, 2007 at 05:24:20PM -0400, Bill Davidsen wrote: > I'll offer this suggestion, knowing it may piss you off, given the > difficulty of preserving whitespace on *many* mailers without using > attachments, and given that attachments can be saved easily without > prying them out of the message, why don't you (one person) switch to a > capable mail agent, if only for patches, instead of trying to teach many > people to jump through hoops to avoid whitespace issues? > > Not criticizing, just seems easier for everybody for you to avoid > teaching people things they don't find useful elsewhere, or getting > discouraged and not bothering. Ehm, so you want people to save the patch, then when replying they should load the patch into their (much better) mail client where they can comment on the patch? That is the reason the patch should be inline. People need to comment on it just as they would comment on any other plain text email. Well that and some people use git to import patches from the email in a mostly automated way which also expects them to have the info at top with signed-off and then the patch, which attachments also screw up. So yes there are good reasons for getting a non broken mail client when sending patches to lkml. -- Len Sorensen - 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
On Fri, Sep 28, 2007 at 05:24:20PM -0400, Bill Davidsen wrote: I'll offer this suggestion, knowing it may piss you off, given the difficulty of preserving whitespace on *many* mailers without using attachments, and given that attachments can be saved easily without prying them out of the message, why don't you (one person) switch to a capable mail agent, if only for patches, instead of trying to teach many people to jump through hoops to avoid whitespace issues? Not criticizing, just seems easier for everybody for you to avoid teaching people things they don't find useful elsewhere, or getting discouraged and not bothering. Ehm, so you want people to save the patch, then when replying they should load the patch into their (much better) mail client where they can comment on the patch? That is the reason the patch should be inline. People need to comment on it just as they would comment on any other plain text email. Well that and some people use git to import patches from the email in a mostly automated way which also expects them to have the info at top with signed-off and then the patch, which attachments also screw up. So yes there are good reasons for getting a non broken mail client when sending patches to lkml. -- Len Sorensen - 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
Lennart Sorensen wrote: On Fri, Sep 28, 2007 at 05:24:20PM -0400, Bill Davidsen wrote: I'll offer this suggestion, knowing it may piss you off, given the difficulty of preserving whitespace on *many* mailers without using attachments, and given that attachments can be saved easily without prying them out of the message, why don't you (one person) switch to a capable mail agent, if only for patches, instead of trying to teach many people to jump through hoops to avoid whitespace issues? Not criticizing, just seems easier for everybody for you to avoid teaching people things they don't find useful elsewhere, or getting discouraged and not bothering. Ehm, so you want people to save the patch, then when replying they should load the patch into their (much better) mail client where they can comment on the patch? That is the reason the patch should be inline. People need to comment on it just as they would comment on any other plain text email. And in a perfect world everyone would have a mail client which made that easy, no one would be force by company policy or other circumstances to use a client which didn't work the way you think it should, no company or ISP would filter and mangle outgoing mail, and all vendors would understand that pristine patches are more important that all that stuff they do to make business communications look reasonable. In my world people send me attachments so they don't get mangled, and if I need to quote them I know how to do so. Well that and some people use git to import patches from the email in a mostly automated way which also expects them to have the info at top with signed-off and then the patch, which attachments also screw up. So yes there are good reasons for getting a non broken mail client when sending patches to lkml. And reading them, many show attached text at the end of the message and make turning it into inline text simple. -- Bill Davidsen [EMAIL PROTECTED] We have more to fear from the bungling of the incompetent than from the machinations of the wicked. - from Slashdot - 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
On Mon, Oct 01, 2007 at 10:28:30AM -0400, Bill Davidsen wrote: Lennart Sorensen wrote: On Fri, Sep 28, 2007 at 05:24:20PM -0400, Bill Davidsen wrote: I'll offer this suggestion, knowing it may piss you off, given the difficulty of preserving whitespace on *many* mailers without using attachments, and given that attachments can be saved easily without prying them out of the message, why don't you (one person) switch to a capable mail agent, if only for patches, instead of trying to teach many people to jump through hoops to avoid whitespace issues? Not criticizing, just seems easier for everybody for you to avoid teaching people things they don't find useful elsewhere, or getting discouraged and not bothering. Ehm, so you want people to save the patch, then when replying they should load the patch into their (much better) mail client where they can comment on the patch? That is the reason the patch should be inline. People need to comment on it just as they would comment on any other plain text email. And in a perfect world everyone would have a mail client which made that easy, no one would be force by company policy or other circumstances to use a client which didn't work the way you think it should, no company or ISP would filter and mangle outgoing mail, and all vendors would understand that pristine patches are more important that all that stuff they do to make business communications look reasonable. In my world people send me attachments so they don't get mangled, and if I need to quote them I know how to do so. Well that and some people use git to import patches from the email in a mostly automated way which also expects them to have the info at top with signed-off and then the patch, which attachments also screw up. So yes there are good reasons for getting a non broken mail client when sending patches to lkml. And reading them, many show attached text at the end of the message and make turning it into inline text simple. Hey, if the poster knows his mail client is broken, nothing prevents him from attaching the patches (so that they don't get mangled) and at the same time inline them for an easy review. People who review patches won't bother about spaces or tabs when you indicate to them from the beginning that the patch may have been mangled. Willy - 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
On Fri, 28 Sep 2007 17:24:20 -0400 Bill Davidsen wrote: > Randy Dunlap wrote: > > > This seems reasonable, so I tried to use it. Here are the results > > and comments and meta-comments. > > > > > > 1. Please forcibly wrap text lines in mail body at around column 70-72. > > > > 2. Put patches inline in the mail body, not as attachments. > > > I'll offer this suggestion, knowing it may piss you off, given the > difficulty of preserving whitespace on *many* mailers without using > attachments, and given that attachments can be saved easily without > prying them out of the message, why don't you (one person) switch to a > capable mail agent, if only for patches, instead of trying to teach many > people to jump through hoops to avoid whitespace issues? Is "you" referring to me? You didn't piss me off. I don't even understand what you are talking about. BTW, lots of us have capable mail clients. > Not criticizing, just seems easier for everybody for you to avoid > teaching people things they don't find useful elsewhere, or getting > discouraged and not bothering. (again, if "you" are referring to me:) I generally try to help people. Another option is just to give them no feedback and drop their patches. I think that's not useful or helpful at all. --- ~Randy Phaedrus says that Quality is about caring. - 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
Randy Dunlap wrote: This seems reasonable, so I tried to use it. Here are the results and comments and meta-comments. 1. Please forcibly wrap text lines in mail body at around column 70-72. 2. Put patches inline in the mail body, not as attachments. I'll offer this suggestion, knowing it may piss you off, given the difficulty of preserving whitespace on *many* mailers without using attachments, and given that attachments can be saved easily without prying them out of the message, why don't you (one person) switch to a capable mail agent, if only for patches, instead of trying to teach many people to jump through hoops to avoid whitespace issues? Not criticizing, just seems easier for everybody for you to avoid teaching people things they don't find useful elsewhere, or getting discouraged and not bothering. -- Bill Davidsen <[EMAIL PROTECTED]> "We have more to fear from the bungling of the incompetent than from the machinations of the wicked." - from Slashdot - 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
Randy Dunlap wrote: This seems reasonable, so I tried to use it. Here are the results and comments and meta-comments. 1. Please forcibly wrap text lines in mail body at around column 70-72. 2. Put patches inline in the mail body, not as attachments. I'll offer this suggestion, knowing it may piss you off, given the difficulty of preserving whitespace on *many* mailers without using attachments, and given that attachments can be saved easily without prying them out of the message, why don't you (one person) switch to a capable mail agent, if only for patches, instead of trying to teach many people to jump through hoops to avoid whitespace issues? Not criticizing, just seems easier for everybody for you to avoid teaching people things they don't find useful elsewhere, or getting discouraged and not bothering. -- Bill Davidsen [EMAIL PROTECTED] We have more to fear from the bungling of the incompetent than from the machinations of the wicked. - from Slashdot - 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
On Fri, 28 Sep 2007 17:24:20 -0400 Bill Davidsen wrote: Randy Dunlap wrote: This seems reasonable, so I tried to use it. Here are the results and comments and meta-comments. 1. Please forcibly wrap text lines in mail body at around column 70-72. 2. Put patches inline in the mail body, not as attachments. I'll offer this suggestion, knowing it may piss you off, given the difficulty of preserving whitespace on *many* mailers without using attachments, and given that attachments can be saved easily without prying them out of the message, why don't you (one person) switch to a capable mail agent, if only for patches, instead of trying to teach many people to jump through hoops to avoid whitespace issues? Is you referring to me? You didn't piss me off. I don't even understand what you are talking about. BTW, lots of us have capable mail clients. Not criticizing, just seems easier for everybody for you to avoid teaching people things they don't find useful elsewhere, or getting discouraged and not bothering. (again, if you are referring to me:) I generally try to help people. Another option is just to give them no feedback and drop their patches. I think that's not useful or helpful at all. --- ~Randy Phaedrus says that Quality is about caring. - 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/
Re: [PATCH] Patches for tiny 386 kernels, again. Linux kernel 2.6.22.7
Jonathan Campbell wrote: Sorry about that. That's why I always send as attachments. Do you have similar problems when using Mozilla Thunderbird? tbird works when following the instructions at http://mbligh.org/linuxdocs/Email/Clients/Thunderbird or (simpler) use an External Editor plugin. And have you checked System.map to verify the DMI functions aren't there? Nope. I expect(ed) you to do that, i.e., make sure that the patch does that the description says that it does. On Wed, 26 Sep 2007 11:42:16 -0700 Jonathan Campbell wrote: 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. 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). -- ~Randy Phaedrus says that Quality is about caring. - 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
On Wed, 26 Sep 2007 11:42:16 -0700 Jonathan Campbell wrote: > 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. 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). > diff -u -r linux-2.6.23-rc8-old/init/Kconfig linux-2.6.23-rc8/init/Kconfig > --- linux-2.6.23-rc8-old/init/Kconfig2007-09-21 22:38:23.0 + > +++ linux-2.6.23-rc8/init/Kconfig2007-09-26 00:03:05.0 + > @@ -542,6 +542,18 @@ >on EMBEDDED systems. /proc/vmstat will only show page counts >if VM event counters are disabled. > > +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. > + This is in the General setup menu. How about putting it into the EMBEDDED menu instead? [Configure standard kernel features (for small systems)] > config SLUB_DEBUG > default y > bool "Enable SLUB debugging support" if EMBEDDED There are still several build warnings that need attention: drivers/acpi/sleep/main.c:223: warning: 'acpisleep_dmi_table' defined but not used drivers/pnp/pnpbios/core.c:509: warning: 'pnpbios_dmi_table' defined but not used arch/i386/pci/irq.c:1035: warning: 'pciirq_dmi_table' defined but not used arch/i386/pci/common.c:148: warning: 'pciprobe_dmi_table' defined but not used +#endif // CONFIG_DMI Use /* ... */ style comments instead of // comments. --- ~Randy Phaedrus says that Quality is about caring. - 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
On Wed, 26 Sep 2007 11:42:16 -0700 Jonathan Campbell wrote: > 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. This patch is horribly whitespace-damaged and does not apply to 2.6.23-rc8 as is: Reversed (or previously applied) patch detected! Assume -R? [n] n Apply anyway? [n] 1 out of 1 hunk ignored -- saving rejects to file arch/i386/Kconfig.rej 1 out of 2 hunks FAILED -- saving rejects to file arch/i386/kernel/acpi/boot.c.rej 1 out of 1 hunk FAILED -- saving rejects to file drivers/acpi/Kconfig.rej 1 out of 1 hunk FAILED -- saving rejects to file drivers/acpi/blacklist.c.rej patch: malformed patch at line 233: */ Please send it to yourself and make sure that you can apply it before sending it to the mailing list. --- ~Randy Phaedrus says that Quality is about caring. - 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
On Wed, 26 Sep 2007 11:42:16 -0700 Jonathan Campbell wrote: 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. This patch is horribly whitespace-damaged and does not apply to 2.6.23-rc8 as is: Reversed (or previously applied) patch detected! Assume -R? [n] n Apply anyway? [n] 1 out of 1 hunk ignored -- saving rejects to file arch/i386/Kconfig.rej 1 out of 2 hunks FAILED -- saving rejects to file arch/i386/kernel/acpi/boot.c.rej 1 out of 1 hunk FAILED -- saving rejects to file drivers/acpi/Kconfig.rej 1 out of 1 hunk FAILED -- saving rejects to file drivers/acpi/blacklist.c.rej patch: malformed patch at line 233: */ Please send it to yourself and make sure that you can apply it before sending it to the mailing list. --- ~Randy Phaedrus says that Quality is about caring. - 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
On Wed, 26 Sep 2007 11:42:16 -0700 Jonathan Campbell wrote: 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. 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). diff -u -r linux-2.6.23-rc8-old/init/Kconfig linux-2.6.23-rc8/init/Kconfig --- linux-2.6.23-rc8-old/init/Kconfig2007-09-21 22:38:23.0 + +++ linux-2.6.23-rc8/init/Kconfig2007-09-26 00:03:05.0 + @@ -542,6 +542,18 @@ on EMBEDDED systems. /proc/vmstat will only show page counts if VM event counters are disabled. +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. + This is in the General setup menu. How about putting it into the EMBEDDED menu instead? [Configure standard kernel features (for small systems)] config SLUB_DEBUG default y bool Enable SLUB debugging support if EMBEDDED There are still several build warnings that need attention: drivers/acpi/sleep/main.c:223: warning: 'acpisleep_dmi_table' defined but not used drivers/pnp/pnpbios/core.c:509: warning: 'pnpbios_dmi_table' defined but not used arch/i386/pci/irq.c:1035: warning: 'pciirq_dmi_table' defined but not used arch/i386/pci/common.c:148: warning: 'pciprobe_dmi_table' defined but not used +#endif // CONFIG_DMI Use /* ... */ style comments instead of // comments. --- ~Randy Phaedrus says that Quality is about caring. - 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
Jonathan Campbell wrote: Sorry about that. That's why I always send as attachments. Do you have similar problems when using Mozilla Thunderbird? tbird works when following the instructions at http://mbligh.org/linuxdocs/Email/Clients/Thunderbird or (simpler) use an External Editor plugin. And have you checked System.map to verify the DMI functions aren't there? Nope. I expect(ed) you to do that, i.e., make sure that the patch does that the description says that it does. On Wed, 26 Sep 2007 11:42:16 -0700 Jonathan Campbell wrote: 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. 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). -- ~Randy Phaedrus says that Quality is about caring. - 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/
Re: [PATCH] Patches for tiny 386 kernels, again. Linux kernel 2.6.22.7
On Sep 24 2007 15:09, Dave Jones wrote: > > > +#if defined(__i386__) && defined(CONFIG_DMI) > > dmi_check_system(acpi_dmi_table); > > #endif > > > > +#ifdef CONFIG_DMI > > dmi_scan_machine(); > > +#endif > > > > +#ifdef CONFIG_DMI > > /* Check and install the TSC clocksource */ > > dmi_check_system(bad_tsc_dmi_table); > > +#endif > > > > +#ifdef CONFIG_DMI > > dmi_check_system(acpi_osl_dmi_table); > > +#endif > >Instead of adding all these ifdefs, we could just define >add something along the lines of.. > >#ifndef CONFIG_DMI >#define dmi_check_system do {} while (0) >#endif > >in some header, which hides the uglies away from the code >whilst having the same net effect. Need #define dmi_check_system(x) otherwise you get /* Check and install the TSC clocksource */ do {} while (0) (bad_tsc_dmi_table); - 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
On Sep 24 2007 15:09, Dave Jones wrote: +#if defined(__i386__) defined(CONFIG_DMI) dmi_check_system(acpi_dmi_table); #endif +#ifdef CONFIG_DMI dmi_scan_machine(); +#endif +#ifdef CONFIG_DMI /* Check and install the TSC clocksource */ dmi_check_system(bad_tsc_dmi_table); +#endif +#ifdef CONFIG_DMI dmi_check_system(acpi_osl_dmi_table); +#endif Instead of adding all these ifdefs, we could just define add something along the lines of.. #ifndef CONFIG_DMI #define dmi_check_system do {} while (0) #endif in some header, which hides the uglies away from the code whilst having the same net effect. Need #define dmi_check_system(x) otherwise you get /* Check and install the TSC clocksource */ do {} while (0) (bad_tsc_dmi_table); - 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
On 267, 09 24, 2007 at 03:09:17PM -0400, Dave Jones wrote: > On Mon, Sep 24, 2007 at 01:51:17AM -0700, Jonathan Campbell wrote: > > > > +#if defined(__i386__) && defined(CONFIG_DMI) > >dmi_check_system(acpi_dmi_table); > > #endif > > > > +#ifdef CONFIG_DMI > >dmi_scan_machine(); > > +#endif > > > > +#ifdef CONFIG_DMI > >/* Check and install the TSC clocksource */ > >dmi_check_system(bad_tsc_dmi_table); > > +#endif > > > > +#ifdef CONFIG_DMI > >dmi_check_system(acpi_osl_dmi_table); > > +#endif > > Instead of adding all these ifdefs, we could just define > add something along the lines of.. > > #ifndef CONFIG_DMI > #define dmi_check_system do {} while (0) > #endif > > in some header, which hides the uglies away from the code > whilst having the same net effect. Let take a look at linux/dmi.h: #ifdef CONFIG_DMI extern int dmi_check_system(struct dmi_system_id *list); extern char * dmi_get_system_info(int field); extern struct dmi_device * dmi_find_device(int type, const char *name, struct dmi_device *from); extern void dmi_scan_machine(void); extern int dmi_get_year(int field); extern int dmi_name_in_vendors(char *str); #else static inline int dmi_check_system(struct dmi_system_id *list) { return 0; } static inline char * dmi_get_system_info(int field) { return NULL; } static inline struct dmi_device * dmi_find_device(int type, const char *name, struct dmi_device *from) { return NULL; } static inline int dmi_get_year(int year) { return 0; } static inline int dmi_name_in_vendors(char *s) { return 0; } #endif -- Andrey Panin| Linux and UNIX system administrator [EMAIL PROTECTED] | PGP key: wwwkeys.pgp.net signature.asc Description: Digital signature
Re: [PATCH] Patches for tiny 386 kernels, again. Linux kernel 2.6.22.7
On Mon, Sep 24, 2007 at 01:51:17AM -0700, Jonathan Campbell wrote: > +#if defined(__i386__) && defined(CONFIG_DMI) > dmi_check_system(acpi_dmi_table); > #endif > > +#ifdef CONFIG_DMI > dmi_scan_machine(); > +#endif > > +#ifdef CONFIG_DMI > /* Check and install the TSC clocksource */ > dmi_check_system(bad_tsc_dmi_table); > +#endif > > +#ifdef CONFIG_DMI > dmi_check_system(acpi_osl_dmi_table); > +#endif Instead of adding all these ifdefs, we could just define add something along the lines of.. #ifndef CONFIG_DMI #define dmi_check_system do {} while (0) #endif in some header, which hides the uglies away from the code whilst having the same net effect. Dave -- http://www.codemonkey.org.uk - 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
On Mon, 24 Sep 2007 01:51:17 -0700 Jonathan Campbell wrote: > 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. Regarding only the DMI-disable patch: > 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. This seems reasonable, so I tried to use it. Here are the results and comments and meta-comments. 1. Please forcibly wrap text lines in mail body at around column 70-72. 2. Put patches inline in the mail body, not as attachments. 3. Make patches against current mainline (e.g., 2.6.23-rc7), not against the stable tree. Mainline is where someone would end up applying them. 4. The DMI patch does not build against current mainline. It needs the additional patch below (at end of mail). 5. The Kconfig part of the DMI patch contains a trailing space. No brownie today. 6. The Kconfig entry for "config DMI" should not be listed under "Processor types and features". It should just go into the main EMBEDDED menu: menuconfig EMBEDDED bool "Configure standard kernel features (for small systems)" After all of these fixes, I can ack the patch. --- From: Randy Dunlap <[EMAIL PROTECTED]> Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]> --- drivers/acpi/thermal.c |2 ++ 1 file changed, 2 insertions(+) --- linux-2.6.23-rc7.orig/drivers/acpi/thermal.c +++ linux-2.6.23-rc7/drivers/acpi/thermal.c @@ -1440,7 +1440,9 @@ static int __init acpi_thermal_init(void { int result = 0; +#ifdef CONFIG_DMI dmi_check_system(thermal_dmi_table); +#endif /* CONFIG_DMI */ if (off) { printk(KERN_NOTICE "ACPI: thermal control disabled\n"); - 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
Re: [PATCH] Patches for tiny 386 kernels, again. Linux kernel 2.6.22.7
On Mon, 24 Sep 2007 01:51:17 -0700 Jonathan Campbell wrote: 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. Regarding only the DMI-disable patch: 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. This seems reasonable, so I tried to use it. Here are the results and comments and meta-comments. 1. Please forcibly wrap text lines in mail body at around column 70-72. 2. Put patches inline in the mail body, not as attachments. 3. Make patches against current mainline (e.g., 2.6.23-rc7), not against the stable tree. Mainline is where someone would end up applying them. 4. The DMI patch does not build against current mainline. It needs the additional patch below (at end of mail). 5. The Kconfig part of the DMI patch contains a trailing space. No brownie today. 6. The Kconfig entry for config DMI should not be listed under Processor types and features. It should just go into the main EMBEDDED menu: menuconfig EMBEDDED bool Configure standard kernel features (for small systems) After all of these fixes, I can ack the patch. --- From: Randy Dunlap [EMAIL PROTECTED] Signed-off-by: Randy Dunlap [EMAIL PROTECTED] --- drivers/acpi/thermal.c |2 ++ 1 file changed, 2 insertions(+) --- linux-2.6.23-rc7.orig/drivers/acpi/thermal.c +++ linux-2.6.23-rc7/drivers/acpi/thermal.c @@ -1440,7 +1440,9 @@ static int __init acpi_thermal_init(void { int result = 0; +#ifdef CONFIG_DMI dmi_check_system(thermal_dmi_table); +#endif /* CONFIG_DMI */ if (off) { printk(KERN_NOTICE ACPI: thermal control disabled\n); - 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
On Mon, Sep 24, 2007 at 01:51:17AM -0700, Jonathan Campbell wrote: +#if defined(__i386__) defined(CONFIG_DMI) dmi_check_system(acpi_dmi_table); #endif +#ifdef CONFIG_DMI dmi_scan_machine(); +#endif +#ifdef CONFIG_DMI /* Check and install the TSC clocksource */ dmi_check_system(bad_tsc_dmi_table); +#endif +#ifdef CONFIG_DMI dmi_check_system(acpi_osl_dmi_table); +#endif Instead of adding all these ifdefs, we could just define add something along the lines of.. #ifndef CONFIG_DMI #define dmi_check_system do {} while (0) #endif in some header, which hides the uglies away from the code whilst having the same net effect. Dave -- http://www.codemonkey.org.uk - 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
On 267, 09 24, 2007 at 03:09:17PM -0400, Dave Jones wrote: On Mon, Sep 24, 2007 at 01:51:17AM -0700, Jonathan Campbell wrote: +#if defined(__i386__) defined(CONFIG_DMI) dmi_check_system(acpi_dmi_table); #endif +#ifdef CONFIG_DMI dmi_scan_machine(); +#endif +#ifdef CONFIG_DMI /* Check and install the TSC clocksource */ dmi_check_system(bad_tsc_dmi_table); +#endif +#ifdef CONFIG_DMI dmi_check_system(acpi_osl_dmi_table); +#endif Instead of adding all these ifdefs, we could just define add something along the lines of.. #ifndef CONFIG_DMI #define dmi_check_system do {} while (0) #endif in some header, which hides the uglies away from the code whilst having the same net effect. Let take a look at linux/dmi.h: #ifdef CONFIG_DMI extern int dmi_check_system(struct dmi_system_id *list); extern char * dmi_get_system_info(int field); extern struct dmi_device * dmi_find_device(int type, const char *name, struct dmi_device *from); extern void dmi_scan_machine(void); extern int dmi_get_year(int field); extern int dmi_name_in_vendors(char *str); #else static inline int dmi_check_system(struct dmi_system_id *list) { return 0; } static inline char * dmi_get_system_info(int field) { return NULL; } static inline struct dmi_device * dmi_find_device(int type, const char *name, struct dmi_device *from) { return NULL; } static inline int dmi_get_year(int year) { return 0; } static inline int dmi_name_in_vendors(char *s) { return 0; } #endif -- Andrey Panin| Linux and UNIX system administrator [EMAIL PROTECTED] | PGP key: wwwkeys.pgp.net signature.asc Description: Digital signature