lkml.org 
[lkml]   [2003]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subjectlinux-2.4.22_ioapic-affinity-fix_A0
From
Date
Marcelo, All,

In set_ioapic_affinity() we take a cpu mask which we normally pass into
the apic. However, on xapics in clustered physical mode (ie: x440s) we
need to convert this mask into a physical apicid before sending it to
the apic. If clustered_apic_mode is XAPIC, this patch selects the lowest
cpu in the mask and routes the interrupts there. This avoids
timedoubling and other interrupt misdirection seen on x440s after
playing with /proc/irq/x/smp_affinity.

Please apply.

thanks
-john


diff -Nru a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
--- a/arch/i386/kernel/io_apic.c Fri Aug 22 19:05:33 2003
+++ b/arch/i386/kernel/io_apic.c Fri Aug 22 19:05:33 2003
@@ -1365,6 +1365,13 @@
static void set_ioapic_affinity (unsigned int irq, unsigned long mask)
{
unsigned long flags;
+
+ /* pick a single cpu for clustered xapics */
+ if(clustered_apic_mode == CLUSTERED_APIC_XAPIC){
+ int cpu = ffs(mask)-1;
+ mask = cpu_to_physical_apicid(cpu);
+ }
+
/*
* Only the first 8 bits are valid.
*/


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.024 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site