From patchwork Fri Aug 9 18:21:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 170967 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp10352626ile; Fri, 9 Aug 2019 11:21:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8ef/dDgvJ8cxMlgQ1nR0QJZ880RiSgEGTWh/EQkfirYdNE+4g4vtUOAPP9qqDE/wmwCX4 X-Received: by 2002:a17:902:f46:: with SMTP id 64mr20436793ply.235.1565374882429; Fri, 09 Aug 2019 11:21:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565374882; cv=none; d=google.com; s=arc-20160816; b=TrBp4l7d3PaTOd/hpOZTnYPf6YIgpQjEq3Qv5za18E5AfgDpZYpOLan1ryQSF7D3I2 WOgby5i2NJ/YxHCKc8fjRs+AkCvr2OTpe1OXmJxtFCD4PaLaAX6xVncwTDm0njIt7dzO KeCn5uIGI3EFwmtDdwqJtHbR+7eRee3zeB6GF6ITmc5S1n9SQ+w+vXEEbdOj8dySZ9mc FhM+QhryYDcdSh2gx88kIl9ybz8Y1LFv90j3WgTv2aO2uSQGa9PSajekjYZcvaXv92ra 0J0xOGjHZTYKp43htCszIl2kY7Ur1lwrFGcou9OqB1KZ/RMDEBt9FZ4byFD5p+XzL+Uy lacQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=AfTcG56zmwo+ldOTopXdEviJ01wH7yWHp2h8SCNYIzM=; b=Wp5aw2haqxtmzIX9Ks7322t5djYdaZ0Ovk/peosywrNtMgPYFaM5/VDldsnmmCugOp SGGsYse0b1/SSoR5i3f0zfcM5EewDubr3Q6LpIYqWDmun2FM4pWCQuq+zNupbVY/KLlL wFkDtD5DR7N9dS1AZGDv4cnl87jF9Kxt2qleIDf7qTG3JbrXOg/VlnCpZJgE/WHwWc5G qQPGKwRkDrghbDMNF8hzO8QhAnRIEyC97SdW0tisVUag7q2r294xzQZgNN8MzuVqPEfI 1VHKjUQAZgKZmWy1gky4z3S+jxqW1vhunRwYLb9RukT6ZmlIo614DeXvyZoL8brmWQDV rVbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=p1bth4T+; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cj12si51397236plb.237.2019.08.09.11.21.22; Fri, 09 Aug 2019 11:21:22 -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=pass header.i=@google.com header.s=20161025 header.b=p1bth4T+; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407262AbfHISVU (ORCPT + 28 others); Fri, 9 Aug 2019 14:21:20 -0400 Received: from mail-qt1-f202.google.com ([209.85.160.202]:39690 "EHLO mail-qt1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726358AbfHISVU (ORCPT ); Fri, 9 Aug 2019 14:21:20 -0400 Received: by mail-qt1-f202.google.com with SMTP id r15so11027777qtt.6 for ; Fri, 09 Aug 2019 11:21:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=AfTcG56zmwo+ldOTopXdEviJ01wH7yWHp2h8SCNYIzM=; b=p1bth4T+dnzyYMSmrcDJ0MtjQJnVJKlJ2xP5NDQSsWQau0y+cTyPAyWzulS3Wj5vip 91pLNuH856Ct4xX1mCbGtqpxzf6vHz7rW8/+QRrC3Qb1JQs3HNHeRtEF7yskfTTq3NBS g/OQ7VcDRzteoALGdT/qUd8Cg/pWZrqzHkKhPIAnfP4S/BEbpPFC3xUD+0c0CFJkCu67 a/kiYjVRt56URANpDGuxohhdQvHYM2TRM29JWOz6T1iO8j9GvAl+BdH+3dcGL/HfQtuz qodCmqtq0wWoI4LlconGshbfCPaw3D6uwxuhWJw3bsBE8Ae3qDSzT4wau477IBIbG/Lf C1Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=AfTcG56zmwo+ldOTopXdEviJ01wH7yWHp2h8SCNYIzM=; b=bFXj6ctZTQLu1V2Do2vFAqXeOMu8vhZsB74V3raNzQE1H5IenJoUGjhNL6X6YfU6hO 2LmaFpbgAsC+RncWLYDWru8SNj266RBf1rZ1thO+9Rw8UultUNSVNp9bBAyH+0TqnoDm hTwyOQMt5UygVwsUtYn8IFDE6JP2esjEilQxD4tGMpgxFG4iDmu73xvwQSVd3Q3X3yNY UDPEADuikCEsz9/QfXOBe2qNMOuadiScOJQR3jY+CGYBujiFDB/YB8sjzDsg4f7XVVsk MJ1DMEwAq+SmzNS4gthaKOkGFfJnPxnpt6o+MvOY2js53UdC62ZZHoyg3an4nb7wLrb1 FXyA== X-Gm-Message-State: APjAAAVIAQh3ZfbjOFtLQ5J5uKnWp0ElQbBZCXixMSkQiDL+zWV9uMBA 3tajiq3IqZ76vASU1eNG/htWpcmKytbxyRSvq/o= X-Received: by 2002:a05:620a:685:: with SMTP id f5mr19419821qkh.238.1565374879207; Fri, 09 Aug 2019 11:21:19 -0700 (PDT) Date: Fri, 9 Aug 2019 11:21:05 -0700 In-Reply-To: <87h873zs88.fsf@concordia.ellerman.id.au> Message-Id: <20190809182106.62130-1-ndesaulniers@google.com> Mime-Version: 1.0 References: <87h873zs88.fsf@concordia.ellerman.id.au> X-Mailer: git-send-email 2.23.0.rc1.153.gdeed80330f-goog Subject: [PATCH] powerpc: fix inline asm constraints for dcbz From: Nick Desaulniers To: mpe@ellerman.id.au Cc: christophe.leroy@c-s.fr, segher@kernel.crashing.org, arnd@arndb.de, Nick Desaulniers , Nathan Chancellor , kbuild test robot , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The input parameter is modified, so it should be an output parameter with "=" to make it so that a copy of the input is not made by Clang. Link: https://bugs.llvm.org/show_bug.cgi?id=42762 Link: https://gcc.gnu.org/onlinedocs/gcc/Modifiers.html#Modifiers Link: https://github.com/ClangBuiltLinux/linux/issues/593 Link: https://godbolt.org/z/QwhZXi Link: https://lore.kernel.org/lkml/20190721075846.GA97701@archlinux-threadripper/ Fixes: 6c5875843b87 ("powerpc: slightly improve cache helpers") Debugged-by: Nathan Chancellor Reported-by: Nathan Chancellor Reported-by: kbuild test robot Suggested-by: Arnd Bergmann Suggested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers --- Green CI run: https://travis-ci.com/ClangBuiltLinux/continuous-integration/builds/122521976 https://github.com/ClangBuiltLinux/continuous-integration/pull/197/files#diff-40bd16e3188587e4d648c30e0c2d6d37 arch/powerpc/include/asm/cache.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.23.0.rc1.153.gdeed80330f-goog diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h index b3388d95f451..5a0df6a1b9dc 100644 --- a/arch/powerpc/include/asm/cache.h +++ b/arch/powerpc/include/asm/cache.h @@ -107,22 +107,22 @@ extern void _set_L3CR(unsigned long); static inline void dcbz(void *addr) { - __asm__ __volatile__ ("dcbz %y0" : : "Z"(*(u8 *)addr) : "memory"); + __asm__ __volatile__ ("dcbz %y0" : "=Z"(*(u8 *)addr) :: "memory"); } static inline void dcbi(void *addr) { - __asm__ __volatile__ ("dcbi %y0" : : "Z"(*(u8 *)addr) : "memory"); + __asm__ __volatile__ ("dcbi %y0" : "=Z"(*(u8 *)addr) :: "memory"); } static inline void dcbf(void *addr) { - __asm__ __volatile__ ("dcbf %y0" : : "Z"(*(u8 *)addr) : "memory"); + __asm__ __volatile__ ("dcbf %y0" : "=Z"(*(u8 *)addr) :: "memory"); } static inline void dcbst(void *addr) { - __asm__ __volatile__ ("dcbst %y0" : : "Z"(*(u8 *)addr) : "memory"); + __asm__ __volatile__ ("dcbst %y0" : "=Z"(*(u8 *)addr) :: "memory"); } #endif /* !__ASSEMBLY__ */ #endif /* __KERNEL__ */