All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: Joel Stanley <joel@jms.id.au>,
	buildroot@buildroot.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: "Bernd Kuhls" <bernd.kuhls@t-online.de>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Romain Naour" <romain.naour@gmail.com>,
	"Cédric Le Goater" <clg@kaod.org>
Subject: Re: [Buildroot] [PATCH 3/9] arch/powerpc: Enable powerpc64le only on CPUs that support it
Date: Sun, 18 Sep 2022 12:23:45 +0200	[thread overview]
Message-ID: <c1b32b94-df43-96ad-72e0-8a6592e042fb@mind.be> (raw)
In-Reply-To: <20220729000904.1295295-4-joel@jms.id.au>



On 29/07/2022 02:08, Joel Stanley wrote:
> Invalid configurations lead to build failures, such as trying to enable
> ppc64le for the ppc970:
> 
>    http://autobuild.buildroot.net/results/fda886768fce25ccd9b52b635ff5b13da7ba2d0c/
> 
> In order to run a ppc64le userspace a kernel that runs in this mode is
> required. The only CPU supported in buildroot that can boot a ppc64le
> kernel is Power8, so mark all of the other 64-bit capable CPUs as not
> supporting ppc64le.
> 
> This drops the comment about libc, which is true but doesn't tell the
> whole story.
> 
> Signed-off-by: Joel Stanley <joel@jms.id.au>

  Applied to master with some changes, see below.

> ---
>   arch/Config.in.powerpc | 11 +++++++----
>   1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/Config.in.powerpc b/arch/Config.in.powerpc
> index 8d392bfde814..7c6ae84348e9 100644
> --- a/arch/Config.in.powerpc
> +++ b/arch/Config.in.powerpc
> @@ -71,11 +71,9 @@ config BR2_powerpc_604e
>   	depends on !BR2_ARCH_IS_64
>   config BR2_powerpc_620
>   	bool "620"
> -	# No C library supports this variant on ppc64le
>   	depends on !BR2_powerpc64le
>   config BR2_powerpc_630
>   	bool "630"
> -	# No C library supports this variant on ppc64le
>   	depends on !BR2_powerpc64le
>   config BR2_powerpc_740
>   	bool "740"
> @@ -102,6 +100,7 @@ config BR2_powerpc_860
>   	depends on !BR2_ARCH_IS_64
>   config BR2_powerpc_970
>   	bool "970"
> +	depends on !BR2_powerpc64le

  As suggested by Thomas, I changed this to positive logic. I'll also push a 
follow-up patch that changes the rest of the file to positive logic.

  Could you (or any other powerpc "expert") review the conditions to be sure the 
architecture selection options are correct now?

>   	select BR2_POWERPC_CPU_HAS_ALTIVEC
>   config BR2_powerpc_8540
>   	bool "8540 / e500v1"
> @@ -129,21 +128,25 @@ config BR2_powerpc_e6500
>   	select BR2_POWERPC_CPU_HAS_ALTIVEC
>   config BR2_powerpc_power4
>   	bool "power4"
> -	# No C library supports this variant on ppc64le
>   	depends on !BR2_powerpc64le
>   config BR2_powerpc_power5
>   	bool "power5"
> -	# No C library supports this variant on ppc64le
>   	depends on !BR2_powerpc64le
> +	depends on BR2_ARCH_IS_64

  AFAIU, all POWER CPUs are able to run in 32-bit mode and I believe it's even 
possible to run a 64-bit kernel with 32-bit userspace like on ARM. Is this not true?

  If POWER5+ really can't run in 32-bit mode (or this is not supported by the 
kernel), are you sure that this *is* possible on POWER4?

  In either case, if the current conditions are not correct, please send a 
follow-up patch to fix them even more.


>   config BR2_powerpc_power6
>   	bool "power6"
> +	depends on !BR2_powerpc64le
> +	depends on BR2_ARCH_IS_64

  So here I wrote the condition as

	depends on BR2_powerpc || BR2_powerpc64

because I do believe it supports 32-bit.

  Regards,
  Arnout

