Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp483539ybt; Wed, 1 Jul 2020 03:17:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxm3nNZvTaX1kG6Q3zyBkla3VEpQICBSrqxGhDphg/NfdGFyEfR3IDN1EJsRKt22WiC/PxS X-Received: by 2002:a17:906:1a59:: with SMTP id j25mr21042814ejf.398.1593598622428; Wed, 01 Jul 2020 03:17:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593598622; cv=none; d=google.com; s=arc-20160816; b=JqCLVTlATJhv1IhIVdnJU8C2QhrOlZWnsB3GxAJNAb+xpK+yh9Mch101+/k7zYsQKj antG6U5fLFaPBPwc6VGIfQMnNkTE3IHE8lYEi2z7nDNgp5X+ThWLi8/+1SfUHmz29GGW xyww7hXpO1N64tt6Q56fd9vKYMXlKlMO/K2prkytyQYC++goU4ZR9JNNLXgL0pA7k6Sw PBr3Or6Eh/pwVdYsjRBJV83SUdZou7hJ0TMX6M5K72Ns87BQsIeM9fdrNtREfdLRSuGm ImLMmuVZIKLresKoUW1RZFJtxpJnZFH6QKbRjDVLvGg/zyxQ5M1UlYVXKyDdO2v3OzKa 7sEw== 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:dkim-signature; bh=ojUjQACcDmuwNQKDdMDvB7zQFGxcEc/V8hb8t8fy+bY=; b=Dm8byVYWP/FhYArI+7RnywMiUvn+gujzgSc3GEQ5mCX3yAdRPkdtujLGKjwbqaxYqV 1hmiw+fniL8ehvu59moGc6b0M3RhRqxD7P3Q7st4CPz9dCaEc1/vaMf3zU8Ka1lp1/p9 hbUiEefxHy37jXJNVEk0b3Om5cI0TL88FhK/iP30iBWZytkMLbK3Nin4gv8eIvZ3jP7/ iLEAf2eiMxyJMmNoErxzArvkTOlBrIIj26HenZDqIDi4J/sy6+/b6hsMNc3ojVwz4m9m vqgem8a/bsMBc09/cL+FU1JrswBTHHsOqw3Et+vjZadNTobn3vDGEHW8sLfRnGXugER8 SKwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=x9F1GjIc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d18si3380810ejt.487.2020.07.01.03.16.37; Wed, 01 Jul 2020 03:17:02 -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; dkim=pass header.i=@kernel.org header.s=default header.b=x9F1GjIc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729843AbgGAKQM (ORCPT + 99 others); Wed, 1 Jul 2020 06:16:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:41700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729671AbgGAKQL (ORCPT ); Wed, 1 Jul 2020 06:16:11 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2AECE206B6; Wed, 1 Jul 2020 10:16:07 +0000 (UTC) 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= Date: Wed, 1 Jul 2020 11:16:04 +0100 From: Will Deacon 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 , virtualization@lists.linux-foundation.org, Android Kernel Team Subject: Re: [PATCH 02/18] compiler.h: Split {READ,WRITE}_ONCE definitions out into rwonce.h Message-ID: <20200701101603.GB14959@willie-the-truck> References: <20200630173734.14057-1-will@kernel.org> <20200630173734.14057-3-will@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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