Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752339AbdI0KLu (ORCPT ); Wed, 27 Sep 2017 06:11:50 -0400 Received: from foss.arm.com ([217.140.101.70]:43598 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751800AbdI0KLs (ORCPT ); Wed, 27 Sep 2017 06:11:48 -0400 Date: Wed, 27 Sep 2017 11:10:19 +0100 From: Mark Rutland To: Thomas Gleixner Cc: Christopher Lameter , Tejun Heo , linux-kernel@vger.kernel.org, Arnd Bergmann , Peter Zijlstra , Pranith Kumar , linux-arch@vger.kernel.org, "Paul E. McKenney" Subject: Re: [PATCH] percpu: make this_cpu_generic_read() atomic w.r.t. interrupts Message-ID: <20170927101019.GB32150@leverpostej> References: <1506345872-30559-1-git-send-email-mark.rutland@arm.com> <20170925151826.GK828415@devbig577.frc2.facebook.com> <20170925153301.GA29775@leverpostej> <20170925154404.GA560070@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 863 Lines: 22 On Wed, Sep 27, 2017 at 11:01:13AM +0200, Thomas Gleixner wrote: > The default for 32bit architectures is that they CANNOT do atomic > fetch/write of 8 bytes. Indeed. In addition, even the native word size accesses weren't guaranteed to be atomic, as we hadn't used the appropriate accessors to prevent the compiler from messing with things behind our backs. > So instead of forcing that to be implemented in every affected > architecture this wants to be addressed in generic code and those few > 32bit architectures which can do atomic double word fetch/write > implement the magic functions to do so. I've done this in v2 [1], which Tejun has queued [2] as a fix for v4.14. Thanks, Mark. [1] https://lkml.kernel.org/r/1506426112-19826-1-git-send-email-mark.rutland@arm.com [2] https://lkml.kernel.org/r/20170926144118.GA70381@devbig577.frc2.facebook.com