From: Michael Ellerman <mpe@ellerman.id.au>
To: Andy Shevchenko <andy.shevchenko@gmail.com>,
Sachin Sant <sachinp@linux.ibm.com>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
linux-kselftest@vger.kernel.org, tanzhasanwork@gmail.com
Subject: Re: [kselftests/powerpc] Primitives test build failure with linux-next
Date: Fri, 01 Mar 2024 09:57:17 +1100 [thread overview]
Message-ID: <87le72g9pu.fsf@mail.lhotse> (raw)
In-Reply-To: <CAHp75VekfCq8c9h1k57LRjs2GZQ+ep9SdFbEWbDd98z_ySQ+Lw@mail.gmail.com>
Andy Shevchenko <andy.shevchenko@gmail.com> writes:
> On Thu, Feb 29, 2024 at 3:53 PM Sachin Sant <sachinp@linux.ibm.com> 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
WARNING: multiple messages have this Message-ID (diff)
From: Michael Ellerman <mpe@ellerman.id.au>
To: Andy Shevchenko <andy.shevchenko@gmail.com>,
Sachin Sant <sachinp@linux.ibm.com>
Cc: tanzhasanwork@gmail.com,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
linux-kselftest@vger.kernel.org
Subject: Re: [kselftests/powerpc] Primitives test build failure with linux-next
Date: Fri, 01 Mar 2024 09:57:17 +1100 [thread overview]
Message-ID: <87le72g9pu.fsf@mail.lhotse> (raw)
In-Reply-To: <CAHp75VekfCq8c9h1k57LRjs2GZQ+ep9SdFbEWbDd98z_ySQ+Lw@mail.gmail.com>
Andy Shevchenko <andy.shevchenko@gmail.com> writes:
> On Thu, Feb 29, 2024 at 3:53 PM Sachin Sant <sachinp@linux.ibm.com> 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
next prev parent reply other threads:[~2024-02-29 22:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 13:53 [kselftests/powerpc] Primitives test build failure with linux-next Sachin Sant
2024-02-29 13:53 ` Sachin Sant
2024-02-29 17:14 ` Andy Shevchenko
2024-02-29 17:14 ` Andy Shevchenko
2024-02-29 22:57 ` Michael Ellerman [this message]
2024-02-29 22:57 ` Michael Ellerman
2024-02-29 22:18 ` Michael Ellerman
2024-02-29 22:18 ` Michael Ellerman
2024-03-01 3:57 ` Sachin Sant
2024-03-01 3:57 ` Sachin Sant
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=87le72g9pu.fsf@mail.lhotse \
--to=mpe@ellerman.id.au \
--cc=andy.shevchenko@gmail.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=sachinp@linux.ibm.com \
--cc=tanzhasanwork@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.