[parisc-linux] 2.4.20-pa27 64bits smp problem!
John David Anglin
dave@hiauly1.hia.nrc.ca
Tue, 25 Feb 2003 13:50:04 -0500 (EST)
> int main(int argc, char * * argv, char * * env) {
>
> spinlock_t MySpinLock __attribute__((__aligned__(64))) =SPIN_LOCK_UNLOCKED;
> rwlock_t MyRWLock __attribute__((__aligned__(64))) = RW_LOCK_UNLOCKED;
This does not work. The aligned attribute doesn't work for automatic
variables and never has. Structures allocated on the stack are allocated
with alignment BIGGEST_ALIGNMENT. This should be a FAQ.
BIGGEST_ALIGNMENT is 128 bits on the 64-bit ports. It is 64 on the 32-bit
port. It is 128 in debian gcc 3.0.4 but this broke the hpux ABI regarding
the placement of long doubles in structures. Thus, this change was
reverted the GCC CVS source.
Spinlocks on PA 2.0 machines don't need special alignment, although you
may want to keep them in separate cache lines.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)