From: Mathieu Malaterre <malat@debian.org>
To: LEROY Christophe <christophe.leroy@c-s.fr>
Cc: kvm-ppc@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Paul Mackerras <paulus@samba.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH 14/19] powerpc/altivec: Add missing prototypes for altivec
Date: Wed, 28 Mar 2018 09:26:56 +0200 [thread overview]
Message-ID: <CA+7wUsz-ihu7aoE4UfVhojDjH0pcR8QbVGLCzMyA3RocLJz5-A@mail.gmail.com> (raw)
In-Reply-To: <20180327193323.Horde.S-Hqc40p7JjEsZPPEa3YNg1@messagerie.si.c-s.fr>
On Tue, Mar 27, 2018 at 7:33 PM, LEROY Christophe
<christophe.leroy@c-s.fr> wrote:
> LEROY Christophe <christophe.leroy@c-s.fr> a =C3=A9crit :
>
>
>> Mathieu Malaterre <malat@debian.org> a =C3=A9crit :
>>
>>> Christophe,
>>>
>>> On Sat, Mar 24, 2018 at 9:10 PM, LEROY Christophe
>>> <christophe.leroy@c-s.fr> wrote:
>>>>
>>>> Mathieu Malaterre <malat@debian.org> a =C3=A9crit :
>>>>
>>>>
>>>>> On Fri, Mar 23, 2018 at 1:19 PM, christophe leroy
>>>>> <christophe.leroy@c-s.fr> 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 <malat@debian.org>
>>>>>>> ---
>>>>>>> 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 <asm/xor.h> (powerpc) is pretty much expected to be included
>>> after <include/linux/raid/xor.h>.
>>>
>>> I did not want to tweak <asm/xor.h> 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 <arch/powerpc/include/asm/xor.h=
>
>>> ?
>>
>>
>> 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
>>>>>>
>>>>
>>>>
>
>
next prev parent reply other threads:[~2018-03-28 7:27 UTC|newest]
Thread overview: 98+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-22 20:19 [PATCH 00/19] powerpc/ppc32: make W=1 compilation errors free Mathieu Malaterre
2018-03-22 20:19 ` [PATCH 01/19] powerpc/powermac: Mark variable x as unused Mathieu Malaterre
2018-03-23 9:18 ` christophe leroy
2018-03-28 19:27 ` [PATCH v2 " Mathieu Malaterre
2018-03-29 16:07 ` LEROY Christophe
2018-04-04 20:21 ` Mathieu Malaterre
2018-04-04 20:07 ` [PATCH v3 " Mathieu Malaterre
2018-04-24 14:12 ` Christophe LEROY
2018-05-25 11:41 ` [v3,01/19] " Michael Ellerman
2018-03-22 20:19 ` [PATCH 02/19] " Mathieu Malaterre
2018-03-23 9:38 ` christophe leroy
2018-03-28 19:30 ` [PATCH v2 " Mathieu Malaterre
2018-03-29 16:09 ` LEROY Christophe
2018-06-22 9:46 ` Mathieu Malaterre
2018-08-13 11:22 ` [v2,02/19] " Michael Ellerman
2018-03-22 20:19 ` [PATCH 03/19] powerpc: Mark variables " Mathieu Malaterre
2018-03-23 10:03 ` christophe leroy
2018-03-28 19:33 ` [PATCH v2 " Mathieu Malaterre
2018-03-29 16:14 ` LEROY Christophe
2018-04-05 5:57 ` Michael Ellerman
2018-04-05 7:01 ` LEROY Christophe
2018-04-04 20:08 ` [PATCH v3 03/19] powerpc: Move `path` variable inside DEBUG_PROM Mathieu Malaterre
2018-06-22 9:48 ` Mathieu Malaterre
2018-08-13 11:22 ` [v3,03/19] " Michael Ellerman
2018-04-05 20:26 ` [PATCH v4 03/19] powerpc: Mark variable `l` as unused, remove `path` Mathieu Malaterre
2018-04-06 15:33 ` LEROY Christophe
2018-04-06 18:32 ` Mathieu Malaterre
2018-04-24 19:20 ` christophe leroy
2018-03-22 20:19 ` [PATCH 04/19] powerpc/kvm: Mark variable tmp unused Mathieu Malaterre
2018-03-23 10:08 ` christophe leroy
2018-03-28 19:58 ` [PATCH v2 04/19] powerpc/kvm: Prefer fault_in_pages_readable function Mathieu Malaterre
2018-03-29 16:18 ` LEROY Christophe
2018-05-25 1:59 ` [v2,04/19] " Michael Ellerman
2018-03-22 20:19 ` [PATCH 05/19] powerpc/chrp/setup: Add attribute unused and make some functions static Mathieu Malaterre
2018-03-23 11:01 ` christophe leroy
2018-03-28 19:35 ` [PATCH v2 " Mathieu Malaterre
2018-03-29 16:16 ` LEROY Christophe
2018-04-04 20:09 ` [PATCH v3 05/19] powerpc/chrp/setup: Remove idu_size variable " Mathieu Malaterre
2018-05-25 11:41 ` [v3, " Michael Ellerman
2018-03-22 20:19 ` [PATCH 06/19] powerpc: Make function btext_initialize static Mathieu Malaterre
2018-05-25 11:41 ` [06/19] " Michael Ellerman
2018-03-22 20:19 ` [PATCH 07/19] powerpc/powermac: Make some functions static Mathieu Malaterre
2018-03-23 11:05 ` christophe leroy
2018-03-28 19:39 ` [PATCH v2 " Mathieu Malaterre
2018-06-22 11:29 ` Mathieu Malaterre
2018-08-13 11:22 ` [v2,07/19] " Michael Ellerman
2018-03-22 20:19 ` [PATCH 08/19] powerpc/tau: Make some function static Mathieu Malaterre
2018-05-25 11:41 ` [08/19] " Michael Ellerman
2018-03-22 20:19 ` [PATCH 09/19] powerpc/chrp/pci: Make some functions static Mathieu Malaterre
2018-04-04 20:15 ` [PATCH v3 " Mathieu Malaterre
2018-05-25 11:41 ` [v3,09/19] " Michael Ellerman
2018-03-22 20:19 ` [PATCH 10/19] powerpc/chrp/time: Make some functions static, add missing header include Mathieu Malaterre
2018-05-25 11:41 ` [10/19] " Michael Ellerman
2018-03-22 20:19 ` [PATCH 11/19] powerpc/powermac: Move pmac_pfunc_base_install prototype to header file Mathieu Malaterre
2018-03-23 12:13 ` christophe leroy
2018-03-28 19:11 ` Mathieu Malaterre
2018-03-29 15:51 ` LEROY Christophe
2018-04-04 20:13 ` [PATCH v3 " Mathieu Malaterre
2018-05-25 11:41 ` [v3, " Michael Ellerman
2018-03-22 20:19 ` [PATCH 12/19] powerpc/powermac: Add missing prototype for note_bootable_part() Mathieu Malaterre
2018-03-23 12:14 ` christophe leroy
2018-04-04 20:13 ` [PATCH v3 " Mathieu Malaterre
2018-05-25 11:41 ` [v3, " Michael Ellerman
2018-03-22 20:19 ` [PATCH 13/19] powerpc/52xx: Add missing functions prototypes Mathieu Malaterre
2018-03-23 12:18 ` christophe leroy
2018-04-04 20:12 ` [PATCH v3 " Mathieu Malaterre
2018-05-25 11:41 ` [v3,13/19] " Michael Ellerman
2018-03-22 20:20 ` [PATCH 14/19] powerpc/altivec: Add missing prototypes for altivec Mathieu Malaterre
2018-03-23 12:19 ` christophe leroy
2018-03-23 12:24 ` Mathieu Malaterre
2018-03-24 20:10 ` LEROY Christophe
2018-03-27 8:39 ` Mathieu Malaterre
2018-03-27 15:58 ` LEROY Christophe
2018-03-27 17:33 ` LEROY Christophe
2018-03-28 7:26 ` Mathieu Malaterre [this message]
2018-03-28 11:53 ` Mathieu Malaterre
2018-03-28 18:47 ` [PATCH v2] " Mathieu Malaterre
2018-03-28 18:55 ` [PATCH v3] " Mathieu Malaterre
2018-05-25 11:41 ` [v3] " Michael Ellerman
2018-03-22 20:20 ` [PATCH 15/19] powerpc: Add missing prototype Mathieu Malaterre
2018-03-23 12:20 ` christophe leroy
2018-03-28 19:13 ` Mathieu Malaterre
2018-03-29 16:02 ` LEROY Christophe
2018-04-04 20:18 ` Mathieu Malaterre
2018-04-04 20:11 ` [PATCH v3 " Mathieu Malaterre
2018-05-25 11:41 ` [v3,15/19] " Michael Ellerman
2018-03-22 20:20 ` [PATCH 16/19] powerpc/powermac: Add missing include of header pmac.h Mathieu Malaterre
2018-06-22 9:49 ` Mathieu Malaterre
2018-08-13 11:22 ` [16/19] " Michael Ellerman
2018-03-22 20:20 ` [PATCH 17/19] powerpc/32: Add a missing include header Mathieu Malaterre
2018-05-25 11:41 ` [17/19] " Michael Ellerman
2018-03-22 20:20 ` [PATCH 18/19] powerpc: " Mathieu Malaterre
2018-05-25 11:41 ` [18/19] " Michael Ellerman
2018-03-22 20:20 ` [PATCH 19/19] powerpc/tau: Synchronize function prototypes and body Mathieu Malaterre
2018-03-23 12:22 ` christophe leroy
2018-04-04 20:10 ` [PATCH v3 " Mathieu Malaterre
2018-05-25 11:41 ` [v3,19/19] " Michael Ellerman
2018-05-22 6:28 ` [PATCH 00/19] powerpc/ppc32: make W=1 compilation errors free Mathieu Malaterre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+7wUsz-ihu7aoE4UfVhojDjH0pcR8QbVGLCzMyA3RocLJz5-A@mail.gmail.com \
--to=malat@debian.org \
--cc=christophe.leroy@c-s.fr \
--cc=kvm-ppc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).