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.
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);
> +#endifInstead 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)
#endifin some header, which hides the uglies away from the code
whilst having the same net effect.Dave
Need #define dmi_check_system(x) otherwise you get
/* Check and install the TSC clocksource */
do {} while (0) (bad_tsc_dmi_table);
-
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 *nam=
e,
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
--=20
Andrey Panin | Linux and UNIX system administrator
pazke@donpac.ru | PGP key: wwwkeys.pgp.net
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 <randy.dunlap@oracle.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
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");
-
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 <davidsen@tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot
-
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
-
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
And reading them, many show attached text at the end of the message and
make turning it into inline text simple.--
Bill Davidsen <davidsen@tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot-
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
-
Is "you" referring to me? You didn't piss me off.
I don't even understand what you are talking about.(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.
-
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/Kconfig 2007-09-21
22:38:23.000000000 +0000
+++ linux-2.6.23-rc8/arch/i386/Kconfig 2007-09-26 00:01:48.000000000
+0000
@@ -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.c 2007-09-21
22:38:23.000000000 +0000
+++ linux-2.6.23-rc8/arch/i386/kernel/acpi/boot.c 2007-09-26
00:40:42.000000000 +0000
@@ -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.c 2007-09-21
22:38:23.000000000 +0000
+++ linux-2.6.23-rc8/arch/i386/kernel/acpi/sleep.c 2007-09-25
23:59:14.000000000 +0000
@@ -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_ini...
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.This is in the General setup menu. How about putting it into the
EMBEDDED menu instead? [Configure standard kernel features (forThere 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.
-
Sorry about that. That's the reason I send them as attachments.
-
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.
-
| Hiten Pandya | Re: up? (emacs docbook xml ide) |
| Martin Michlmayr | Network slowdown due to CFS |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| Christos Zoulas | Re: Boot device confusion |
| Manuel Bouyer | Re: NFSv3 bug |
| Anders Magnusson | Re: setsockopt() compat issue |
| Martin Husemann | Re: Compressed vnd handling tested successfully |
