[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160106143218.GV6344@twins.programming.kicks-ass.net>
Date: Wed, 6 Jan 2016 15:32:18 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: Rich Felker <dalias@...c.org>, linux-kernel@...r.kernel.org,
linux-sh@...r.kernel.org, Rob Landley <rob@...dley.net>,
Jeff Dionne <jeff@...inux.org>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>
Subject: Re: [PATCH v2 31/32] sh: support a 2-byte smp_store_mb
On Wed, Jan 06, 2016 at 01:52:17PM +0200, Michael S. Tsirkin wrote:
> > > Peter, what do you think? How about I leave this patch as is for now?
> >
> > No, and I object to removing the single byte implementation too. Either
> > remove the full arch or fix xchg() to conform. xchg() should work on all
> > native word sizes, for SH that would be 1,2 and 4 bytes.
>
> Rick, maybe you could explain how is current 1 byte xchg on llsc wrong?
It doesn't seem to preserve the 3 other bytes in the word.
> It does use 4 byte accesses but IIUC that is all that exists on
> this architecture.
Right, that's not a problem, look at arch/alpha/include/asm/xchg.h for
example. A store to another portion of the word should make the
store-conditional fail and we'll retry the loop.
The short versions should however preserve the other bytes in the word.
SH's cmpxchg() is equally incomplete and does not provide 1 and 2 byte
versions.
In any case, I'm all for rm -rf arch/sh/, one less arch to worry about
is always good, but ISTR some people wanting to resurrect SH:
http://old.lwn.net/Articles/647636/
Rob, Jeff, Sato-san, might I suggest you send a MAINTAINERS patch and
take up an active interest in SH lest someone 'accidentally' nukes it?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists