Re: [RFC][PATCH 02/24] arc: Provide atomic_{or,xor,and}

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

 



On Fri, Jul 10, 2015 at 04:30:46AM +0000, Vineet Gupta wrote:
> 
> Since we are on the topic, the cmpxchg() loop in arch/arc/kernel/smp.c still
> irritates me.
> Do we need a new set of primitives to operate atomically on non atomic_t data or
> does that mean that the data *not* being atomic_t but requiring such semantics is
> the fundamental problem and thus needs to be converted first.

So if you look at the last patch, there's already a few sites that do
things like:

+       atomic_or(*mask, (atomic_t *)&flushcache_cpumask);

Which is of course ugly as hell, but does work.

Esp. inside arch code.

Now the 'problem' with cmpxchg/xchg, the instructions working on !atomic
data is:

  http://lkml.kernel.org/r/alpine.LRH.2.02.1406011342470.20831@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  http://lkml.kernel.org/r/20140606175316.GV13930@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

And note that includes some arc.

Adding more such primitives will only make it harder on those already
'broken' archs.
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux