Hi Steve,

> 
> Also, what happens if you run with AtomicSimpleCPU, and with or without 
> a single level of caches?
I manually used the mutex_lock in glibc's  sysdeps/mach/alpha/machine-lock.h, 
the LL/SC worked fine with both  configurations. (L1 & L2  /  L1 only)

I am still trying to figure out how to configure the right build environment. I 
tried crosstool gcc-4.1.1-glibc-2.3.5-nptl.dat and 
gcc-3.4.5-glibc-2.3.5-tls.dat, but malloc just simply craches.  I'm diving into 
crosstool now. Maybe there are some configurations I need to tune to rebuild 
glibc and make malloc include the right header. I'm not sure whether crosstool 
really support nptl (at lease on their website, version 0.42 doesn't). 

FYI, I think there is a bug in glibc-2.3.5 sysdeps/mach/alpha/machine-lock.h
1: void
2: __spin_unlock (__spin_lock_t *__lock)
3: {
4:   __asm__ __volatile__ ("mb; stq $31, %0; mb"
5:  : "=m" (__lock));
6: }

according to the M5 trace, the lock isn't freed unless line 5 is changed to:
: "=m" (*__lock));

Jiayuan
_______________________________________________
m5-users mailing list
m5-users@m5sim.org
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to