Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7309785imu; Mon, 3 Dec 2018 10:46:05 -0800 (PST) X-Google-Smtp-Source: AFSGD/UtZTNtMWvfr43Ia5B5SlV8Cu/fZJC70IGteQpHt+yIW/kR1OW4HXFn+8aWdbUFKTFRI1m/ X-Received: by 2002:a17:902:6b0c:: with SMTP id o12mr17250922plk.291.1543862764974; Mon, 03 Dec 2018 10:46:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543862764; cv=none; d=google.com; s=arc-20160816; b=pgGw8OyX9BINT34JBqdTqFI+T56t9kd9/rtzdsJbLSCAEuXxG5mKveYUZat05IiNVt 1L2pp1Q0kkEjyuJzMKSFaPVWj2vdD8ml8+tHy20bGnpCdx5/2uGe+1O/h5Ev+lFMAI5l jyQMM+GD8gApbCmf2p11dDkIhTzlxtrodoT6wEHPQ3kz9S124mz7pywRcl2j4ZPjZKPC rRNmoMOzz0U60f5wt4F/QLacWePzs38o/G65dESCRIf2rWSm5p8ifNqq5ENwhIzGG4eG WhLu1S3yzKQ/2ZiaZti6k2uAWP7lh2REbkf+NUjLDOZH94TFJPBVU2eyj/6D6R0ppKil 4ykw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Vz4RpNkAFts865UAXW8DwCyoEd+dqjleopIGrH/AuTc=; b=EdTOZs2Vt0z3lq0jjdi5YvEfD1mVjgJr73bd+mQobF1LvXkMQ7VcC20gagzN0x1ZSt 1gFonX1zKDJycwkbH0As8Cbt8xo1P+ZStgD8tl9JSMah6gMxF8ff4j97kJnHick3F0L8 6tmJE1gclia1mb8Tk8gatMYO8Td74LqwlMxsZ8i+RFvTzYFg1ToR1JDKYrfp2xOgf1Ng H/g9wxi22XTkWk8B/CrMWgl9QHUCfA52YajN+ZZN1cnSaVkG3lhwoNh4z4YlNyXLyalR PoFER1oOevzJB5TMTpAxIKaqRdID6kkxV9LNUN6cxL//kI1+vd9zfKqhxUGSySMUQLMc ByKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=MpvNoSUA; 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 k2si13215525pgh.63.2018.12.03.10.45.49; Mon, 03 Dec 2018 10:46:04 -0800 (PST) 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=MpvNoSUA; 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 S1726812AbeLCSpS (ORCPT + 99 others); Mon, 3 Dec 2018 13:45:18 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:38551 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726365AbeLCSpS (ORCPT ); Mon, 3 Dec 2018 13:45:18 -0500 Received: by mail-pl1-f196.google.com with SMTP id e5so6911085plb.5 for ; Mon, 03 Dec 2018 10:45:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Vz4RpNkAFts865UAXW8DwCyoEd+dqjleopIGrH/AuTc=; b=MpvNoSUAkZNzT9UDKsFED7+PSWmlGIKGTyin/3c6lY09+HFuDaQiWQZlGcbjXfjrKM d3tveLhB+nGuR45U8IoYFsgJfykUgiwxWmXc5D1UzwwviIw1QKD4HPyWI8aJZnP7pin9 QN6Gwoim2yL0kCFeAO71NeL4r5SSUkypfyUyYf5+ZTuzCNnBUOj1RhgGYnpGU8w30r6P FVFtLNtynLG253MLslHNvI9r1gHvQnX1h3dTzE8VlS8wtjmYhHhi0IK31sVW1H2AmMmo uhUO5gJW9c4XLYzMi8xWDD7TSi9RyIbeux5xTzu8j6CbawpKsLAfqYpjA4bn7LJr9uvM SFaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Vz4RpNkAFts865UAXW8DwCyoEd+dqjleopIGrH/AuTc=; b=d0XTOnnv/kcH+HJnfm1EIDj+0KJfe9ATPNhvfOFUc8ndux+e8++7Inuf4uD6It0cJH 5aoXdYxnxsB3amaGbkNU1ejK8vWxGG1WWt75ihBJGmM+mStlfBDckJJGV8D7GhO7jbJP NCVr2S6x9WH1ia/NO1pWnbgWoZiz7EEv38sqSc/Me0NwgfhEdPVSWLeBrJXlPN6v2fYS zpQjHnfxqDCxiaMxpM327k6HMsg/CxEl6VAD2uet/x+eih2DpyOwfdqgcKwHqjN0TTnH qby6nd3bcGRMBwKt3AFI0+Xw40ZV0Jm3iBd1C3BLxPJP64dcJxxIH9JGC5BZ4aa/Omax eWlw== X-Gm-Message-State: AA+aEWbM2qu7/7Wy4f6+0uy+y4TbgZCpjo/gVWEPMIdns0T85q65Yy5c zD2HjPYB4gZLLkwb4ebnyu6uoFVw8DfsHb49pT5prFsWyWg= X-Received: by 2002:a17:902:29ab:: with SMTP id h40mr16898432plb.238.1543862712734; Mon, 03 Dec 2018 10:45:12 -0800 (PST) MIME-Version: 1.0 References: <20181102004455.10157-1-joel@jms.id.au> In-Reply-To: From: Nick Desaulniers Date: Mon, 3 Dec 2018 10:45:01 -0800 Message-ID: Subject: Re: [PATCH v2] raid6/ppc: Fix build for clang To: joel@jms.id.au Cc: mpe@ellerman.id.au, LKML , linuxppc-dev@lists.ozlabs.org, Arnd Bergmann , Kees Cook , jji@us.ibm.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 On Mon, Dec 3, 2018 at 2:24 AM Joel Stanley wrote: > > On Sat, 3 Nov 2018 at 04:04, Nick Desaulniers wrote: > > > > On Thu, Nov 1, 2018 at 5:45 PM Joel Stanley wrote: > > > > > > We cannot build these files with clang as it does not allow altivec > > > instructions in assembly when -msoft-float is passed. > > > > > > Jinsong Ji wrote: > > > > We currently disable Altivec/VSX support when enabling soft-float. So > > > > any usage of vector builtins will break. > > > > > > > > Enable Altivec/VSX with soft-float may need quite some clean up work, so > > > > I guess this is currently a limitation. > > > > > > > > Removing -msoft-float will make it work (and we are lucky that no > > > > floating point instructions will be generated as well). > > > > > > This is a workaround until the issue is resolved in clang. > > > > > > Link: https://bugs.llvm.org/show_bug.cgi?id=31177 > > > Link: https://github.com/ClangBuiltLinux/linux/issues/239 > > > Signed-off-by: Joel Stanley > > > --- > > > v2: fix typo in comment, thanks Jinsong > > > > > > lib/raid6/Makefile | 15 +++++++++++++++ > > > 1 file changed, 15 insertions(+) > > > > > > diff --git a/lib/raid6/Makefile b/lib/raid6/Makefile > > > index 2f8b61dfd9b0..7ed43eaa02ef 100644 > > > --- a/lib/raid6/Makefile > > > +++ b/lib/raid6/Makefile > > > @@ -18,6 +18,21 @@ quiet_cmd_unroll = UNROLL $@ > > > > > > ifeq ($(CONFIG_ALTIVEC),y) > > > altivec_flags := -maltivec $(call cc-option,-mabi=altivec) > > > + > > > +ifdef CONFIG_CC_IS_CLANG > > > +# clang ppc port does not yet support -maltivec when -msoft-float is > > > +# enabled. A future release of clang will resolve this > > > +# https://bugs.llvm.org/show_bug.cgi?id=31177 > > > +CFLAGS_REMOVE_altivec1.o += -msoft-float > > > +CFLAGS_REMOVE_altivec2.o += -msoft-float > > > +CFLAGS_REMOVE_altivec4.o += -msoft-float > > > +CFLAGS_REMOVE_altivec8.o += -msoft-float > > > +CFLAGS_REMOVE_altivec8.o += -msoft-float > > > +CFLAGS_REMOVE_vpermxor1.o += -msoft-float > > > +CFLAGS_REMOVE_vpermxor2.o += -msoft-float > > > +CFLAGS_REMOVE_vpermxor4.o += -msoft-float > > > +CFLAGS_REMOVE_vpermxor8.o += -msoft-float > > > +endif > > > > Hi Joel, thanks for this patch! My same thoughts about > > CONFIG_CC_IS_CLANG vs cc-option from > > https://lists.ozlabs.org/pipermail/linuxppc-dev/2018-November/180939.html > > apply here as well. I don't feel strongly about either though. What > > are your thoughts? > > I'm not sure that we can test for this one with cc-option. The result > of having -maltivec with -msoft-float is a error about the internals > of clang, which isn't something that kbuild is set up to test for. As in clang itself crashes, and cc-option/kbuild can't handle that gracefully? > > When clang is fixed to allow this combination we will still build this > code in the same way, so in that sense it fails "open". > > Cheers, > > Joel -- Thanks, ~Nick Desaulniers