Thread (99 messages) 99 messages, 9 authors, 2012-08-06

[Xen-devel] [PATCH 04/24] xen/arm: sync_bitops

From: Stefano Stabellini <hidden>
Date: 2012-08-01 16:08:04
Also in: lkml, xen-devel

On Wed, 1 Aug 2012, Konrad Rzeszutek Wilk wrote:
On Fri, Jul 27, 2012 at 10:28:25AM +0100, Ian Campbell wrote:
quoted
On Thu, 2012-07-26 at 17:37 +0100, Konrad Rzeszutek Wilk wrote:
quoted
On Thu, Jul 26, 2012 at 04:33:46PM +0100, Stefano Stabellini wrote:
quoted
sync_bitops functions are equivalent to the SMP implementation of the
original functions, independently from CONFIG_SMP being defined.
So why can't the code be changed to use that? Is it that
the _set_bit, _clear_bit, etc are not available with !CONFIG_SMP?
_set_bit etc are not SMP safe if !CONFIG_SMP. But under Xen you might be
communicating with a completely external entity who might be on another
CPU (e.g. two uniprocessor guests communicating via event channels and
grant tables). So we need a variant of the bit ops which are SMP safe
even on a UP kernel.

The users are common code and the sync_foo vs foo distinction matters on
some platforms (e.g. x86 where a UP kernel would omit the LOCK prefix
for the normal ones).
OK, that makes sense. Stefano can you include that comment in the git
commit description and in the sync_bitops.h file please?
Yep, I'll do that.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help