Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4907003imm; Tue, 16 Oct 2018 01:52:24 -0700 (PDT) X-Google-Smtp-Source: ACcGV610MwXCKsHdo+L/zvLmmYb2SeuxQ0jL7bIi3FKK/xxD5ePM5JcA15nIn8GtoVbaFgSrS+wb X-Received: by 2002:a63:2643:: with SMTP id m64-v6mr19156159pgm.435.1539679944935; Tue, 16 Oct 2018 01:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539679944; cv=none; d=google.com; s=arc-20160816; b=MIbCvQgRjhpPRx0UHkBM0ten7qEqO1KSibEIjI9dzc1y0VUKCLbkSjFy3xvNajswQJ Fm4LH+DLTBEok3jL//0y45qt9S8Y+uBo7WwY1prysI6BPvZ913MjkGji28jmvvLBmMei f2ZuZdzEyf+V2Ey4rv6WZtCl5F02XPDPNrRi76WXsSXwxxi2Qu0QhN/uoURiwO0x/Zvq LDOEAKI4i2IA/G4+ijcTQQgsMzJcSYJknR9ecgJ2xhXus/xqGCYIt8lcSvlejDz3MWTU mnssMYHdnjzjcCJq2n1OmVGDDFWeQy1YiijgnUFZtBgjSPIRaNBWX9403iaW6Y/SIE4q F3zw== 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=HhrCCdmRuR8ygsjo3OhRo1cOVDN1LaiZ/MYESyMaT3A=; b=sY741yQ+h3EME+M4zf0CtOJOb7izBClCQQqgQAmWnhI2JuMmXouLU9/XURzy2wT/jB sgoDLh4rBCS7PM4ffkbA1OqQvQtj8gTpUPDemTBVxXKmxQEUPdO0+ntHb4b1h9EHWFPC 2TrkD7TFu2OpTk7bYKQFTabKqpgyiOtmLV6UfFcgeiXyxmfVPQ7s4st0im//y+RyHgjy XSbqHMbJ3wnCPeoFNlcWDplSMD+YK5V/K6LqGJmuimf6eC/lBx29x2gSNsX8ND0nMjcY wl6g99bZhAoXBI+/EJ1qqAZbwjo1/LT+uMRSii1f7+3oroGnpEqk7RXk9m11Hl9w3bbQ SdAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=a0X8Yffr; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d23-v6si12899718plr.127.2018.10.16.01.49.22; Tue, 16 Oct 2018 01:52:24 -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; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=a0X8Yffr; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727252AbeJPQdy (ORCPT + 99 others); Tue, 16 Oct 2018 12:33:54 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:54932 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726954AbeJPQdy (ORCPT ); Tue, 16 Oct 2018 12:33:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=HhrCCdmRuR8ygsjo3OhRo1cOVDN1LaiZ/MYESyMaT3A=; b=a0X8YffrnbUxYvPt7p3lu48+q gbmT7kk/dla+AoVIQfGPHrp/+6TOVfw59bmcCviptExavbOQ9HWYNOvCIjZv5bTtCJxfu1zYt+ZVf Q6i0QiIqclgphRcUKe//8qE707bgKhRlQhGk9sD6pAqMdHt3j3ypLwH1SoabV/fJ3z7xE=; Received: from n2100.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:4f86]:40773) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1gCKxl-0005ZW-FM; Tue, 16 Oct 2018 09:44:25 +0100 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.90_1) (envelope-from ) id 1gCKxg-0005Cp-AY; Tue, 16 Oct 2018 09:44:20 +0100 Date: Tue, 16 Oct 2018 09:44:17 +0100 From: Russell King - ARM Linux To: Linus Walleij Cc: Stefan Agner , Hans Ulli Kroll , Joel Stanley , Nicolas Pitre , Arnd Bergmann , Linux ARM , "linux-kernel@vger.kernel.org" , Roman Yeryomin Subject: Re: [PATCH 1/2] ARM: copypage-fa: add kto and kfrom to input operands list Message-ID: <20181016084416.GF30658@n2100.armlinux.org.uk> References: <20181015221629.13924-1-stefan@agner.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 16, 2018 at 10:00:19AM +0200, Linus Walleij wrote: > On Tue, Oct 16, 2018 at 12:16 AM Stefan Agner wrote: > > > When functions incoming parameters are not in input operands list gcc > > 4.5 does not load the parameters into registers before calling this > > function but the inline assembly assumes valid addresses inside this > > function. This breaks the code because r0 and r1 are invalid when > > execution enters v4wb_copy_user_page () > > > > Also the constant needs to be used as third input operand so account > > for that as well. > > > > This fixes copypage-fa.c what has previously done before for the other > > copypage implementations in commit 9a40ac86152c ("ARM: 6164/1: Add kto > > and kfrom to input operands list."). > > > > Signed-off-by: Stefan Agner > > Please add: > Cc: stable@vger.kernel.org It's not obvious yet whether this is right - it contradicts the GCC manual, but then we have evidence that it's required for some GCC versions where GCC may clone the function, or if the function is used within the same file. > I am on deep waters with ARM assembly, admittedly. So I wanted to > ask: OpenWRT has this cache patch: > https://github.com/openwrt/openwrt/blob/master/target/linux/gemini/patches-4.14/0001-cache-patch-from-OpenWRT.patch > I do not know why (sorry). > > Do you think that patch is actually a hack to hide the problem > fixed with this patch? (OK maybe stupid question but...) No, it looks to me like a hack to make DMA cache handling "more efficient" by cleaning/invalidating the entire cache when dealing with large streaming buffers. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up