[parisc-linux] Progress - Update

Philipp Rumpf Philipp.H.Rumpf@mathe.stud.uni-erlangen.de
Tue, 30 Nov 1999 19:32:44 +0100


> I have found the cause of this panic.  The problem occurs when xchg
> is called with a pointer which is not aligned on a 16 byte boundary.
> The ldcws semaphore instruction is only defined when the address is
> aligned on a 16 byte boundary.  It is used when the value to exchange
> is 0.

> The macro xchg is used in quite a few places in what is nominally
> machine independent code.  Should we add __attribute__ ((aligned (16))
> to the definitions of all variables which exchange with 0?  Or, should
> we look for another solution?

The problem with all this is xchg needs to be atomic, so there is no easy
and obviously correct way to do it.  Probably the most feasible thing is
to use spin_lock_irqsave / spin_unlock_irqrestore on an array of spinlocks
indexed by a hash of the address - x86istic code expecting xchg() to be
fast is going to suck I'd guess.

	Philipp Rumpf