Why not do:
#define LOCK "1: lock ; \n" \
".section .lock.init,\"a\"\n" \
".align 4\n"\
".long 1b\n"\
".previous\n"
Then you don't need the LOCK_ADDR macro, so most of atomic.h can be
left as is. The assembler doesn't seem to care that there's a section
change between the lock prefix and the instruction that it's locking.
Paul
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/