[PATCH] um: "borrow" cmpxchg from x86 tree in UML

Anton Ivanov anton.ivanov at cambridgegreys.com
Fri Nov 13 12:50:18 EST 2020


On 13/11/2020 15:58, Johannes Berg wrote:
> On Fri, 2020-11-13 at 13:48 +0000, Anton Ivanov wrote:
>> I think that was it. Or to be more exact, I hope that was it.
>>
>> I went a few times through asm-generic and that looks like all the
>> bits which are worth implementing for a uniprocessor architecture as a
>> replacement for their generic equivalents.
> It seems that word-at-a-time.h with CONFIG_DCACHE_WORD_ACCESS might
> be worthwhile as well?

I tried it. It had some references to exception handling which are not 
present in UML so I dropped it for now.

We may get it to work, but it will take some effort. I think it also had 
alternatives in the assembly parts so that means similar problems to 
using x86 memcpy and x86 memmove.

>
> Also perhaps bug.h; there are a lot of BUG_ON/WARN_ON and similar
> things, and especially the _ONCE part looks better there?

There are some advantages there, but the difference between x86 and 
generic does not look to be as drastic as atomics or futex.

We can pull it in.

>
> ftrace is probably not worth the effort ...

Concur.

> johannes
>
>
Brgds,

-- 
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/




More information about the linux-um mailing list