From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933745AbcIFLLB (ORCPT ); Tue, 6 Sep 2016 07:11:01 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:49484 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754927AbcIFLK7 (ORCPT ); Tue, 6 Sep 2016 07:10:59 -0400 Date: Tue, 6 Sep 2016 13:10:52 +0200 From: Peter Zijlstra To: Will Deacon Cc: Alan Stern , "Paul E. McKenney" , Ingo Molnar , Felipe Balbi , USB list , Kernel development list Subject: Re: Memory barrier needed with wake_up_process()? Message-ID: <20160906111052.GZ10121@twins.programming.kicks-ass.net> References: <20160902191857.GL10153@twins.programming.kicks-ass.net> <20160902221413.GN10153@twins.programming.kicks-ass.net> <20160902221629.GK10168@twins.programming.kicks-ass.net> <20160905094310.GB2649@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160905094310.GB2649@arm.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 05, 2016 at 10:43:11AM +0100, Will Deacon wrote: > On Sat, Sep 03, 2016 at 12:16:29AM +0200, Peter Zijlstra wrote: > > Forgot to Cc Will. Will, does ARM64 need to make smp_mb__before_spinlock > > smp_mb() too? > > Yes, probably. Just to confirm, the test is something like: > > > CPU0 > ---- > > Wx=1 > smp_mb__before_spinlock() > LOCK(y) > Rz=0 > > CPU1 > ---- > > Wz=1 > smp_mb() > Rx=0 > > > and that should be forbidden? Indeed.