From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH 02/18] compiler.h: Split {READ,WRITE}_ONCE definitions out into rwonce.h Date: Wed, 1 Jul 2020 11:16:04 +0100 Message-ID: <20200701101603.GB14959@willie-the-truck> References: <20200630173734.14057-1-will@kernel.org> <20200630173734.14057-3-will@kernel.org> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593598570; bh=zaXs2CbDvdszPriMRibslBZHNsXjv65VQsj0rfFmR+o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=x9F1GjIcBBX3hdCVHlt6wJhlZPB1N66WRkkqZTlXlWM63OjP7z5kH6BN/nqF+TGdK 0l2eDCnBkdVi58H2QL0fQ2HW5wh+cQZXqBCv4zjoK3BLLwxqaxwskMx48hdn7mC2PX hIbO1vcmH/rJuuU6I20zoA0/9Lb9QB1M0qPY6kII= Content-Disposition: inline In-Reply-To: Sender: linux-alpha-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Arnd Bergmann 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 Hi Arnd, 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. > 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... Will