All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Victor Cheng-Yen Yang" <cyyang772@andestech.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] hugemmap24: Exclude RISC-V from the powerpc slice layout
Date: Fri, 04 Sep 2026 09:15:04 +0000	[thread overview]
Message-ID: <6a9a8c19.6fb78de1.549f1.a8ee@mx.google.com> (raw)
In-Reply-To: <20260824082350.70245-1-cyyang772@andestech.com>

Hi Vitor,

> Exclude RISC-V with the same way loongarch is excluded from the powerpc
> 1TB slices branch.
> 
> Signed-off-by: Victor Cheng-Yen Yang <cyyang772@andestech.com>
> ---
>  testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c
> index 0de44d58a..882752792 100644
> --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c
> +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c
> @@ -28,7 +28,8 @@ static int init_slice_boundary(int fd)
>  	unsigned long slice_size;
>  	void *p, *heap;
>  	int i;
> -#if defined(__LP64__) && !defined(__aarch64__) && !defined(__loongarch__)
> +#if defined(__LP64__) && !defined(__aarch64__) && !defined(__loongarch__) && \
> +	!defined(__riscv)

This is getting bigger. We can change it by inverting the exclusion.

Instead of expanding a blacklist of non-PowerPC architectures, invert the check
to whitelist the only architecture where 1 TB slices actually exist: 64-bit
PowerPC (similar to how hugemmap07.c checks #ifdef __powerpc64__).

WDYT?

diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c
index 0de44d58a..1d141e6ce 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c
@@ -28,11 +28,11 @@ static int init_slice_boundary(int fd)
 	unsigned long slice_size;
 	void *p, *heap;
 	int i;
-#if defined(__LP64__) && !defined(__aarch64__) && !defined(__loongarch__)
+#if defined(__powerpc64__) || (defined(__powerpc__) && defined(__LP64__))
 	/* powerpc: 1TB slices starting at 1 TB */
 	slice_boundary = 0x10000000000;
 	slice_size = 0x10000000000;
 #else
-	/* powerpc: 256MB slices up to 4GB */
+	/* powerpc (32-bit) and other arches: 256MB slices up to 4GB */
 	slice_boundary = 0x00000000;
 	slice_size = 0x10000000;
 #endif

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      parent reply	other threads:[~2026-09-04  9:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-24  8:23 [LTP] [PATCH] hugemmap24: Exclude RISC-V from the powerpc slice layout Victor Cheng-Yen Yang via ltp
2026-08-24  8:54 ` [LTP] " linuxtestproject.agent
2026-09-04  9:15 ` Andrea Cervesato via ltp [this message]

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=6a9a8c19.6fb78de1.549f1.a8ee@mx.google.com \
    --to=ltp@lists.linux.it \
    --cc=andrea.cervesato@suse.com \
    --cc=cyyang772@andestech.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.