From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Gonzalez Subject: Re: [PATCH] arm64/io: Don't use WZR in writel Date: Mon, 18 Mar 2019 18:30:26 +0100 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5ba7c4d0-30ec-e38d-41dc-653fd5cb7f05@arm.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Robin Murphy , 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 List-Id: linux-arm-msm@vger.kernel.org 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? Regards. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A1ECC43381 for ; Mon, 18 Mar 2019 17:30:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5959220854 for ; Mon, 18 Mar 2019 17:30:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Pk+GH09Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5959220854 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=g6ceBzASs4wG0jTxbQT32WcUsZ/s9snF7EQHpXFBKqw=; b=Pk+GH09QKwFh+T KN7hOXaeCHwjDUK2xdpmKwMHYh8UL2IqVsIuNObu7dJimkmZEsyf0VtHayf+Z7KDsjNYG4z1IXb/m JsnTNPfPKC7hIDH98wpSGjZkgaeJ6vaj5XDM8/bwZuYQ4spSEUZ/MMk6M4fispTzov7hkSOGqUAHB sdBFSfhwwyhTqhOFJmqYdQOSOgO0rCMJJj1WjbgxpSlF8MYArprhKgYpMyOdK7hdK/kwSYMs7fPmm RERos/PxlDR6966OPR2LV5N6rIjq7JRp0rQdjnQzsxDcfFReQ3h9HousJG26PrNv3sbu6YbN9cMCj HOcM47r8vOVSXZX2jAsw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5w5u-0003uC-41; Mon, 18 Mar 2019 17:30:38 +0000 Received: from ns.iliad.fr ([212.27.33.1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5w5p-0003tg-Q1 for linux-arm-kernel@lists.infradead.org; Mon, 18 Mar 2019 17:30:36 +0000 Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id 0F61E20723; Mon, 18 Mar 2019 18:30:27 +0100 (CET) Received: from [192.168.108.8] (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id E392A1FF12; Mon, 18 Mar 2019 18:30:26 +0100 (CET) Subject: Re: [PATCH] arm64/io: Don't use WZR in writel To: Robin Murphy , Russell King - ARM Linux admin 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: Marc Gonzalez Message-ID: Date: Mon, 18 Mar 2019 18:30:26 +0100 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: <5ba7c4d0-30ec-e38d-41dc-653fd5cb7f05@arm.com> Content-Language: en-US X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Mon Mar 18 18:30:27 2019 +0100 (CET) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190318_103033_988232_96DDACF4 X-CRM114-Status: GOOD ( 10.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Axboe , Marc Zyngier , Catalin Marinas , Will Deacon , LKML , Bjorn Andersson , Jeffrey Hugo , MSM , AngeloGioacchino Del Regno , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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? Regards. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel