Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp643996ybl; Fri, 9 Aug 2019 11:23:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNoLdoeJZVCt0sUPaL+QsI+UDA5bRIjgF1j7Wtsw74x9ymIffLoL9S2+F8irvcuqhOFTEU X-Received: by 2002:a63:4c0d:: with SMTP id z13mr18564098pga.28.1565374989217; Fri, 09 Aug 2019 11:23:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565374989; cv=none; d=google.com; s=arc-20160816; b=OBiyHpQV9K3UVbSHjLObTdQJSIEEdNhE2yFm685iw81zDlSTE+xy1FMWlk7wffwYmH rAY2bqQ1nK6B2rN2cfmzj9DyVDItktOizgfDiC3yNyFWThrwW2ipl6U28wl6f3ijCexT Q2vfH0NRCggIdnworkhKmPZBHd02uDeoKMkUI+EZscyLpOy7az9naJeAA0dUkt1lVYR4 c4NOCec6HZAuQoSaqcfLe6tMldaqvbVBZiDrv9WMUBYUNmy7JLHsqReeXH/ZPXASgXZr KCxX3cFtzopPRhanhLsIwma3Bv1pEW10UIY9TgeCpLxItijsWeE5D47I1SoNKqR68bHI mdWw== 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 o13si4808998pjr.101.2019.08.09.11.22.54; Fri, 09 Aug 2019 11:23: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; 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 S2407222AbfHISVU (ORCPT + 99 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 Content-Type: text/plain; charset="UTF-8" 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(-) 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__ */ -- 2.23.0.rc1.153.gdeed80330f-goog