Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3835204ybi; Mon, 29 Jul 2019 13:34:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWIgT8z5kqCy9qLci69Dc7+ov7KyLemt2fDWh8XT4KPtJKUhp6gpKNeYZWLwAd4eRJ/5U2 X-Received: by 2002:a17:902:9041:: with SMTP id w1mr113928612plz.132.1564432490099; Mon, 29 Jul 2019 13:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564432490; cv=none; d=google.com; s=arc-20160816; b=eYCFAkUcIkqi0q+tMMZ5jOLYgnmC+WEPFjYhggWvLV2e3AEAEMCfJj1MvJOK8hdYgP idfmIdQ3IRADJswQwcBLf6a3Tn8UbYWD00Dq495BW6AYLBxOwgRaUbJ8QO/yo6VgHyYn k+qVRLZnLqiPWszRRNFFnRwftHo8fvkyIDe2D5M+W/BfCCNrFEbplUGe4U9nSfmfdd+I htapX/scZHb8F46tyMSCbZvLUeB4qe6oR4qrrCbkTC1nKXCJJS8JXN4pX8XDbc10VAIR JaZIvjMrgI+K/dxF30TlFZFQNlBuzHOofjT4SFzslOH0X5gG3Q7pTktzB+v4zTdGIp1p 2aRw== 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=Ee1tMJewpz3aSk+3Cf8f90eAN6SRg/eYiUnStRjgYLc=; b=YA754z4MYx8Ie+/ABsjtlucuM0DtiqV3y3RyIU4p5WMn2sViFZ2sunCc+wZJtLrzuM CgnRARXYA9kyicojME6Vg2iJRRw4PLS5wLFeCvoAmNyowIH73XT6mRkOlHyiHnzmh0qx EkMm/Y5GaqoojG6honqqfr1Vkd7UbQLI3yWAGLuKvDmMQQG2brFgR4QAFmzX9us6N+oj ZPrTocag1PP5EmyXdSXmAOhwM3qthysRT8kJIpbcu7PACQaVmVCe4MzTGQGhU5M9PN3e i0efsX9AZl/ICxYm7CWGF3iJXZuRukI/5xAo6g2Vtl3BhRIzZE9jBdYaSaHiUudkG7y/ ifAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GKAMRd+s; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z18si25454007pjt.94.2019.07.29.13.34.30; Mon, 29 Jul 2019 13:34:50 -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=@gmail.com header.s=20161025 header.b=GKAMRd+s; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728546AbfG2Ucv (ORCPT + 99 others); Mon, 29 Jul 2019 16:32:51 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:50370 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728189AbfG2Ucv (ORCPT ); Mon, 29 Jul 2019 16:32:51 -0400 Received: by mail-wm1-f68.google.com with SMTP id v15so55051065wml.0 for ; Mon, 29 Jul 2019 13:32:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Ee1tMJewpz3aSk+3Cf8f90eAN6SRg/eYiUnStRjgYLc=; b=GKAMRd+sTnkw9Z5FKHUDESOtOokR4c4LKf+jO5xxjeSjB57EumDZ/CxDxRuPx5o04c OOkO4iV+suXKl3yH0dFExABiXBZteawHydX44sNNpKwCoNqPkRrjAcNWaUL1JPwHiXDt i9ODh5Q9p+tG2eaVD37/+XAMw/WcEH36Yo9Z+UvpDZ7FUdKsKch/axOhYZPg57pKoeQS Hyb4Uzezdex64lvLHXl5cVC0f2v1lfQan8CB1xPFNR6buLIGB/bq7uby93buNGR9leQB E7IXah2txsckO3Ju25p+/cJv0doqIxdkhbzw3zM+4CkbAf4HdVfFDABA/5uKlCk03eHY uKyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Ee1tMJewpz3aSk+3Cf8f90eAN6SRg/eYiUnStRjgYLc=; b=DwFg0tGFjwMHWQ+B8zFwdBCNoFeEfTh1TR0vRIFjzr3A584Bbe0XAvwiVR8HeQM879 rTatJZXSSTbgvLYp74pYzxBpOQknLjL63gq+LXPrpoZNEc/t0exK3GbHOAoQx3pR1GiF xPxqHEjrWitm/bmli1y6bmc7ZtRGRCj2qVjq2qGPXi6b3N/blwnJ+pdcA+QKEAFp8GHN NTilO2WFPqDtrPAEeRcxgCoqPYDkL9zPIyymL/J0of7jrU081MBYUnJBheDFBAjxK7o7 6iSzn+S8IwxRS8dsas/RkGc0HHuQjpshcPeHtlfbFn0MsqbDyUx9cAV1ruKlOqcE6LX5 Bkbw== X-Gm-Message-State: APjAAAVATCj1wu3MMqkNS/VSnJKxjHkyk1XyZAsj+2edhw0smyDiDyfg e7FzcPuCYAjGsyjm97BEd0A= X-Received: by 2002:a1c:a019:: with SMTP id j25mr100975707wme.95.1564432368772; Mon, 29 Jul 2019 13:32:48 -0700 (PDT) Received: from archlinux-threadripper ([2a01:4f8:222:2f1b::2]) by smtp.gmail.com with ESMTPSA id t24sm56680198wmj.14.2019.07.29.13.32.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 13:32:48 -0700 (PDT) Date: Mon, 29 Jul 2019 13:32:46 -0700 From: Nathan Chancellor To: Nick Desaulniers Cc: mpe@ellerman.id.au, christophe.leroy@c-s.fr, segher@kernel.crashing.org, arnd@arndb.de, kbuild test robot , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] powerpc: workaround clang codegen bug in dcbz Message-ID: <20190729203246.GA117371@archlinux-threadripper> References: <20190729202542.205309-1-ndesaulniers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190729202542.205309-1-ndesaulniers@google.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 29, 2019 at 01:25:41PM -0700, Nick Desaulniers wrote: > Commit 6c5875843b87 ("powerpc: slightly improve cache helpers") exposed > what looks like a codegen bug in Clang's handling of `%y` output > template with `Z` constraint. This is resulting in panics during boot > for 32b powerpc builds w/ Clang, as reported by our CI. > > Add back the original code that worked behind a preprocessor check for > __clang__ until we can fix LLVM. > > Further, it seems that clang allnoconfig builds are unhappy with `Z`, as > reported by 0day bot. This is likely because Clang warns about inline > asm constraints when the constraint requires inlining to be semantically > valid. > > Link: https://bugs.llvm.org/show_bug.cgi?id=42762 > Link: https://github.com/ClangBuiltLinux/linux/issues/593 > Link: https://lore.kernel.org/lkml/20190721075846.GA97701@archlinux-threadripper/ > Debugged-by: Nathan Chancellor > Reported-by: Nathan Chancellor > Reported-by: kbuild test robot > Suggested-by: Nathan Chancellor > Signed-off-by: Nick Desaulniers > --- > Alternatively, we could just revert 6c5875843b87. It seems that GCC > generates the same code for these functions for out of line versions. > But I'm not sure how the inlined code generated would be affected. For the record: https://godbolt.org/z/z57VU7 This seems consistent with what Michael found so I don't think a revert is entirely unreasonable. Either way: Reviewed-by: Nathan Chancellor