
Hi Daniel,
On 07.08.2018 16:51, Daniel Schwierzeck wrote:
2018-08-06 17:11 GMT+02:00 Stefan Roese sr@denx.de:
This is needed for the UBIFS support. The file is a copy of arch/xtensa/include/asm/atomic.h
could you try to import this file from Linux MIPS? Then we would have optimized functions.
Hmmm, looking at this file and the necessary headers that are not present in U-Boot right now, this seems a bit too much in my taste. Especially since U-Boot is not an OS and does not seed to support all kind of protection against other threads / CPUs.
Other way would be to import include/asm-generic/atomic.h from Linux so that all architectures in U-Boot could at least use a generic version.
I also took a quick glance at this and moving away from the asm/atomic.h inclusion in U-Boot seems quite intrusive right now. I would prefer to stay with this "simple" implementation for MIPS and perhaps move to using this one (or a similar one) at a later time, not being in the scope of this MIPS SoC addition.
What do you think? Would this be acceptable?
Thanks, Stefan