diff mbox series

[15/18] torture: Add init-program support for loongarch

Message ID 20230717182337.1098991-15-paulmck@kernel.org (mailing list archive)
State New, archived
Headers show
Series Torture-test scripting updates for v6.6 | expand

Commit Message

Paul E. McKenney July 17, 2023, 6:23 p.m. UTC
This commit adds the __loongarch__, __loongarch_lp64, and
__loongarch_double_float targets to rcutorture's mkinitrd.sh
script in order to allow nolibc init programs for loongarch.

Cc: Feiyang Chen <chenfeiyang@loongson.cn>
Cc: Huacai Chen <chenhuacai@loongson.cn>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/mkinitrd.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Feiyang Chen July 18, 2023, 2:56 a.m. UTC | #1
On Tue, Jul 18, 2023 at 2:23 AM Paul E. McKenney <paulmck@kernel.org> wrote:
>
> This commit adds the __loongarch__, __loongarch_lp64, and
> __loongarch_double_float targets to rcutorture's mkinitrd.sh
> script in order to allow nolibc init programs for loongarch.
>
> Cc: Feiyang Chen <chenfeiyang@loongson.cn>
> Cc: Huacai Chen <chenhuacai@loongson.cn>
> Cc: Willy Tarreau <w@1wt.eu>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> ---
>  tools/testing/selftests/rcutorture/bin/mkinitrd.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/rcutorture/bin/mkinitrd.sh b/tools/testing/selftests/rcutorture/bin/mkinitrd.sh
> index 3af3a86a0091..e7e23615dbe3 100755
> --- a/tools/testing/selftests/rcutorture/bin/mkinitrd.sh
> +++ b/tools/testing/selftests/rcutorture/bin/mkinitrd.sh
> @@ -63,7 +63,8 @@ ___EOF___
>  # build using nolibc on supported archs (smaller executable) and fall
>  # back to regular glibc on other ones.
>  if echo -e "#if __x86_64__||__i386__||__i486__||__i586__||__i686__" \
> -           "||__ARM_EABI__||__aarch64__||__s390x__\nyes\n#endif" \
> +           "||__ARM_EABI__||__aarch64__||__s390x__"\
> +          "||__loongarch__||__loongarch_lp64||__loongarch_double_float\nyes\n#endif" \

Hi, Paul,

Thank you for the patch, but I believe adding only the __loongarch__
should be sufficient.

Thanks,
Feiyang

>     | ${CROSS_COMPILE}gcc -E -nostdlib -xc - \
>     | grep -q '^yes'; then
>         # architecture supported by nolibc
> --
> 2.40.1
Paul E. McKenney July 18, 2023, 6:41 p.m. UTC | #2
On Tue, Jul 18, 2023 at 10:56:06AM +0800, Feiyang Chen wrote:
> On Tue, Jul 18, 2023 at 2:23 AM Paul E. McKenney <paulmck@kernel.org> wrote:
> >
> > This commit adds the __loongarch__, __loongarch_lp64, and
> > __loongarch_double_float targets to rcutorture's mkinitrd.sh
> > script in order to allow nolibc init programs for loongarch.
> >
> > Cc: Feiyang Chen <chenfeiyang@loongson.cn>
> > Cc: Huacai Chen <chenhuacai@loongson.cn>
> > Cc: Willy Tarreau <w@1wt.eu>
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > ---
> >  tools/testing/selftests/rcutorture/bin/mkinitrd.sh | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/rcutorture/bin/mkinitrd.sh b/tools/testing/selftests/rcutorture/bin/mkinitrd.sh
> > index 3af3a86a0091..e7e23615dbe3 100755
> > --- a/tools/testing/selftests/rcutorture/bin/mkinitrd.sh
> > +++ b/tools/testing/selftests/rcutorture/bin/mkinitrd.sh
> > @@ -63,7 +63,8 @@ ___EOF___
> >  # build using nolibc on supported archs (smaller executable) and fall
> >  # back to regular glibc on other ones.
> >  if echo -e "#if __x86_64__||__i386__||__i486__||__i586__||__i686__" \
> > -           "||__ARM_EABI__||__aarch64__||__s390x__\nyes\n#endif" \
> > +           "||__ARM_EABI__||__aarch64__||__s390x__"\
> > +          "||__loongarch__||__loongarch_lp64||__loongarch_double_float\nyes\n#endif" \
> 
> Hi, Paul,
> 
> Thank you for the patch, but I believe adding only the __loongarch__
> should be sufficient.

Very well, I will remove the others on my next rebase with attribution.

And thank you for looking this over!  Especially as I have no way
to test it.  ;-)

							Thanx, Paul

> Thanks,
> Feiyang
> 
> >     | ${CROSS_COMPILE}gcc -E -nostdlib -xc - \
> >     | grep -q '^yes'; then
> >         # architecture supported by nolibc
> > --
> > 2.40.1
diff mbox series

Patch

diff --git a/tools/testing/selftests/rcutorture/bin/mkinitrd.sh b/tools/testing/selftests/rcutorture/bin/mkinitrd.sh
index 3af3a86a0091..e7e23615dbe3 100755
--- a/tools/testing/selftests/rcutorture/bin/mkinitrd.sh
+++ b/tools/testing/selftests/rcutorture/bin/mkinitrd.sh
@@ -63,7 +63,8 @@  ___EOF___
 # build using nolibc on supported archs (smaller executable) and fall
 # back to regular glibc on other ones.
 if echo -e "#if __x86_64__||__i386__||__i486__||__i586__||__i686__" \
-           "||__ARM_EABI__||__aarch64__||__s390x__\nyes\n#endif" \
+           "||__ARM_EABI__||__aarch64__||__s390x__"\
+	   "||__loongarch__||__loongarch_lp64||__loongarch_double_float\nyes\n#endif" \
    | ${CROSS_COMPILE}gcc -E -nostdlib -xc - \
    | grep -q '^yes'; then
 	# architecture supported by nolibc