Skip to content

Commit

Permalink
lib/raid6: Include <asm/ppc-opcode.h> for VPERMXOR
Browse files Browse the repository at this point in the history
On Ubuntu 21.10 (ppc64le) building raid6test with gcc (Ubuntu
11.2.0-7ubuntu2) 11.2.0 fails with the error below.

    gcc -I.. -I ../../../include -g -O2                       \
             -I../../../arch/powerpc/include -DCONFIG_ALTIVEC \
             -c -o vpermxor1.o vpermxor1.c
    vpermxor1.c: In function ‘raid6_vpermxor1_gen_syndrome_real’:
    vpermxor1.c:64:29: error: expected string literal before ‘VPERMXOR’
       64 |   asm(VPERMXOR(%0,%1,%2,%3):"=v"(wq0):"v"(gf_high), "v"(gf_low), "v"(wq0));
          |       ^~~~~~~~
    make: *** [Makefile:58: vpermxor1.o] Error 1

So, include the header asm/ppc-opcode.h defining this macro also when
not building the Linux kernel but only this too.

Cc: Matt Brown <matthew.brown.dev@gmail.com>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Song Liu <song@kernel.org>
  • Loading branch information
paulmenzel authored and liu-song-6 committed Mar 8, 2022
1 parent 633174a commit 5b401e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/raid6/vpermxor.uc
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#ifdef CONFIG_ALTIVEC

#include <altivec.h>
#include <asm/ppc-opcode.h>
#ifdef __KERNEL__
#include <asm/cputable.h>
#include <asm/ppc-opcode.h>
#include <asm/switch_to.h>
#endif

Expand Down

0 comments on commit 5b401e4

Please sign in to comment.