Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp540530ybt; Wed, 1 Jul 2020 04:36:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgacRxxd+R2hY/whY6qpZ0fHMRSFygUMghsj3KLlAg31lWkz9tzN/yiz1vuXXhUo4dDQkp X-Received: by 2002:a05:6402:1614:: with SMTP id f20mr27286344edv.129.1593603375216; Wed, 01 Jul 2020 04:36:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593603375; cv=none; d=google.com; s=arc-20160816; b=pMf3qNHoU5qZnLagLnTBfFmV1oYb8bO7CHOp7rcDY4HOXxApF0QdTnpdQQK93v8QKr rQZikABeBtyMKr2Zi5xbwkUOcPgw5iMp/RHvqWj28uq90g6QIWmXbroimzNMzfsrgrXJ QbAZH6xDeWnqoViqOFHppt4zWNhCut7DgFiXNHbN02FN29XQRMcBj7cns3bWJC6G0meL xPhddUAbl46rRnYAbQdGLQzgE9AhzkuKurnphlafzs1AWhHyLmWc/fUXg1e/7QRCozQG cUx1HK1j2tSt3IwWTJH5O/UPvMexK5L2+HZM4FnfRucFrF6IfDOAUqlHfR0ZicKfBVhD iMRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=+2G7pu5fBLUOOrYwK2dyBQeCVSErew+kLUihj+mpC+I=; b=NICONO3mJMqWepDYOuTPdV9wFMYX/mR91+uFp6sgdQjDmaWmulch48FSZVDrnK+hc5 j9KcyWg2H/4687UYg3VvsFLVpxvJ9GglKABsU/8vr/Yh8j5/IzLD/Zea6c1xtA11NUfN xUG4Vqc1TDIW/aR8cIjdithsFIQ05qQPsTh7aE8HTDge95KqRPdKh63i5f9aIKX0Oy5S YxoHfpefgYALocuoKsIPhWFmWr/w2mO4eMQIGAwAo7G2aEg8EVlA8faqr2viPJqQ/VZT p48Cl/bT4j8IIM+tq5I5MawJIoQryyggKFWE2RsCLeFAoSK9PXYEyXfo58y9T+4yZGRA yn6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 36si4234637edp.290.2020.07.01.04.35.51; Wed, 01 Jul 2020 04:36:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730321AbgGALds (ORCPT + 99 others); Wed, 1 Jul 2020 07:33:48 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:40583 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730196AbgGALdr (ORCPT ); Wed, 1 Jul 2020 07:33:47 -0400 Received: from mail-qk1-f178.google.com ([209.85.222.178]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPSA (Nemesis) id 1Macf4-1jFtb91Xnm-00c6Rl; Wed, 01 Jul 2020 13:33:45 +0200 Received: by mail-qk1-f178.google.com with SMTP id j80so21792235qke.0; Wed, 01 Jul 2020 04:33:45 -0700 (PDT) X-Gm-Message-State: AOAM533T6ALZjEidRqExrH5mKItpO4/RnI33awMDPqAfmY9TgSooEYhV x/SFu5CYjGQ9T0cFADODlTWPn53JzTz8PDed9CU= X-Received: by 2002:a37:9dd6:: with SMTP id g205mr25563365qke.352.1593603224183; Wed, 01 Jul 2020 04:33:44 -0700 (PDT) MIME-Version: 1.0 References: <20200630173734.14057-1-will@kernel.org> <20200630173734.14057-3-will@kernel.org> <20200701101603.GB14959@willie-the-truck> In-Reply-To: <20200701101603.GB14959@willie-the-truck> From: Arnd Bergmann Date: Wed, 1 Jul 2020 13:33:28 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 02/18] compiler.h: Split {READ,WRITE}_ONCE definitions out into rwonce.h To: Will Deacon Cc: "linux-kernel@vger.kernel.org" , Sami Tolvanen , Nick Desaulniers , Kees Cook , Marco Elver , "Paul E. McKenney" , Josh Triplett , Matt Turner , Ivan Kokshaysky , Richard Henderson , Peter Zijlstra , Alan Stern , "Michael S. Tsirkin" , Jason Wang , Boqun Feng , Catalin Marinas , Mark Rutland , Linux ARM , alpha , virtualization@lists.linux-foundation.org, Android Kernel Team Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:/RjR3cx/IosXmLHSIAw3K2DqSQYhrhXWA71/rRKV/wIh3QCve5q gHLw8HS5iSdMhiBqrGklBQMexmENgsjC4XY3iUWttf+hhm5BmUWNDrq7JkrPkuEoBALjdhk raeyrDJuwB4zboNjFNxyEmQZtcyRtSEL2IrtiZL0NG0ksR8S/sAH31lB6rD/U23yzLls2/7 +eDDFhwm4BJ5vwtrEkhfw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:umKuxKgCI1I=:/r8f8diZkq+0S5w0FdPi4N eWZO6vSDlA6Zp+V1hvLgtcU7LKYJJxMf+eEkUvS/E5v06klFMH91fDuGWtwPGu0ROZUsBw2X1 LqAhs/Jq/iW+9dJ/SRfWgRIQHciZIf97liLiAclok9p6adg4aVUE30qgg7YkJOwlf3v6FO67U 1vG6L3EDxClpI6oUyaavz1w1jvK5nM5ZAMBSaEudxDmyybYVUeZVGmGDh6DjuEZoDUUSlvvt8 nUducq41B+zL9NBiRX/5UsSQNXXiAxBVl1Mz39Dj+qRrfyCGtCBpDYBIz00hdlNP5yPzqsaMO wAomUWS60A6zqCvHHrYgYxRCsAqoiYeoiq9Vprm98My2NRtxIyNEV/0iiCLbDoXPv1wkhGmxd esUq2Q3gYFig/Q8bep5Q0axtp9pmNP15VVYlrkHeHp3CzjKH0zzEk7A7Cmzcsv9uzF1RYhtPC IMttQiM8U/5kalUCZRWVG6auHlBJWclsfH0trOl3dR3FLg9iv7qiw9PKagzs+RA9NeOgsXpzN 7ukk9nHNCZSM1Nj9PEyCmTObPfldglxPA6xoMvMLeEmUANe+NqKJQYsVtRzsQGACi0Kyb+lYI Q51/4YXL+RptvMLqkol+XLc9BZ1VtD7fX6GBOc+PPeKjSx5wV1xR+jvnSsCCjpUGbHsAXU1WW d9bpZ/jxupuo5a4/yDD08rAv7TVNrKk2rs/DLffKGRdGbJkQz80DBp0h5437lbWUb98OMHbwr +ul3fSvH7Y3a1QD2oF/mA9vLiXrR3bOCKf+LAlIRq0Oz8R8r66DYQZ3xAc3HCAMB8WxQvheiY h8rnkXx3DEBg8BGq82zjLmhUAIrejbvsETKZXFsqpj6Q3AE2oo= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 1, 2020 at 12:16 PM Will Deacon wrote: > On Tue, Jun 30, 2020 at 09:11:32PM +0200, Arnd Bergmann wrote: > > On Tue, Jun 30, 2020 at 7:37 PM Will Deacon wrote: > > > > > > In preparation for allowing architectures to define their own > > > implementation of the READ_ONCE() macro, move the generic > > > {READ,WRITE}_ONCE() definitions out of the unwieldy 'linux/compiler.h' > > > file and into a new 'rwonce.h' header under 'asm-generic'. > > > > > > Acked-by: Paul E. McKenney > > > Signed-off-by: Will Deacon > > > --- > > > include/asm-generic/Kbuild | 1 + > > > include/asm-generic/rwonce.h | 91 ++++++++++++++++++++++++++++++++++++ > > > include/linux/compiler.h | 83 +------------------------------- > > > > Very nice, this has the added benefit of allowing us to stop including > > asm/barrier.h once linux/compiler.h gets changed to not include > > asm/rwonce.h. > > Yeah, with this series linux/compiler.h _does_ include asm/rwonce.h because > otherwise there are many callers to fix up, but that could be addressed > subsequently, I suppose. Right, I didn't mean you should change that right away. I actually have a work-in-progress patch series that removes a ton of indirect header inclusions to improve build speed, and a script to add the explicit includes into .c files where needed. > > The asm/barrier.h header has a circular dependency, pulling in > > linux/compiler.h itself. > > Hmm. Once smp_read_barrier_depends() disappears, I could actually remove > the include of from asm-generic/rwonce.h. It would have to > remain for arch/alpha/, however, since we need the barrier definitions to > implement READ_ONCE(). I can probably also replace the include of > in asm-generic/barrier.h with too (so it's > still circular, but at least a lot simpler). > > I'll have a play... I think this would require the same kind of fixup for anything that depends on asm/barrier.h being included implicitly at the moment. Arnd