Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3129019imc; Wed, 13 Mar 2019 09:29:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxBfob+mzwrP2R9Ud7R6qnYkX2xl2GmuFLsjK6oNErB+tJUOs6DCG/lAxKH2uYC5oHz2H7x X-Received: by 2002:a65:4547:: with SMTP id x7mr32652380pgr.350.1552494595379; Wed, 13 Mar 2019 09:29:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552494595; cv=none; d=google.com; s=arc-20160816; b=dkzvJuJwB2imVZv8dsuh7gnNJb1bOGQsbt8ZCvc4QGoaKi9Ydm8BQuo8ubyq9k0725 i6pi9dHbaPljc65Tm0DX3csMu1ifBzQ2J2rE/C399rYObcvFNJniL6ZPJQ7VrAUxxYhZ W6EQ/OqEtvY3S6D6zf3vsFMJkHVMJnqLXU8MHaqHFcNxTa0oD0q+9uzpj2NKbGqBGdYr GJjKBgapXadLpMSEMh+ddJtaBk7QAdwxDyr1CrUxq2VB1icWoMed0lWZVgKCVf+dHSQu m/zc2IzPcPA5+6ma6NPshrIR9+Mqk5bZralN8ZEOW/963M3jsOSO6Mn77TY5Hrixehcb BPyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=OY7cVf7fiSetvbco/da0cjAAKk/48aTVYLVyCJZ/wyo=; b=tJpCPWuxM2R4cAA79z3i44kfwxMAynp9D46O43M2sxrQ1+JizGTg4TknsdZVNycVLK etsxGJ4ULF3/uOv934poN0XNs24V8a3yMwMrbOyJrE/ajYoRlDYsuFTmXbGC18S+tRWU QixmMdtj8AfN7RzE8z/XGvv5vTC8x3sDBdE3n6yO808fyPL6YzjyNKA2l8QAq+r6nLrM Ntmhx/h1KhnHBgPtNO/e3SCsGSkNHfm/hlP6AZJADmXdem3hDzgwflfRKa6fSNrza+6I 4OAxyglzQIdSEjazMnLU73QjHaG96uFWZKG16LRQkfEfd2aLVyoUNLODbYSxRo5YU3Sx UVRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si9960296pgv.118.2019.03.13.09.29.39; Wed, 13 Mar 2019 09:29:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726444AbfCMQ3I (ORCPT + 99 others); Wed, 13 Mar 2019 12:29:08 -0400 Received: from foss.arm.com ([217.140.101.70]:60238 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726011AbfCMQ3I (ORCPT ); Wed, 13 Mar 2019 12:29:08 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1FEE280D; Wed, 13 Mar 2019 09:29:08 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BC8233F71D; Wed, 13 Mar 2019 09:29:06 -0700 (PDT) Date: Wed, 13 Mar 2019 16:29:04 +0000 From: Mark Rutland To: Arnd Bergmann Cc: Peter Zijlstra , Qian Cai , Jason Gunthorpe , "akpm@linux-foundation.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] mm/debug: add a cast to u64 for atomic64_read() Message-ID: <20190313162903.GB39315@lakrids.cambridge.arm.com> References: <20190310183051.87303-1-cai@lca.pw> <20190311035815.kq7ftc6vphy6vwen@linux-r8p5> <20190311122100.GF22862@mellanox.com> <1552312822.7087.11.camel@lca.pw> <20190313091844.GA24390@hirez.programming.kicks-ass.net> <20190313143552.GA39315@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 13, 2019 at 03:57:42PM +0100, Arnd Bergmann wrote: > On Wed, Mar 13, 2019 at 3:36 PM Mark Rutland wrote: > > On Wed, Mar 13, 2019 at 10:18:44AM +0100, Peter Zijlstra wrote: > > > On Mon, Mar 11, 2019 at 03:20:04PM +0100, Arnd Bergmann wrote: > > > > On Mon, Mar 11, 2019 at 3:00 PM Qian Cai wrote: > > > > I think that using s64 consistently (with any necessary alignment > > annotation) makes the most sense. That's unambigious, and what the > > common headers now use. > > > > Now that the scripted atomics are merged, I'd like to move arches over > > to arch_atomic_*(), so the argument and return types will become s64 > > everywhere. > > Yes, that sounds like the easiest way, especially if we don't touch the > internal implementation but simply rename all the symbols provided > by the architectures. Is that what you had in mind, or would you go > beyond the minimum changes here? I'd expected to convert arches one-by-one, updating the types during conversion. I guess it's not strictly necessary to change the internal types, but it would seem nicer to do that. I don't think it's possible to do that rename right now, unless we do it treewide. There are a few core things that need to be fixed up first, e.g. making play nicely with . In the end, what I'd like to get to is: * Arch code provids arch_atomic*_*(). * Common code fleshes out the entire API as raw_atomic*_*(), build atop of arch_atomic*_*(). All the ifdeffery lives here. * Common code builds the instrumented atomic*_*() API atop of the raw_atomic*_*() API. No ifdeffery necessary here. Thanks, Mark.