>   	select BR2_POWERPC_CPU_HAS_ALTIVEC
>   config BR2_powerpc_power7
>   	bool "power7"
> +	depends on !BR2_powerpc64le
> +	depends on BR2_ARCH_IS_64
>   	select BR2_POWERPC_CPU_HAS_ALTIVEC
>   	select BR2_POWERPC_CPU_HAS_VSX
>   config BR2_powerpc_power8
>   	bool "power8"
> +	depends on BR2_ARCH_IS_64
>   	select BR2_POWERPC_CPU_HAS_ALTIVEC
>   	select BR2_POWERPC_CPU_HAS_VSX
>   endchoice
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2022-09-18 10:23 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29  0:08 [Buildroot] [PATCH 0/9] powerpc: Fix ppc64le configurations Joel Stanley
2022-07-29  0:08 ` [Buildroot] [PATCH 1/9] arch/powerpc: Hide SPE ABI behind CPU type Joel Stanley
2022-07-29  6:48   ` Cédric Le Goater
2022-07-29 21:17   ` Yann E. MORIN
2022-08-03 21:22     ` Thomas Petazzoni via buildroot
2022-08-05  6:05       ` Joel Stanley
2022-08-05 15:46         ` Yann E. MORIN
2022-07-29  0:08 ` [Buildroot] [PATCH 2/9] arch/powerpc: Clarify generic CPUs Joel Stanley
2022-07-29  6:48   ` Cédric Le Goater
2022-07-29 21:25   ` Yann E. MORIN
2022-08-03 21:28   ` Thomas Petazzoni via buildroot
2022-07-29  0:08 ` [Buildroot] [PATCH 3/9] arch/powerpc: Enable powerpc64le only on CPUs that support it Joel Stanley
2022-07-29  6:52   ` Cédric Le Goater
2022-07-29 21:37     ` Yann E. MORIN
2022-07-30 21:18       ` Cédric Le Goater
2022-07-31  6:43         ` Yann E. MORIN
2022-07-29 21:33   ` Yann E. MORIN
2022-08-03 21:32   ` Thomas Petazzoni via buildroot
2022-09-18 10:23   ` Arnout Vandecappelle [this message]
2022-09-20 17:09     ` Cédric Le Goater
2022-09-20 20:32       ` Arnout Vandecappelle
2022-09-18 10:24   ` Arnout Vandecappelle
2022-07-29  0:08 ` [Buildroot] [PATCH 4/9] package/glibc: Use powerpc64le instead of power8 Joel Stanley
2022-07-29  6:52   ` Cédric Le Goater
2022-07-29 21:41   ` Yann E. MORIN
2022-09-18 10:42   ` Arnout Vandecappelle
2022-07-29  0:09 ` [Buildroot] [PATCH 5/9] arch/powerpc: Add Power9 CPU type Joel Stanley
2022-07-29  6:53   ` Cédric Le Goater
2022-07-29 21:42   ` Yann E. MORIN
2022-09-18 10:43   ` Arnout Vandecappelle
2022-07-29  0:09 ` [Buildroot] [PATCH 6/9] arch/powerpc: Add Power10 " Joel Stanley
2022-07-29  6:53   ` Cédric Le Goater
2022-07-29  0:09 ` [Buildroot] [PATCH 7/9] package/mesa3d: Remove force disable of power8 Joel Stanley
2022-07-29  6:54   ` Cédric Le Goater
2022-07-29  0:09 ` [Buildroot] [PATCH 8/9] package/zlib-ng: Revert Power8 special casing Joel Stanley
2022-07-29  6:55   ` Cédric Le Goater
2022-07-29  0:09 ` [Buildroot] [PATCH 9/9] package/openblas: Add Power9 and Power10 targets Joel Stanley
2022-07-29  6:55   ` Cédric Le Goater
2022-08-03 21:07 ` [Buildroot] [PATCH 0/9] powerpc: Fix ppc64le configurations Yann E. MORIN

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=c1b32b94-df43-96ad-72e0-8a6592e042fb@mind.be \
    --to=arnout@mind.be \
    --cc=bernd.kuhls@t-online.de \
    --cc=buildroot@buildroot.org \
    --cc=clg@kaod.org \
    --cc=joel@jms.id.au \
    --cc=mpe@ellerman.id.au \
    --cc=romain.naour@gmail.com \
    --cc=thomas.petazzoni@bootlin.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.