Received: by 10.213.65.68 with SMTP id h4csp347627imn; Wed, 28 Mar 2018 04:55:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx49cKDK9ZxD/KgIAI1Sani/NKFZYpDPdlAkBjDmvg/GzWHUo/w9BEItyFUJQRf779H5uw/BR X-Received: by 2002:a17:902:107:: with SMTP id 7-v6mr3500604plb.374.1522238123601; Wed, 28 Mar 2018 04:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522238123; cv=none; d=google.com; s=arc-20160816; b=Op1xFYKCjQb1u1ckQP+pm3Vl7YlE1PZ6ECL7bd+lwgWyW/GAYBrdztWnGVIEbFTol+ /34ptPGujLh9ji0PARH5hTZdeeL/Jj52UwYSMjQ/16KhHpuSZqLhuOfMdcu9YQinwz0Y 1KpwZ/OLb6xYRY8q/xopzaA9opqIfXlAsDUEy6H7ytHCHTwV0ndoN2LLjwsAHqnqhH0V QD88Hjn5npc4s1W72X301/AlJ9q1uqJkOqHotR9UgOOhzdZ+TpryTShxcpramsrsqGA9 CoBe1CdIgLtczekgNuZwoiarOyACBC4o9pBBQHZHIXYwZIMBufbf3FsepiGWbkgYxskm Setg== 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=77wCC0RpYJX/E3DuCHRIUOjXuSduoY9ieXnmdFcgHFk=; b=B2CH3oemCDYNmMynPO67cqlcB3Gzr3aH4/5mpX5eEKNpkIIpcEoa0lz5zfClr5DoXQ h0icLYckwRthZzYqnPxj1U2bKxQHSMqtAhwq749MdmYx2LeORkD0qkbgYkJSMFZWhQ9k Hcl1ggRa25TlE/xjj0PbQDLazMGDrhIT9E90iOq9151BSQ1TEMP0Hjp+7Z2bjXD4WEyA s1NgJwoarL5hEvLHf1o0DMx4brO0xeEBSZmq82xXXRmog34P4eYt38XAgLERRAV5N9m2 mQ0WF0zZU19940+pou8ry87/nFFY2UkskrnX/k4F11lYdue+sxoiFlby/Sn95ynheUgh MMHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=BxNiydi6; 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 u6-v6si3527412plz.64.2018.03.28.04.55.08; Wed, 28 Mar 2018 04:55:23 -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=BxNiydi6; 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 S1753082AbeC1Lx1 (ORCPT + 99 others); Wed, 28 Mar 2018 07:53:27 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:33185 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752663AbeC1LxW (ORCPT ); Wed, 28 Mar 2018 07:53:22 -0400 Received: by mail-oi0-f66.google.com with SMTP id 126-v6so1879683oig.0 for ; Wed, 28 Mar 2018 04:53:22 -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=77wCC0RpYJX/E3DuCHRIUOjXuSduoY9ieXnmdFcgHFk=; b=BxNiydi6V3mrinThy83LkL3JjbZjFFRrxw+iXKK1L1c9hkpMkoNT4SlnH5d757OVT8 wkFheGzR+aolje8QKNXovIS9PKk1GuTOMbTW3dTIYsXkD4q392vFxcYVziUSiOQFZ52V g/Ng11t5/c0DvFwSBekdRUphEy1LpLuBqKF7/AaQeb+iC9zHm0rb8B+AT3xhOU16Drz0 G2W8qkqMvOngCxjMbQP9uwl/KWLTVouUYzZCX10sgYK2vXzZkge9z8OWYJITmpI8AozK 3HcAersIhUXG7wHsIs5y+Z9z+38rNC+7hrWQEsW9DwQl2gYWJVDYYHRU/sEOVP1x2ORA bMRQ== 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=77wCC0RpYJX/E3DuCHRIUOjXuSduoY9ieXnmdFcgHFk=; b=Jx9th1WANDlenFFL92US6AcJymxjZkI9aIKbNoPFzu7jvLwVlsk0S0Ih4uW4fXhPSs ArJiYPu6lVHk/lH+opaWRRxI4ehR4DwO0+Rijinccn0+VxGIlpCdqkBkVbQGKmcbXvvz dKKMRkDeOX5cQ76JNWBwhiG+iQEhiRwhwsnXxUKKL5MV7t1uvwgsZmpDx09XsNSoAnNI ZIhkFJJcWl8W/CLxVlRaKiioZguwFgI3Yj5ExATfVOuI6VyGfAjs3aTM6URHJn7/Z1Yg zMDmv6Ft9/5A91F6Z5A7yMJHZqle+2cvSczh+eUq6+k0c0MVKapqIPmnYmrIwZPxVpV9 DDkw== X-Gm-Message-State: AElRT7EUuBou90v3ioJRqwlOkMAVeFiYxuNvaO/jjFs2O7esV39ASW/R keuu+dt3rtO1+n415jIkC7MK3sBF7YxYbK9NGfI= X-Received: by 10.202.79.70 with SMTP id d67mr1732854oib.138.1522238001917; Wed, 28 Mar 2018 04:53:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.138.3.76 with HTTP; Wed, 28 Mar 2018 04:53:01 -0700 (PDT) In-Reply-To: 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 13:53:01 +0200 X-Google-Sender-Auth: TaDBkyEnnRYq4ERM-kdoSYiEC4c Message-ID: Subject: Re: [PATCH 14/19] powerpc/altivec: Add missing prototypes for altivec To: LEROY Christophe Cc: 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 Wed, Mar 28, 2018 at 9:26 AM, Mathieu Malaterre wrote= : > 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. A= dd >>>>>>>> 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 prototy= pe >>>>>>>> for >>>>>>>> =E2=80=98xor_altivec_2=E2=80=99 [-Werror=3Dmissing-prototypes] >>>>>>>> arch/powerpc/lib/xor_vmx_glue.c:29:6: error: no previous prototy= pe >>>>>>>> for >>>>>>>> =E2=80=98xor_altivec_3=E2=80=99 [-Werror=3Dmissing-prototypes] >>>>>>>> arch/powerpc/lib/xor_vmx_glue.c:40:6: error: no previous prototy= pe >>>>>>>> for >>>>>>>> =E2=80=98xor_altivec_4=E2=80=99 [-Werror=3Dmissing-prototypes] >>>>>>>> arch/powerpc/lib/xor_vmx_glue.c:52:6: error: no previous prototy= pe >>>>>>>> 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, unsig= ned >>>>>>>> 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 i= n >>>>> 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 typ= e >>>> static struct xor_block_template xor_block_altivec =3D { >>>> ^~~~~~~~~~~~~~~~~~ >>>> ./arch/powerpc/include/asm/xor.h:40:2: error: unknown field =E2=80=98n= ame=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 bef= ore >>>> >>>> #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_altive= c=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 > I'll prepare a patch which moves the prototypes from arch/powerpc/include/asm/xor.h to arch/powerpc/include/asm/xor_altivec.h (new file). I believe this should be the simplest path. >> >> 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 >>>>>>> >>>>> >>>>> >> >>