Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp647354img; Mon, 18 Mar 2019 11:01:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8t2/eYsslyemcxy/HT7gJXhoHOIKswxm/WZvJdxaUSjyANn4gah66zCeaJEZp1zrEkctU X-Received: by 2002:a63:3648:: with SMTP id d69mr18911720pga.314.1552932097561; Mon, 18 Mar 2019 11:01:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552932097; cv=none; d=google.com; s=arc-20160816; b=v0MzSO+tOUAxeIrgyepHytz6mmsXf5KQPsqXx9e7121qyobg8cP/f2CCf5dDXbrLxI qVVORXF7/l3dC1FB08F0xZ/C5r/5AwW+BxNVaiBk/LqMtfhSYWiToP1JPs8PV+EMUp5S FVm7nLKsZYMsfcurrPp1X49bAszJVWYCYl3QNhbV0efjs10SaYIOE59v0rRzSjSQBqOu TMgnShJ185bXg969ZN3S/IkQOIWUgyQMa9qSPdJU1YaKJ2ayp4e2ObBeTNYr+tKnfTqd luHM9+iUYqwRVccm8GZtFToPbytW6W9LFfApvsK20P9ZlPo4uVvasZXpollQ/07ZfuIv Cwdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=rAPEzrwkaepAiNAsQdz5Rek0CeUMuvdHyMBuiq66v40=; b=oUGTEIj8l4rQOaO+s/Vo5VBUeZRzG2eG1bSyh2/PR/Afhzgp4/HWC2uz3CRyKS3hyR oWhlN8gsd6q9aRMlPcRg3cg5M/7b9fJZripqysLxFJ+0KoDmGKBfd5Q8cf2i8rcAObBV BLQjPm88rpqQkAMmrUs/pauXHukKn6cSTo8EkjTarGHKPQb+hVvqcJjUnmBWtfiP9kzA bx+f7aJwPjlxX0Ni/POd1biFK6xK91wMoaYUPJ4r9EZooqLTuDtBdO/sdmmtKeuLUNyP FE0adAyGYOyjYYf22t9uk1EOepctjAiKaDOTwMD9gjZ6qbuB8exvZoqiGcxo3w3caBmd nsww== ARC-Authentication-Results: i=1; mx.google.com; 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 t5si9059815pgu.517.2019.03.18.11.01.21; Mon, 18 Mar 2019 11:01:37 -0700 (PDT) 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; 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 S1727030AbfCRR7W (ORCPT + 99 others); Mon, 18 Mar 2019 13:59:22 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:39152 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726857AbfCRR7W (ORCPT ); Mon, 18 Mar 2019 13:59:22 -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 8E895EBD; Mon, 18 Mar 2019 10:59:21 -0700 (PDT) Received: from [10.1.196.75] (e110467-lin.cambridge.arm.com [10.1.196.75]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B6F0C3F614; Mon, 18 Mar 2019 10:59:18 -0700 (PDT) Subject: Re: [PATCH] arm64/io: Don't use WZR in writel To: Marc Gonzalez , Russell King - ARM Linux admin Cc: Marc Zyngier , Will Deacon , Jens Axboe , Jeffrey Hugo , Catalin Marinas , LKML , Bjorn Andersson , MSM , AngeloGioacchino Del Regno , Linux ARM References: <68b71c15f32341468a868f6418e4fcb375bc49ba.camel@gmail.com> <20190211105755.GB30880@fuggles.cambridge.arm.com> <38d8965a-cd41-17cf-1b95-8dd58c079be4@arm.com> <874c702b8af760aa8fae38d478c79e3ecba00515.camel@gmail.com> <235d20ef-3054-69d9-975d-25aebf32aad3@arm.com> <20190223181254.GC572@tuxbook-pro> <86zhqm8i6d.wl-marc.zyngier@arm.com> <20190224035356.GD572@tuxbook-pro> <33d765b5-1807-fa6c-1ceb-99f09f7c8d5a@free.fr> <8eb4f446-6152-ffb6-9529-77fb0bcc307f@arm.com> <20190318170041.qu4x2565fmno6sei@shell.armlinux.org.uk> <5ba7c4d0-30ec-e38d-41dc-653fd5cb7f05@arm.com> From: Robin Murphy Message-ID: <0c06cb51-fc33-f2ba-e2b8-ad280b89f35c@arm.com> Date: Mon, 18 Mar 2019 17:59:17 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/03/2019 17:30, Marc Gonzalez wrote: > On 18/03/2019 18:19, Robin Murphy wrote: > >> For the context bank reset, yes, I am assuming that no complier will >> ever be perverse enough to detect that cfg is not written after the >> NULL check and immediately reallocate it to XZR for no good reason. >> I'd like to think that assumption is going to hold for the reasonable >> scope of this particular workaround, though. > > I'm not sure I understand the above paragraph. > > In code such as: > > if (val == 0) foo(val); > > gcc's algorithm is likely to figure out that the code is equivalent to > > if (val == 0) foo(0) > > and perform constant-propagation, etc. > > Is that what we're talking about? As may already be apparent, the way I expect compilers to behave, and the way compilers actually behave, are two overlapping but distinct sets of concepts... Robin.