Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp551339ybe; Mon, 2 Sep 2019 05:54:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwIl2hObXGjALe4vf/4nTU6qe6Ig8aSQcLa6om2lCpgUeaHOJybsXELuMW6gS4SdT2d7eHV X-Received: by 2002:a17:90a:bf01:: with SMTP id c1mr13035561pjs.30.1567428849575; Mon, 02 Sep 2019 05:54:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567428849; cv=none; d=google.com; s=arc-20160816; b=PEY7Xx8cDeImEd5i8lutgsrDyx5yk1bzvbsmKQj1aI46ZjXZuI+7gc8vzKYHJD8Dap VvMLy3Ub0syq9bg0BD991SwdWU//pYSmQOEyAXwLfZ5XXDQ0DHqGC6pljvhNPO/S/kYy I3fTN1JarJDqfBHyTB8eITbd2u5yk/MhZxduNxdExR9jRCQKZ4PO/rn+3qcaUEEwcMJN BONBRSPCor52DGIunbBFj+WvB/bVK9UkuLE3XJwp2fjAYtvtCHePLjZVL2VE/9lKnW5B QzCzFs/ACSnPIAIcvmZZjrosWOonSV/w6rayewD9e26sFV+Hok2P4GBUhAHteB1jGRvq 711Q== 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; bh=9txAgStaSVLpOiUnD1wVbJtdydyv2Sk0yeDk9Q4ThhQ=; b=WkTJyWcL7QOZqLVmEBNtzur8No0tnq7x7536R/aEUjOKMbATsBOdZZL+nVSfIanrA2 itawg4zH4eHUGkaYfYR+ZeUZpcgeGaTv39eAVrN/TuTO9pLlC7KrPbVvpXyHvjy4YJjU n5gEHfDCIM0R0uxmTd8WyFeZcxV7ZBEhJ8HJOwcQVcUdcDy2mOdpPhPfG7+2d44B9od0 DAyatuIVHKwJJ9iN9qa51mmJT2e2UulpdxL8C3Oiu/xzRPqQa6FnODP4ZLdZ5Aqo5l2O IGOfRhApsdOOb5Og0ykxiW7uNPawlQ2B8N2LicFEV2m648AzumvIxyC5mvKTzK9RA6Bh eNwg== 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 t35si11518155pgm.8.2019.09.02.05.53.54; Mon, 02 Sep 2019 05:54:09 -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 S1731489AbfIBLL1 (ORCPT + 99 others); Mon, 2 Sep 2019 07:11:27 -0400 Received: from gate.crashing.org ([63.228.1.57]:37712 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730457AbfIBLL1 (ORCPT ); Mon, 2 Sep 2019 07:11:27 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x82BB7FG023249; Mon, 2 Sep 2019 06:11:07 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x82BB5Mw023248; Mon, 2 Sep 2019 06:11:05 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 2 Sep 2019 06:11:05 -0500 From: Segher Boessenkool To: Michael Ellerman Cc: "Alastair D'Silva" , Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [RFC PATCH] powerpc: Convert ____flush_dcache_icache_phys() to C Message-ID: <20190902111105.GX31406@gate.crashing.org> References: <9887dada07278cb39051941d1a47d50349d9fde0.camel@au1.ibm.com> <87imqbtqlw.fsf@mpe.ellerman.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87imqbtqlw.fsf@mpe.ellerman.id.au> User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 02, 2019 at 11:48:59AM +1000, Michael Ellerman wrote: > "Alastair D'Silva" writes: > > On Wed, 2019-08-21 at 22:27 +0200, Christophe Leroy wrote: > >> Can we be 100% sure that GCC won't add any code accessing some > >> global data or stack while the Data MMU is OFF ? > > > > +mpe > > > > I'm not sure how we would go about making such a guarantee, but I've > > tied every variable used to a register and addr is passed in a > > register, so there is no stack usage, and every call in there only > > operates on it's operands. > > That's not safe, I can believe it happens to work but the compiler > people will laugh at us if it ever breaks. Yes. Sorry. > Let's leave it in asm. +1 The asm is simpler, more readable, more maintainable, and perhaps more performant even. Plus the being-laughed-at issue. Segher