On Thu, 21 Feb 2002, Dave Kleikamp wrote:
> > The patch to jfs_imap.c may well not be correct - without
> > it I get very odd asm errors in include/linux/rwsem.h - but I don't
> > understand why it works.
>
> Can you send me the asm errors? I don't get any on i386, and I'd like
> to understand why the change is needed.
>
gcc -D__KERNEL__ -I/jfs/src/oakley/linux-2.5.5/include -nostdinc -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
-march=i686 -DMODULE -D_JFS_4K -DKBUILD_BASENAME=jfs_imap -c -o
jfs_imap.o jfs_imap.c
jfs_imap.c: In function `diAlloc':
/jfs/src/oakley/linux-2.5.5/include/asm/rwsem.h:152: inconsistent operand
constraints in an `asm'
The relevant bit of rwsem.h is:
...
/*
* unlock after reading
*/
static inline void __up_read(struct rw_semaphore *sem)
{
__s32 tmp = -RWSEM_ACTIVE_READ_BIAS;
__asm__ __volatile__(
"# beginning __up_read\n\t"
LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtracts 1, returns
the old\ value */
...
Which gets included everywhere we do an IREAD_UNLOCK. Only one of them
causes the error (the one my patch moved) and I can't for the life of me
see why that one is any different from any of the others.
As I say, the patch could well be bogus.
--
Mike Ricketts <[EMAIL PROTECTED]> http://www.earth.li/~mike/
Only a fool has no doubts.
_______________________________________________
Jfs-discussion mailing list
[EMAIL PROTECTED]
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/jfs-discussion