Subject: Re: cpu_switch() bug?
To: None <,>
From: Tad Hunt <>
List: port-powerpc
Date: 02/19/2001 15:47:54
In message <>, you said:
;> I belive this is a bug in all of the existing netbsd-powerpc ports.
;I've been re-writing the higher level interrupt code from the prep port for
;another port I'm working on, and I've found some suspicious code there as
;well.  For example, interrupts are masked during all interrupt service
;routines, even for software interrupts.

We noticed that as well.

We've completely rewritten all of the spl code, because we have
hardware on the mpc8260 that allows us to do most of the work
(not the decrementer interrupt) in hardware.

;I wonder why your problem hasn't been noticed as some sort of mis-operation? 
;One would expect an in-appropriate lowering or raising of the interrupt mask
;level to cause some sort of problem somewhere.

I don't know that we were bad behavior because of the cpu_switch
bug, we were only looking at it because we got rid of lcsplx() when
we rewrote the spl code.

I am also trying to figure out why it was written in assembly
rather than C, and I (as yet) don't have a really good answer.  I
think the C compiler will output practically the same code, except
for the ``cntlzw'' instruction which is easy enough to either inline
asm (yuck), or make a two line function in locore.S