All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linuxppc-dev list <linuxppc-dev@ozlabs.org>
Subject: [Fwd: Re: hda: lost interrupt starting with 2.6.8]
Date: Sun, 13 Mar 2005 17:47:09 +1100	[thread overview]
Message-ID: <1110696430.19810.105.camel@gaston> (raw)

-------- 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>

             reply	other threads:[~2005-03-13  6:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-13  6:47 Benjamin Herrenschmidt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-03-13  7:49 [Fwd: Re: hda: lost interrupt starting with 2.6.8] Benjamin Herrenschmidt

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=1110696430.19810.105.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.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 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.