Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1111850ybl; Fri, 10 Jan 2020 12:17:43 -0800 (PST) X-Google-Smtp-Source: APXvYqwOI5lnA9hSqTxRVxiIIX6pdyD5qdydr/eBtIFLpLEc/K7ChDVMaPnHBSSHYJxPMj865pKw X-Received: by 2002:a9d:6e03:: with SMTP id e3mr4069784otr.46.1578687463006; Fri, 10 Jan 2020 12:17:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578687462; cv=none; d=google.com; s=arc-20160816; b=sW8E5Usq4rXxer6huzoqadJUpqIOYsPg0yZPKah4wPR7JzX1/jRUH7kGjDfnlpRl+i znDO0gZ9jNaVr1U7xz5/Q9C3mxGoOHh/UpYaPk2bKm/91FXrxhtSa6JDqD3iRZg6dSPN yBKyCw4RtECZudGjCEGFUCaLJp/rJX9YkMGYoab4wrVlRq2wbm6Cm9+Dap8txEKb8vMe CflOAOUsnCHbMNvvXpwIFUWsWO/YL2VWE9HKyx3LJLB/o3AxTGg2iDhYL0o+eTyCWjg5 1/neFqHhGaIGQMNe8X4r/WFywjqEy3401JPI9SVdeIS7N49UyDnKEq7+p6adGjkoRris RJLw== 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:dkim-signature; bh=EoKs7DLXvXqzDjIjK2Ln0baXpWf36RRq1PcuXotv7ds=; b=jH5CZI8jhQZ5zOhrSOkFQ1XnScvaOgn0GEGT34JobzniL7UoUYZat9d46VuaFyJ9st V6ASShpLaH7XxCEt5zbssVLTE/qZU1zfUPSyB6q+Gcr0n9rgTR5hpIdAbWRXmS3iVsN6 XDJT4kF+kbeYNxTvJsqLj2Tg2tCGxISTM78OJaR8GDi3e897kunZimpm3IYVl8xBdbwb 2C+EU2kXhCKsrWZg+JnDnEKsJDjax52Sui9dLDtVIn4zuUVPyKoek+4oeY5zp7naWFBT Dmjd1ccn9e9TjFArg7FS9PhsFo/OOF+TbOcBphZjUJCcDKveRs03nhOdp8mgIrq+8Ywz dyOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=hnSVZpJB; 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 2si1597912ois.221.2020.01.10.12.17.31; Fri, 10 Jan 2020 12:17:42 -0800 (PST) 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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=hnSVZpJB; 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 S1726643AbgAJUPF (ORCPT + 99 others); Fri, 10 Jan 2020 15:15:05 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:37371 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725899AbgAJUPF (ORCPT ); Fri, 10 Jan 2020 15:15:05 -0500 Received: by mail-lf1-f66.google.com with SMTP id b15so2418599lfc.4 for ; Fri, 10 Jan 2020 12:15:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EoKs7DLXvXqzDjIjK2Ln0baXpWf36RRq1PcuXotv7ds=; b=hnSVZpJB53NNn6wqLpSOhHsie6VkBQEhcfCNwu+IHx45RVrdgQBN5WMCD6SVMTtkIb AKlODwqEkeLtznWH6lwg/G2wzFnfIZLC+c9uzR45JzOvrs+qQeAoUcNuWZjoe0U3/8ew gdD49lYD2Irh400cM65Hhjn8BpzwdZpGgohuw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EoKs7DLXvXqzDjIjK2Ln0baXpWf36RRq1PcuXotv7ds=; b=J2NXgwkU/zGVPs5AbUsZfwyQrophBefEARDb5xcBsACPcbH/DXe/+tex5QocJPqtAv ZLjOvb12jRjLNK2bwlWAa8qpU8pURfJ9KUnKOzJeXrcIDVofo//HrAtKh1P77dMv96et Ky+DITqVB1tyhESZWZs1k8JKLj73dbUN5Cj8rXUEBJvJNa4YqDCxjPyZR1hjJqcjDlS/ AnIvL4xIkFGRvFMLIkw+m6tW240HgnN8qS+EadLN39mcLCN95c+GMTevqtIWM4QM9kPV Qo0pbZFwSsUZfJAZhxfwuHKcJNxB92+bo7W13/7xtgImKKnn3hVBQQ4NXXj/JDHVQBTw VarQ== X-Gm-Message-State: APjAAAUvhNsT5PuRyUjmIq5gstd8ExtXjmyLNd3irGu8LaHGbsxXFxO0 u4fsss33gJrYy0JtQ/aiwWGOl5YI33c= X-Received: by 2002:a19:ec14:: with SMTP id b20mr3425942lfa.63.1578687302626; Fri, 10 Jan 2020 12:15:02 -0800 (PST) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id m13sm1551107lfo.40.2020.01.10.12.15.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Jan 2020 12:15:01 -0800 (PST) Received: by mail-lf1-f47.google.com with SMTP id y1so2411774lfb.6 for ; Fri, 10 Jan 2020 12:15:01 -0800 (PST) X-Received: by 2002:ac2:5216:: with SMTP id a22mr3444153lfl.18.1578687301360; Fri, 10 Jan 2020 12:15:01 -0800 (PST) MIME-Version: 1.0 References: <20200110165636.28035-1-will@kernel.org> In-Reply-To: From: Linus Torvalds Date: Fri, 10 Jan 2020 12:14:45 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 0/8] Rework READ_ONCE() to improve codegen To: Arnd Bergmann Cc: Will Deacon , "linux-kernel@vger.kernel.org" , linux-arch , Android Kernel Team , Michael Ellerman , Peter Zijlstra , Segher Boessenkool , Christian Borntraeger , Luc Van Oostenryck Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 10, 2020 at 11:47 AM Arnd Bergmann wrote: > > Isn't the read_barrier_depends() the only reason for actually needing > the temporary local variable that must not be volatile? > > If you make alpha provide its own READ_ONCE() as the first > step, it would seem that the rest of the series gets much easier > as the others can go back to the simple statement from your Hmm.. The union still would cause that "take the address of a volatile thing on the stack" problem, wouldn't it? And that was what caused most of the issues. I think the _real_ issue is how KASAN forces that odd pair of inline functions in order to have the annotations on the accesses. Linus