From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932998AbdC2N2n (ORCPT ); Wed, 29 Mar 2017 09:28:43 -0400 Received: from foss.arm.com ([217.140.101.70]:33634 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932623AbdC2N1n (ORCPT ); Wed, 29 Mar 2017 09:27:43 -0400 Date: Wed, 29 Mar 2017 14:27:18 +0100 From: Mark Rutland To: Matthew Wilcox Cc: Dmitry Vyukov , peterz@infradead.org, mingo@redhat.com, akpm@linux-foundation.org, will.deacon@arm.com, aryabinin@virtuozzo.com, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, x86@kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 4/8] asm-generic: add atomic-instrumented.h Message-ID: <20170329132718.GI23442@leverpostej> References: <20170328213513.GB12803@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170328213513.GB12803@bombadil.infradead.org> 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 On Tue, Mar 28, 2017 at 02:35:13PM -0700, Matthew Wilcox wrote: > On Tue, Mar 28, 2017 at 06:15:41PM +0200, Dmitry Vyukov wrote: > > The new header allows to wrap per-arch atomic operations > > and add common functionality to all of them. > > Why a new header instead of putting this in linux/atomic.h? The idea was that doing it this way allowed architectures to switch over to the arch_* naming without a flag day. Currently this only matters for KASAN, which is only supported by a couple of architectures (arm64, x86). I seem to recall that there was an issue that prevented us from solving this with ifdeffery early in linux/atomic.h like: #ifdef arch_op #define op(...) ({ \ kasna_whatever(...) \ arch_op(...) \ }) #endif ... but I can't recall specifically what it was. Thanks, Mark.