Received: by 10.213.65.68 with SMTP id h4csp153594imn; Wed, 28 Mar 2018 00:29:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx4979gzMXrKFZmTe1y+mVkBhG74/ZuPqb9GN265W8IeS/uqomdF/j1y9NhniqyefogqLetwE X-Received: by 2002:a17:902:6ec5:: with SMTP id l5-v6mr2625644pln.113.1522222173798; Wed, 28 Mar 2018 00:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522222173; cv=none; d=google.com; s=arc-20160816; b=L5G8KT4bUzeVYdGpX2MJDcrOp0L2D5veABxJye502xTgC7yfu23s8TjptxqA4gPw72 fGYpHYPbVyZXVd10HnuUzIUjoQfkm5Qyv24WnRoqXgzYt8LmApCG8htKLCIdKx7rckZ/ 2T1XVvDwCFZemFYb+ILugfTvNzfzUSWNZHqttPvT33VRV4/E5jRhZb9NSaS9dpj6Mzkr GeL3EN11zYalVcUveL/Pq5tF8XOpKjJQiw3h5bwodddSF1XiaQ/Tooia1oS36sKnA6Hn 2XyptGOhK7oSeH+BfzOAWny+wYKFeAb0SjoO/ykc2hRoI8sYUPMS0IDJ907cVT44er7D Zz0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=hdFVs8NddJbEqzV/YjQyWoVMp6Z0pRTqSMoNuXJVakM=; b=xM94GvQbnVbGM5TWkWsvmMfBI97eA5rk2n0AtFnpl1D6VUr62mjMVaQlQOiBByGG2F ukaRowQuaePS9VN/9MtjFBrtLGXTNJP2judarWc4/Ja6Gi6QmB1xpGjSDkFa6VG+fBYb jdnyZeF+sfnwhRKmf8IersbRHrribtYThM4KTm7jzHrwOyhl56tsZKnVhm7St4Z1XHws 76dC2kAX5nKvl0PC2YmCLVcRoj5E/nPNx4gfyfeaklAAhsjvYNQ0biXFOcGUetk/GOqV s3dp85m/oR+e3vruRgKLtkPJQyZfP5lfxX+8ztZjyLFo1pHfqt8RnZmdOGjgOlQKGbDO q6IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=e5puP8zN; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s9-v6si3000572plr.42.2018.03.28.00.29.19; Wed, 28 Mar 2018 00:29:33 -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=fail header.i=@gmail.com header.s=20161025 header.b=e5puP8zN; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752756AbeC1H1V (ORCPT + 99 others); Wed, 28 Mar 2018 03:27:21 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:45192 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752716AbeC1H1S (ORCPT ); Wed, 28 Mar 2018 03:27:18 -0400 Received: by mail-oi0-f68.google.com with SMTP id 71-v6so1286267oie.12; Wed, 28 Mar 2018 00:27:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=hdFVs8NddJbEqzV/YjQyWoVMp6Z0pRTqSMoNuXJVakM=; b=e5puP8zNWiM5Dx69TO/W0Ult7AesZeeSDuSPkiRGHo+0pqmVdFFIfDS2Lfr08DV1KH u9JUNfgLzBGYnNFlNg8htOCLcekPq4UkVgdFDvyO9T8Mj9K1ZHoj4/8iszA0W3Kyv5rB 1Vm8nVKcbAcRrdZ5g+LK7ex5loHkrbKFFmFX5vpPGVV2nqwtsLhfOGZRge7eIoGDSlp0 1glhewHYu8x/Jnq1VCSHXnAPY/bu8Xd8S53FwQ+06f2E3WeI5tGYMgx9ybFKq+ByzX5c kKM1wvRKqaGsLNdR7Gp097YRb6JA1CjJg2iqn4Qlmye1MUQCUAzhPBaG2bJHqEBYPASa /aSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=hdFVs8NddJbEqzV/YjQyWoVMp6Z0pRTqSMoNuXJVakM=; b=qEgIvAxQELO3E0V9zNjIFfLaa6hNCKbkoev4IlGKE0ED3YLddQqdLdDSutGbyIkttU DTl1RqKsQcMFa3r2MbSK9lCX1fI75HkNgRdI3p4shtKMkH+I0M6us/bpcTLLqchVgqrc qW0XWcMqwMDFU7i1LT6TJ7Jdt5oiQ+7qXShmKo87ujWlSlVTefrgemMzFuOwZp08Gszg qvTQaIVjanqsH9X+yrh1ylgxRda8EwLP3w+SggEj3uT4BrKNkPLWhJVvQHO33C9BUBWJ wwBce8EmAbwR2+BlxhTqq6TCDLof0eOe6zbWx+E/kDrEs+CIv87TFvCJd+BUNPwYXefv 6vGg== X-Gm-Message-State: ALQs6tAy//TE/gqFAk+AgCsr1Ty/9o2+fnzyW91X4dx37gV7jeEgAKxO uebX9lqpz83gkRJU1TA3CEY5P48fZYtBnac3fe1R1tfx X-Received: by 10.202.9.9 with SMTP id 9mr1405089oij.199.1522222037062; Wed, 28 Mar 2018 00:27:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.138.3.76 with HTTP; Wed, 28 Mar 2018 00:26:56 -0700 (PDT) In-Reply-To: <20180327193323.Horde.S-Hqc40p7JjEsZPPEa3YNg1@messagerie.si.c-s.fr> References: <20180322202007.23088-1-malat@debian.org> <20180322202007.23088-15-malat@debian.org> <97df68d1-d4fe-bf8e-7852-9b418eec042f@c-s.fr> <20180324211020.Horde.kEO4b3mHPV88FKM0OiRT0Q1@messagerie.si.c-s.fr> <20180327175806.Horde.f26UMak3wqEtNtiMmJy51w2@messagerie.si.c-s.fr> <20180327193323.Horde.S-Hqc40p7JjEsZPPEa3YNg1@messagerie.si.c-s.fr> From: Mathieu Malaterre Date: Wed, 28 Mar 2018 09:26:56 +0200 X-Google-Sender-Auth: vysk5OJB65xog8lOtYAX7jkTjHI Message-ID: Subject: Re: [PATCH 14/19] powerpc/altivec: Add missing prototypes for altivec To: LEROY Christophe Cc: kvm-ppc@vger.kernel.org, LKML , Paul Mackerras , linuxppc-dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 27, 2018 at 7:33 PM, LEROY Christophe wrote: > LEROY Christophe a =C3=A9crit : > > >> Mathieu Malaterre a =C3=A9crit : >> >>> Christophe, >>> >>> On Sat, Mar 24, 2018 at 9:10 PM, LEROY Christophe >>> wrote: >>>> >>>> Mathieu Malaterre a =C3=A9crit : >>>> >>>> >>>>> On Fri, Mar 23, 2018 at 1:19 PM, christophe leroy >>>>> wrote: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Le 22/03/2018 =C3=A0 21:20, Mathieu Malaterre a =C3=A9crit : >>>>>>> >>>>>>> >>>>>>> >>>>>>> Some functions prototypes were missing for the non-altivec code. Ad= d >>>>>>> the >>>>>>> missing prototypes directly in xor_vmx, fix warnings treated as >>>>>>> errors >>>>>>> with >>>>>>> W=3D1: >>>>>>> >>>>>>> arch/powerpc/lib/xor_vmx_glue.c:18:6: error: no previous prototyp= e >>>>>>> for >>>>>>> =E2=80=98xor_altivec_2=E2=80=99 [-Werror=3Dmissing-prototypes] >>>>>>> arch/powerpc/lib/xor_vmx_glue.c:29:6: error: no previous prototyp= e >>>>>>> for >>>>>>> =E2=80=98xor_altivec_3=E2=80=99 [-Werror=3Dmissing-prototypes] >>>>>>> arch/powerpc/lib/xor_vmx_glue.c:40:6: error: no previous prototyp= e >>>>>>> for >>>>>>> =E2=80=98xor_altivec_4=E2=80=99 [-Werror=3Dmissing-prototypes] >>>>>>> arch/powerpc/lib/xor_vmx_glue.c:52:6: error: no previous prototyp= e >>>>>>> for >>>>>>> =E2=80=98xor_altivec_5=E2=80=99 [-Werror=3Dmissing-prototypes] >>>>>>> >>>>>>> Signed-off-by: Mathieu Malaterre >>>>>>> --- >>>>>>> arch/powerpc/lib/xor_vmx.h | 14 ++++++++++++++ >>>>>>> 1 file changed, 14 insertions(+) >>>>>>> >>>>>>> diff --git a/arch/powerpc/lib/xor_vmx.h b/arch/powerpc/lib/xor_vmx.= h >>>>>>> index 5c2b0839b179..2173e3c84151 100644 >>>>>>> --- a/arch/powerpc/lib/xor_vmx.h >>>>>>> +++ b/arch/powerpc/lib/xor_vmx.h >>>>>>> @@ -19,3 +19,17 @@ void __xor_altivec_4(unsigned long bytes, unsign= ed >>>>>>> long >>>>>>> *v1_in, >>>>>>> void __xor_altivec_5(unsigned long bytes, unsigned long *v1_in, >>>>>>> unsigned long *v2_in, unsigned long >>>>>>> *v3_in, >>>>>>> unsigned long *v4_in, unsigned long >>>>>>> *v5_in); >>>>>>> + >>>>>>> +void xor_altivec_2(unsigned long bytes, unsigned long *v1_in, >>>>>>> + unsigned long *v2_in); >>>>>>> + >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Only used in one place, should be static instead of adding it in a .= h >>>>>> >>>>>> Same for the other ones. >>>>> >>>>> >>>>> >>>>> $ git grep xor_altivec_2 >>>>> [...] >>>>> arch/powerpc/lib/xor_vmx_glue.c:EXPORT_SYMBOL(xor_altivec_2); >>>>> >>>>> Are you sure I can change this function to static ? >>>> >>>> >>>> >>>> Yes you are right. But in fact those fonctions are already defined in >>>> asm/xor. h >>>> So you just need to add the missing #include >>> >>> >>> I originally tried it, but this leads to: >>> >>> CC arch/powerpc/lib/xor_vmx_glue.o >>> In file included from arch/powerpc/lib/xor_vmx_glue.c:16:0: >>> ./arch/powerpc/include/asm/xor.h:39:15: error: variable >>> =E2=80=98xor_block_altivec=E2=80=99 has initializer but incomplete type >>> static struct xor_block_template xor_block_altivec =3D { >>> ^~~~~~~~~~~~~~~~~~ >>> ./arch/powerpc/include/asm/xor.h:40:2: error: unknown field =E2=80=98na= me=E2=80=99 >>> specified in initializer >>> .name =3D "altivec", >>> ^ >>> [...] >>> >>> The file (powerpc) is pretty much expected to be included >>> after . >>> >>> I did not want to tweak to test for #ifdef _XOR_H just befo= re >>> >>> #ifdef _XOR_H >>> static struct xor_block_template xor_block_altivec =3D { >>> [...] >>> >>> since this seems like a hack to me. >>> >>> Is this ok to test for #ifdef _XOR_H in >>> ? >> >> >> What about including linux/raid/xor.h in asm/xor.h ? This leads to: CALL ../arch/powerpc/kernel/systbl_chk.sh In file included from ../arch/powerpc/include/asm/xor.h:57:0, from ../arch/powerpc/lib/xor_vmx_glue.c:17: ../include/asm-generic/xor.h:688:34: error: =E2=80=98xor_block_32regs=E2=80= =99 defined but not used [-Werror=3Dunused-variable] static struct xor_block_template xor_block_32regs =3D { ^~~~~~~~~~~~~~~~ ../include/asm-generic/xor.h:680:34: error: =E2=80=98xor_block_8regs=E2=80= =99 defined but not used [-Werror=3Dunused-variable] static struct xor_block_template xor_block_8regs =3D { ^~~~~~~~~~~~~~~ In file included from ../arch/powerpc/lib/xor_vmx_glue.c:17:0: ../arch/powerpc/include/asm/xor.h:39:34: error: =E2=80=98xor_block_altivec= =E2=80=99 defined but not used [-Werror=3Dunused-variable] static struct xor_block_template xor_block_altivec =3D { ^~~~~~~~~~~~~~~~~ CALL ../arch/powerpc/kernel/prom_init_check.sh > > Or better: including linux/raid/xor.h then asm/xor.h in xor_vmx_glue.c ? > > Christophe > >> >> Christophe >>> >>> >>>> Christophe >>>> >>>> >>>>> >>>>>> Christophe >>>>>> >>>>>> >>>>>>> +void xor_altivec_3(unsigned long bytes, unsigned long *v1_in, >>>>>>> + unsigned long *v2_in, unsigned long >>>>>>> *v3_in); >>>>>>> + >>>>>>> +void xor_altivec_4(unsigned long bytes, unsigned long *v1_in, >>>>>>> + unsigned long *v2_in, unsigned long >>>>>>> *v3_in, >>>>>>> + unsigned long *v4_in); >>>>>>> + >>>>>>> +void xor_altivec_5(unsigned long bytes, unsigned long *v1_in, >>>>>>> + unsigned long *v2_in, unsigned long >>>>>>> *v3_in, >>>>>>> + unsigned long *v4_in, unsigned long >>>>>>> *v5_in); >>>>>>> >>>>>> >>>>>> --- >>>>>> L'absence de virus dans ce courrier =C3=A9lectronique a =C3=A9t=C3= =A9 v=C3=A9rifi=C3=A9e par le >>>>>> logiciel antivirus Avast. >>>>>> https://www.avast.com/antivirus >>>>>> >>>> >>>> > >