From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932525AbdBVLl2 (ORCPT ); Wed, 22 Feb 2017 06:41:28 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:60384 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932291AbdBVLlV (ORCPT ); Wed, 22 Feb 2017 06:41:21 -0500 Date: Wed, 22 Feb 2017 12:41:17 +0100 From: Peter Zijlstra To: Stafford Horne Cc: Jonas Bonn , Stefan Kristiansson , linux@roeck-us.net, openrisc@lists.librecores.org, linux-kernel@vger.kernel.org, Ingo Molnar Subject: Re: [PATCH v3 10/25] openrisc: add spinlock implementation Message-ID: <20170222114117.GR6515@twins.programming.kicks-ass.net> References: <9ec913b47790e9412d5b71a5fc52794ce4ebafb9.1487702890.git.shorne@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9ec913b47790e9412d5b71a5fc52794ce4ebafb9.1487702890.git.shorne@gmail.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 Wed, Feb 22, 2017 at 04:11:39AM +0900, Stafford Horne wrote: > +static inline void arch_spin_unlock(arch_spinlock_t *lock) > +{ > + smp_mb(); > + lock->tickets.owner++; > +} This is putting a lot of trust in the compiler, nothing is volatile so it can do horrible things.