From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FE1DC6778C for ; Thu, 5 Jul 2018 11:52:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BE4D12241D for ; Thu, 5 Jul 2018 11:52:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE4D12241D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753983AbeGELwS (ORCPT ); Thu, 5 Jul 2018 07:52:18 -0400 Received: from foss.arm.com ([217.140.101.70]:48506 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753921AbeGELwR (ORCPT ); Thu, 5 Jul 2018 07:52:17 -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 64F3A7A9; Thu, 5 Jul 2018 04:52:17 -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 79F513F2EA; Thu, 5 Jul 2018 04:52:16 -0700 (PDT) Date: Thu, 5 Jul 2018 12:52:14 +0100 From: Mark Rutland To: Will Deacon Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, boqun.feng@gmail.com Subject: Re: [PATCHv2 08/11] atomics: switch to generated fallbacks Message-ID: <20180705115213.suo6ocnels5oymbg@lakrids.cambridge.arm.com> References: <20180625105952.3756-1-mark.rutland@arm.com> <20180625105952.3756-9-mark.rutland@arm.com> <20180704152846.GL4828@arm.com> <20180704160145.kyzzymyufv3kt52l@lakrids.cambridge.arm.com> <20180704174451.GE9668@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180704174451.GE9668@arm.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 04, 2018 at 06:44:52PM +0100, Will Deacon wrote: > On Wed, Jul 04, 2018 at 05:01:46PM +0100, Mark Rutland wrote: > > On Wed, Jul 04, 2018 at 04:28:47PM +0100, Will Deacon wrote: > > > On Mon, Jun 25, 2018 at 11:59:49AM +0100, Mark Rutland wrote: > > > > As a step to ensuring the atomic* APIs are consistent, switch to fallbacks > > > > generated by gen-atomic-fallback.sh. > > > > > > > > These are checked in rather than generated with Kbuild, since: > > > > > > > > * This allows inspection of the atomics with git grep and ctags on a > > > > pristine tree, which Linus strongly prefers being able to do. > > > > > > > > * The fallbacks are not expected to change very often, and are not > > > > affected by machine details or configuration options, so regenerating > > > > them for *every* build is somewhat wasteful. > > > > > > > > * These are included by files required *very* early in the build process > > > > (e.g. for generating bounds.h), and we'd rather not complicate the > > > > top-level Kbuild file. > > > > > > Would it be worth checking that the generated output from the script doesn't > > > differ from the file in tree at some point during the build, and issuing a > > > warning if they do? > > > > We could do that in the top-level Kbuild file. It would be less hideous > > than the generation was, since we don't have to add dependencies to all > > other targets. > > > > I can take a look, if you'd like? > > Yes, please. This came out simple enough [1]; I'll send a v3 with that. > Might also be worth having your "THIS FILE IS GENERATED" disclaimer > before each function, as I completely missed it when I opened the file > since it just looks like part of the license and jumping around with > ctags might dump you halfway down the file. I'd prefer not do litter the files with such a repeated comment. It's messy and painful to do consistently, and given the Kbuild check, I don't think that it should be necessary. Thanks, Mark. [1] https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?h=atomics/generated&id=29a4a61360ee1baf812a1a4e93ceebcaee426a70