From: Tear <tarrqt@yahoo.com>
To: mingo@redhat.com
Cc: akpm@linux-foundation.org, torvalds@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: [RFC][PATCH] IO-APIC blacklist
Date: Sat, 2 Jun 2007 07:10:58 -0700 (PDT) [thread overview]
Message-ID: <477357.96605.qm@web63602.mail.re1.yahoo.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2899 bytes --]
Hi,
I own a Dell OptiPlex GX240 which, when ACPI is disabled
but IO-APIC is enabled, shows very slow USB performance.
I thought that this could be related to IO-APIC and
tried to boot with "noapic" appended to the kernel
command line. This way the USB transfer speed returned
to normal values.
To make sure that noone else encounters a similar problem,
I have written a patch which includes an IO-APIC blacklist
and disables IO-APIC according to the blacklist.
I would like this patch to be merged into the main
tree. If there is any revision/correction that needs to
be done on the patch, please let me know.
I would appreciate any comments.
Thank you for your attention.
Regards,
- Tear
Note: The patch is appended and attached (in case
Yahoo wraps some lines.)
diff -u -r linux-2.6.21.3.orig/arch/i386/kernel/io_apic.c
linux-2.6.21.3/arch/i386/kernel/io_apic.c
--- linux-2.6.21.3.orig/arch/i386/kernel/io_apic.c 2007-06-01 19:01:35.000000000 +0000
+++ linux-2.6.21.3/arch/i386/kernel/io_apic.c 2007-06-01 21:00:46.000000000 +0000
@@ -35,6 +35,7 @@
#include <linux/msi.h>
#include <linux/htirq.h>
#include <linux/freezer.h>
+#include <linux/dmi.h>
#include <asm/io.h>
#include <asm/smp.h>
@@ -98,6 +99,30 @@
unsigned int data;
};
+static int __init disable_blacklisted_ioapic(struct dmi_system_id *d)
+{
+ printk(KERN_WARNING "%s detected... Disabling IO-APIC\n", d->ident);
+ skip_ioapic_setup = 1;
+ return(0);
+}
+
+static struct dmi_system_id __initdata ioapic_blacklist_dmi_table[] = {
+ {
+ .callback = disable_blacklisted_ioapic,
+ .ident = "Dell OptiPlex GX240",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex GX240"),
+ },
+ },
+ { }
+};
+
+void __init check_ioapic_blacklist(void) {
+ printk(KERN_INFO "Checking for IO-APIC blacklisted systems...\n");
+ dmi_check_system(ioapic_blacklist_dmi_table);
+}
+
static __attribute_const__ struct io_apic __iomem *io_apic_base(int idx)
{
return (void __iomem *) __fix_to_virt(FIX_IO_APIC_BASE_0 + idx)
diff -u -r linux-2.6.21.3.orig/arch/i386/kernel/setup.c linux-2.6.21.3/arch/i386/kernel/setup.c
--- linux-2.6.21.3.orig/arch/i386/kernel/setup.c 2007-06-01 19:01:35.000000000 +0000
+++ linux-2.6.21.3/arch/i386/kernel/setup.c 2007-06-01 21:04:01.000000000 +0000
@@ -124,6 +124,7 @@
#endif
extern void early_cpu_init(void);
+extern void check_ioapic_blacklist(void);
extern int root_mountflags;
unsigned long saved_videomode;
@@ -616,6 +617,11 @@
#ifdef CONFIG_X86_GENERICARCH
generic_apic_probe();
#endif
+
+#ifdef CONFIG_X86_IO_APIC
+ check_ioapic_blacklist();
+#endif
+
if (efi_enabled)
efi_map_memmap();
____________________________________________________________________________________
Sick sense of humor? Visit Yahoo! TV's
Comedy with an Edge to see what's on, when.
http://tv.yahoo.com/collections/222
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 1403027118-io_apic-patch.diff --]
[-- Type: text/x-patch; name="io_apic-patch.diff", Size: 1908 bytes --]
diff -u -r linux-2.6.21.3.orig/arch/i386/kernel/io_apic.c linux-2.6.21.3/arch/i386/kernel/io_apic.c
--- linux-2.6.21.3.orig/arch/i386/kernel/io_apic.c 2007-06-01 19:01:35.000000000 +0000
+++ linux-2.6.21.3/arch/i386/kernel/io_apic.c 2007-06-01 21:00:46.000000000 +0000
@@ -35,6 +35,7 @@
#include <linux/msi.h>
#include <linux/htirq.h>
#include <linux/freezer.h>
+#include <linux/dmi.h>
#include <asm/io.h>
#include <asm/smp.h>
@@ -98,6 +99,30 @@
unsigned int data;
};
+static int __init disable_blacklisted_ioapic(struct dmi_system_id *d)
+{
+ printk(KERN_WARNING "%s detected... Disabling IO-APIC\n", d->ident);
+ skip_ioapic_setup = 1;
+ return(0);
+}
+
+static struct dmi_system_id __initdata ioapic_blacklist_dmi_table[] = {
+ {
+ .callback = disable_blacklisted_ioapic,
+ .ident = "Dell OptiPlex GX240",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex GX240"),
+ },
+ },
+ { }
+};
+
+void __init check_ioapic_blacklist(void) {
+ printk(KERN_INFO "Checking for IO-APIC blacklisted systems...\n");
+ dmi_check_system(ioapic_blacklist_dmi_table);
+}
+
static __attribute_const__ struct io_apic __iomem *io_apic_base(int idx)
{
return (void __iomem *) __fix_to_virt(FIX_IO_APIC_BASE_0 + idx)
diff -u -r linux-2.6.21.3.orig/arch/i386/kernel/setup.c linux-2.6.21.3/arch/i386/kernel/setup.c
--- linux-2.6.21.3.orig/arch/i386/kernel/setup.c 2007-06-01 19:01:35.000000000 +0000
+++ linux-2.6.21.3/arch/i386/kernel/setup.c 2007-06-01 21:04:01.000000000 +0000
@@ -124,6 +124,7 @@
#endif
extern void early_cpu_init(void);
+extern void check_ioapic_blacklist(void);
extern int root_mountflags;
unsigned long saved_videomode;
@@ -616,6 +617,11 @@
#ifdef CONFIG_X86_GENERICARCH
generic_apic_probe();
#endif
+
+#ifdef CONFIG_X86_IO_APIC
+ check_ioapic_blacklist();
+#endif
+
if (efi_enabled)
efi_map_memmap();
next reply other threads:[~2007-06-02 14:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-02 14:10 Tear [this message]
2007-06-02 14:39 ` Heikki Orsila
2007-06-02 16:39 ` Linus Torvalds
2007-06-02 20:32 ` Tear
2007-06-02 21:28 ` Linus Torvalds
2007-06-02 22:54 ` Andrew Morton
2007-06-02 23:13 ` Len Brown
2007-06-02 23:33 ` Len Brown
2007-06-02 23:53 ` Tear
2007-06-03 4:16 ` Len Brown
2007-06-03 10:24 ` Tear
2007-06-03 11:25 ` Tear
2007-06-02 17:46 ` Len Brown
2007-06-02 20:39 ` Tear
2007-06-02 20:55 ` Linus Torvalds
2007-06-02 23:48 ` Tear
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=477357.96605.qm@web63602.mail.re1.yahoo.com \
--to=tarrqt@yahoo.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®