linux-mips
[Top] [All Lists]

RE: [Fwd: [Ltt-dev] MIPS atomic operations, "sync"]

To: "Sergei Shtylyov" <sshtylyov@ru.mvista.com>, "Linux-MIPS" <linux-mips@linux-mips.org>
Subject: RE: [Fwd: [Ltt-dev] MIPS atomic operations, "sync"]
From: "Kaz Kylheku" <kaz@zeugmasystems.com>
Date: Fri, 10 Nov 2006 13:51:38 -0800
Cc: <compudj@krystal.dyndns.org>, <tt-dev@shafik.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Thread-index: AccE99Zx9YPIosZXSVyRUJ1HYRLqigAGg3iw
Thread-topic: [Fwd: [Ltt-dev] MIPS atomic operations, "sync"]
Sergei Shtylyov wrote:
> I just came across the MIPS atomic.h and system.h 
> implementations in 2.6.18
> which brings a question :
> 
> Why are the primitives in include/asm-mips/atomic.h using the "sync"
> instruction even in the UP case ? system.h cmpxchg only uses 
> the sync in the
> SMP case.

There was just a discussion about this in the mailing list. Check the
archive.

Ralf Baechle mentioned that he has a patch to remove the syncs from
uniprocessor code, so that would seem to answer your question.

Thread subject line: "Sync operation in atomic_add_return()".

<Prev in Thread] Current Thread [Next in Thread>