Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4465123ybb; Tue, 14 Apr 2020 07:51:11 -0700 (PDT) X-Google-Smtp-Source: APiQypJcWIZM4TKg+5kz5QvxpykCyQloCcav9JNPKTyh09zUCAraAI4sIbLJZxxPCiRmg39zzZCq X-Received: by 2002:a17:906:138c:: with SMTP id f12mr477457ejc.35.1586875871187; Tue, 14 Apr 2020 07:51:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586875871; cv=none; d=google.com; s=arc-20160816; b=IMu/DJL4AHkf6pDCtk39jOB3tzl4v2BTjLGAHB77T0lAQ6NYFp5ILERZhkm1bCQ36B WBuH0FJzk6eaJHtbLF1LLkilSaqxh9FfIUfusjoql4d+XoXHaPYX709UFF+m0NyeHqjJ n74EXuXrWZJYdZk+OOVw/YqfkqWoVHETiPvRnpDFIjZP3cNr/BpOYt2/Jshbx95EqkVn 3akrxdq/rqldH310iSjq1EgK8Mt4pr7BVeMc2S0ojyzKRWV3R24mc9Dnncxj4R7h/lZk hLT48r74y0s0ayAFEwJyr/pQuhankcihUo683YnUiZ8j5405bpNWi8Av3WgwBqSMF+iG xsiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=E6UJPcTz/tVP37tS77PKtG9/zYdUSK0VQvF6Hi0BWQs=; b=TzUtEFaDSHMgDkTUvozH8TRWHKMaKHbcyFh3QtzuAwfAzw/1ZGPWFIBPMKbEn3/UiV Ny8C/TpywC6VlO3erkwj/TNHE1qG/iW8/JXSsDcprti2lCXEngSKUyOX9lWVyF2KwgqK 8yVk+cBusfI6suC6NataJ2vw0VqVpMnbJrlmNG6GmSyDZaltn+7gAYWakX08QN6xaLn8 co6oeZl8iRxloyVc3mjSV3Vn9S8fclPrkfVbEhyklEawA5m8D0faAT6ERXTnC9Wg3h00 S4i0d6Psgd6eZek+WBlHowyQZgXfXPu6cBPrCHRQJtCHskrRPaOld+y+zBN0Y/gkkauD sd4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=rpaI2zP2; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si9060358ejj.79.2020.04.14.07.50.43; Tue, 14 Apr 2020 07:51:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=rpaI2zP2; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406709AbgDNHgo (ORCPT + 99 others); Tue, 14 Apr 2020 03:36:44 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:53091 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729308AbgDNHgn (ORCPT ); Tue, 14 Apr 2020 03:36:43 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 491ckH0Vbkz9sSG; Tue, 14 Apr 2020 17:36:39 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1586849799; bh=Z3MRAqxwicBr0S1w/2Qr9XiB1/u6yaHnOQXSasQJRHI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=rpaI2zP2fU7SqG0Y9/40na1+0ilpHOKsMF/UfDUwWKr1hy3unjDVx67BBfGU1RU0e oGH6i0+X7wwSCcgqmZov+wzM8EDreszRVteyeZzjLk0rWfOjZtp7B8KzwIVeYMpW+J ACmj6QtqU7Ey0OmdCg5vIMzMcbfDUeaCVNBd/ea7pkDtJAjaJVQghm+j4tnVjLNwCj fHyndQbTkAwqsZAT97XerASPsE8QVXsH7b1xOm5s2NQvpb943ClSbnku2akDUcISN7 1lhvbcd+XovyFkrPHxxd6ELMGXuGrz+iWaiPp5u2sJm/TXB8mayqjASOfFPXAWky2m qb+sIMQsyRzTQ== From: Michael Ellerman To: Nathan Chancellor , Herbert Xu Cc: Benjamin Herrenschmidt , Paul Mackerras , linux-crypto@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor , kbuild test robot Subject: Re: [PATCH] lib/mpi: Fix building for powerpc with clang In-Reply-To: <20200413195041.24064-1-natechancellor@gmail.com> References: <20200413195041.24064-1-natechancellor@gmail.com> Date: Tue, 14 Apr 2020 17:36:52 +1000 Message-ID: <87blnujz6z.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Nathan Chancellor writes: > 0day reports over and over on an powerpc randconfig with clang: > > lib/mpi/generic_mpih-mul1.c:37:13: error: invalid use of a cast in a > inline asm context requiring an l-value: remove the cast or build with > -fheinous-gnu-extensions > > Remove the superfluous casts, which have been done previously for x86 > and arm32 in commit dea632cadd12 ("lib/mpi: fix build with clang") and > commit 7b7c1df2883d ("lib/mpi/longlong.h: fix building with 32-bit > x86"). > > Reported-by: kbuild test robot > Link: https://github.com/ClangBuiltLinux/linux/issues/991 > Signed-off-by: Nathan Chancellor > --- > > Herbet seems to take lib/mpi patches but there does not seem to be a > formal maintainer so Michael could take it since it is just a powerpc > thing. Oh you mean it's inside: #if (defined(_ARCH_PPC) || defined(_IBMR2)) && W_TYPE_SIZE == 32 I don't mind taking it with Herbet's ack, or he could just merge it. cheers > > lib/mpi/longlong.h | 34 +++++++++++++++++----------------- > 1 file changed, 17 insertions(+), 17 deletions(-) > > diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h > index 2dceaca27489..891e1c3549c4 100644 > --- a/lib/mpi/longlong.h > +++ b/lib/mpi/longlong.h > @@ -722,22 +722,22 @@ do { \ > do { \ > if (__builtin_constant_p(bh) && (bh) == 0) \ > __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \ > - : "=r" ((USItype)(sh)), \ > - "=&r" ((USItype)(sl)) \ > + : "=r" (sh), \ > + "=&r" (sl) \ > : "%r" ((USItype)(ah)), \ > "%r" ((USItype)(al)), \ > "rI" ((USItype)(bl))); \ > else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \ > __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \ > - : "=r" ((USItype)(sh)), \ > - "=&r" ((USItype)(sl)) \ > + : "=r" (sh), \ > + "=&r" (sl) \ > : "%r" ((USItype)(ah)), \ > "%r" ((USItype)(al)), \ > "rI" ((USItype)(bl))); \ > else \ > __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \ > - : "=r" ((USItype)(sh)), \ > - "=&r" ((USItype)(sl)) \ > + : "=r" (sh), \ > + "=&r" (sl) \ > : "%r" ((USItype)(ah)), \ > "r" ((USItype)(bh)), \ > "%r" ((USItype)(al)), \ > @@ -747,36 +747,36 @@ do { \ > do { \ > if (__builtin_constant_p(ah) && (ah) == 0) \ > __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \ > - : "=r" ((USItype)(sh)), \ > - "=&r" ((USItype)(sl)) \ > + : "=r" (sh), \ > + "=&r" (sl) \ > : "r" ((USItype)(bh)), \ > "rI" ((USItype)(al)), \ > "r" ((USItype)(bl))); \ > else if (__builtin_constant_p(ah) && (ah) == ~(USItype) 0) \ > __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \ > - : "=r" ((USItype)(sh)), \ > - "=&r" ((USItype)(sl)) \ > + : "=r" (sh), \ > + "=&r" (sl) \ > : "r" ((USItype)(bh)), \ > "rI" ((USItype)(al)), \ > "r" ((USItype)(bl))); \ > else if (__builtin_constant_p(bh) && (bh) == 0) \ > __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \ > - : "=r" ((USItype)(sh)), \ > - "=&r" ((USItype)(sl)) \ > + : "=r" (sh), \ > + "=&r" (sl) \ > : "r" ((USItype)(ah)), \ > "rI" ((USItype)(al)), \ > "r" ((USItype)(bl))); \ > else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \ > __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \ > - : "=r" ((USItype)(sh)), \ > - "=&r" ((USItype)(sl)) \ > + : "=r" (sh), \ > + "=&r" (sl) \ > : "r" ((USItype)(ah)), \ > "rI" ((USItype)(al)), \ > "r" ((USItype)(bl))); \ > else \ > __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \ > - : "=r" ((USItype)(sh)), \ > - "=&r" ((USItype)(sl)) \ > + : "=r" (sh), \ > + "=&r" (sl) \ > : "r" ((USItype)(ah)), \ > "r" ((USItype)(bh)), \ > "rI" ((USItype)(al)), \ > @@ -787,7 +787,7 @@ do { \ > do { \ > USItype __m0 = (m0), __m1 = (m1); \ > __asm__ ("mulhwu %0,%1,%2" \ > - : "=r" ((USItype) ph) \ > + : "=r" (ph) \ > : "%r" (__m0), \ > "r" (__m1)); \ > (pl) = __m0 * __m1; \ > > base-commit: 8f3d9f354286745c751374f5f1fcafee6b3f3136 > -- > 2.26.0