[lkml]   [2001]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] __up_read and gcc-3.0
On 11 May 01 at 9:13, Tom Leete wrote:
> > __asm__ __volatile__(
> > "# beginning __up_read\n\t"
> > + " movl %2,%%edx\n\t"
> > LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtracts 1, returns the old value */
> > " js 2f\n\t" /* jump if the lock is being waited upon */
> > "1:\n\t"
> My solution to this was to relax +d(tmp) to +m(tmp). Posted a few days ago.
> I have larger problems with 2.4.5-pre1 and have not gone back to check what
> comes out. Being a product of pure reason (and not much of that), mine
> deserves suspicion.

Changing +d => +m could generate 'xadd (%%xyz),(%%eax)' which does not exist.
Maybe +r, but in this case do not forget to add push/pop %%edx around
call to rwsem_wake. Otherwise you can have some corruption if gcc decides
to use %edx for some local variable around __up_read.
Best regards,
Petr Vandrovec

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.021 / U:2.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site