* bug in m8260_mask_and_ack() in Linux/PPC 2.4.x ??
@ 2000-10-25 3:32 Murray Jensen
2000-10-25 18:12 ` Dan Malek
0 siblings, 1 reply; 3+ messages in thread
From: Murray Jensen @ 2000-10-25 3:32 UTC (permalink / raw)
To: linuxppc-embedded
Either I'm going crazy, or this code in m8260_mask_and_ack(), in
arch/ppc/kernel/ppc8260_pic.c from the 2.4.x Linux/PPC source, is wrong...
--- arch/ppc/kernel/ppc8260_pic.c-dist Wed Oct 25 12:30:37 2000
+++ arch/ppc/kernel/ppc8260_pic.c Wed Oct 25 13:36:29 2000
@@ -79,7 +79,7 @@
sipnr = &(immr->im_intctl.ic_sipnrh);
ppc_cached_irq_mask[word] &= ~(1 << (31 - bit));
simr[word] = ppc_cached_irq_mask[word];
- sipnr[word] = 1 << bit;
+ sipnr[word] = 1 << (31 - bit);
}
struct hw_interrupt_type ppc8260_pic = {
In my MPC8260 User Manual, the SIMR_[HL] and SIPNR_[HL] have the same
bits in the same positions. Unless this has been changed in errata or
something, the 1 << bit is wrong, it should be 1 << (31 - bit). It seems
like a big obvious bug - maybe m8260_mask_and_ack() is never used...
Could someone confirm this please? Cheers!
Murray...
--
Murray Jensen, CSIRO Manufacturing Sci & Tech, Phone: +61 3 9662 7763
Locked Bag No. 9, Preston, Vic, 3072, Australia. Fax: +61 3 9662 7853
Internet: Murray.Jensen@cmst.csiro.au (old address was mjj@mlb.dmt.csiro.au)
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bug in m8260_mask_and_ack() in Linux/PPC 2.4.x ??
2000-10-25 3:32 bug in m8260_mask_and_ack() in Linux/PPC 2.4.x ?? Murray Jensen
@ 2000-10-25 18:12 ` Dan Malek
2000-10-25 19:22 ` Scott Iveland
0 siblings, 1 reply; 3+ messages in thread
From: Dan Malek @ 2000-10-25 18:12 UTC (permalink / raw)
To: Murray Jensen; +Cc: linuxppc-embedded
Murray Jensen wrote:
>
> Either I'm going crazy, or this code in m8260_mask_and_ack(),
Yes, it looks wrong to me, too. Now, how in the hell does it work :-)?
I will immediately fix it in the kernel sources, and once I get 8260
to build properly again I will test it......
Thanks.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bug in m8260_mask_and_ack() in Linux/PPC 2.4.x ??
2000-10-25 18:12 ` Dan Malek
@ 2000-10-25 19:22 ` Scott Iveland
0 siblings, 0 replies; 3+ messages in thread
From: Scott Iveland @ 2000-10-25 19:22 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: Dan Malek
Dan Malek wrote:
> Murray Jensen wrote:
> >
> > Either I'm going crazy, or this code in m8260_mask_and_ack(),
>
> Yes, it looks wrong to me, too. Now, how in the hell does it work :-)?
> I will immediately fix it in the kernel sources, and once I get 8260
> to build properly again I will test it......
>
> Thanks.
>
> -- Dan
>
We found this bug causes problems when you need to use interrupts from an IRQ
line.
Most internal 8260 devices clear this bit when the interrupt is cleared in the
parameter
ram for that device(e.g. FCCE,FCCM). That is why it worked with the FCC,SMC
etc.
We found and fixed this when we tried to use an IRQ line into the 8260. If you
change it as indicated, it does work properly for things like the external IRQ
line interrupts.
Scott
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-10-25 19:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-10-25 3:32 bug in m8260_mask_and_ack() in Linux/PPC 2.4.x ?? Murray Jensen
2000-10-25 18:12 ` Dan Malek
2000-10-25 19:22 ` Scott Iveland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).