Re: [kselftests/powerpc] Primitives test build failure with linux-next

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andy Shevchenko <andy.shevchenko@xxxxxxxxx> writes:
> On Thu, Feb 29, 2024 at 3:53 PM Sachin Sant <sachinp@xxxxxxxxxxxxx> wrote:
>>
>> Powerpc specific selftests (specifically powerpc/primitives) included in linux-next
>> tree fails to build with following error
>>
>> gcc -std=gnu99 -O2 -Wall -Werror -DGIT_VERSION='"next-20240229-0-gf303a3e2bcfb-dirty"' -I/home/sachin/linux-next/tools/testing/selftests/powerpc/include  -I/home/sachin/linux-next/tools/testing/selftests/powerpc/primitives    load_unaligned_zeropad.c ../harness.c  -o /home/sachin/linux-next/tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad
>> In file included from load_unaligned_zeropad.c:26:
>> word-at-a-time.h:7:10: fatal error: linux/bitops.h: No such file or directory
>>     7 | #include <linux/bitops.h>
>>       |          ^~~~~~~~~~~~~~~~
>> compilation terminated.
>>
>> The header file in question was last changed by following commit
>>
>> commit 66a5c40f60f5d88ad8d47ba6a4ba05892853fa1f
>>     kernel.h: removed REPEAT_BYTE from kernel.h
>
> Thanks for the report.
> What is missing here are the steps to reproduce it here. E.g., I have
> an x86_64 machine, I can use QEMU if required.

The patch I just posted should fix it.

Cross building the selftests is not too hard, you need a cross toolchain
with libc. There's some instructions on our wiki[1], the tldr is:

  cd ~/tmp
  wget https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64le-power8/tarballs/powerpc64le-power8--glibc--stable-2023.11-1.tar.bz2
  tar -xf powerpc64le-power8--glibc--stable-2023.11-1.tar.bz2
  export CROSS_COMPILE=$PWD/powerpc64le-power8--glibc--stable-2023.11-1/bin/powerpc64le-linux-
  cd ~/src/linux
  export ARCH=powerpc
  make defconfig
  make headers
  make -C tools/testing/selftests/powerpc

cheers

1: https://github.com/linuxppc/wiki/wiki/Building-powerpc-kernels





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux