* [Fwd: Re: hda: lost interrupt starting with 2.6.8]
@ 2005-03-13 7:49 Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2005-03-13 7:49 UTC (permalink / raw)
To: linuxppc-dev list
-------- Forwarded Message --------
From: Vince Weaver <vince@deater.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: debian-powerpc@lists.debian.org <debian-powerpc@lists.debian.org>
Subject: Re: hda: lost interrupt starting with 2.6.8
Date: Sun, 13 Mar 2005 02:46:37 -0500 (EST)
> Can you tell me what is the value of CONFIG_NR_CPUS in your .config,
> also, is this file including include/linux/threads.h before
> include/linux/cpumask.h, and finally, send me privately the resulting
> binary vmlinux.
There is no CONFIG_NR_CPUS in my .config. Is that a problem? My tree is
a 2.6.4 tree that was patched incrementally, with "make oldconfig" run at
each release.
With the following patch I've managed to get 2.6.11 to boot on my
iBook2... do you still want a copy of a broken vmlinux?
Vince
--- linux/arch/ppc/syslib/open_pic.c.2.6.11 2005-03-13 01:57:00.000000000 -0500
+++ linux/arch/ppc/syslib/open_pic.c 2005-03-13 01:58:17.000000000 -0500
@@ -313,6 +313,7 @@
u_int t, i;
u_int timerfreq;
const char *version;
+ cpumask_t cpu0=CPU_MASK_CPU0;
if (!OpenPIC_Addr) {
printk("No OpenPIC found !\n");
@@ -405,7 +406,7 @@
openpic_initirq(i, 8, i+offset, (sense & IRQ_POLARITY_MASK),
(sense & IRQ_SENSE_MASK));
/* Processor 0 */
- openpic_mapirq(i, CPU_MASK_CPU0, CPU_MASK_NONE);
+ openpic_mapirq(i, cpu0, CPU_MASK_NONE);
}
/* Init descriptors */
--
Benjamin Herrenschmidt <benh@kernel.crashing.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Fwd: Re: hda: lost interrupt starting with 2.6.8]
@ 2005-03-13 6:47 Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2005-03-13 6:47 UTC (permalink / raw)
To: linuxppc-dev list
-------- Forwarded Message --------
From: Vince Weaver <vince@deater.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: debian-powerpc@lists.debian.org <debian-powerpc@lists.debian.org>
Subject: Re: hda: lost interrupt starting with 2.6.8
Date: Sun, 13 Mar 2005 00:18:38 -0500 (EST)
OK, I've spent most of the day making my poor iBook compile kernels and
I've tracked down the error. I can't seem to figure out why it would
happen on my machine and no one elses, at least unless it's a compiler
issue (I am using gcc 3.2.2).
Somewhere between 2.6.8-rc1 and 2.6.8-rc2 interrupts just stop getting
delivered.
I tracked it down to this patch to linux/arch/ppc/syslib/open_pic.c :
/*
* Map an interrupt source to one or more CPUs
*/
-static void openpic_mapirq(u_int irq, u_int physmask, u_int keepmask)
+static void openpic_mapirq(u_int irq, cpumask_t physmask, cpumask_t keepmask)
{
if (ISR[irq] == 0)
return;
- if (keepmask != 0)
- physmask |= openpic_read(&ISR[irq]->Destination) &
keepmask;
- openpic_write(&ISR[irq]->Destination, physmask);
+ if (!cpus_empty(keepmask)) {
+ cpumask_t irqdest = { .bits[0] =
openpic_read(&ISR[irq]->Destination) };
+ cpus_and(irqdest, irqdest, keepmask);
+ cpus_or(physmask, physmask, irqdest);
+ }
+ openpic_write(&ISR[irq]->Destination, cpus_addr(physmask)[0]);
}
And this one:
- openpic_mapirq(i, 1<<0, 0);
+ openpic_mapirq(i, CPU_MASK_CPU0, CPU_MASK_NONE);
Using printk's, I can see before the change I properly was writing "1" as
the second argument to openpic_write, but afterwards it was 0.
It seems as though for some reason CPU_MASK_CPU0 is 0 on my kernel, rather
than just a 1.
By patching the kernel to force it to write a 1 in openpic_write the
kernel runs fine...
So, any ideas? I'll be glad to try out anything else if you'd like me to.
Vince
--
Benjamin Herrenschmidt <benh@kernel.crashing.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-13 7:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-13 7:49 [Fwd: Re: hda: lost interrupt starting with 2.6.8] Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2005-03-13 6:47 Benjamin Herrenschmidt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.