Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Why is __cpu_simple_lock_t an unsigned char?



Matt Thomas wrote:
>
> On Nov 5, 2008, at 11:21 PM, Heikki Krogerus wrote:
>
>> This probably is a silly quistion, I know, but how should the
>> ldrex/strex be
>> handled in the future? Our ARM1136JF-S does not seem to support
>> ldrexb/strexb
>> instructions.
>>
>> Thumb does not support the swp instruction.
>
> because armv4 and later have swpb (swap byte).
>

What is the benefit of using swpb over swp? Sorry to bother you again
with this. I'm trying to compile as many things in thumb mode as I can,
and the swp instruction is still preventing me from compiling quite a
few things. If the __cpu_simple_lock_t was 32-bit could the __swp() be
replaced with something like _lock_cas without the need to emulate
ldrexb/strexb instructions? I have not managed to to this yet.

I'm trying to use 32-bit __cpu_simple_lock_t and the kernel will crash
when pmap_bootstrap tryes to initialize the pmap cache. It stops when it
tryes to do TAILQ_INSERT_TAIL at the end of the pool_init function, and
I don't understand why?

- heikki



Home | Main Index | Thread Index | Old Index