diff mbox series

hugemmap24: loongarch:Add __longarch__ for compatibility with Loongarch

Message ID 20231031015301.355147-1-wangxuewen@kylinos.cn
State Superseded
Headers show
Series hugemmap24: loongarch:Add __longarch__ for compatibility with Loongarch | expand

Commit Message

wangxuewen@kylinos.cn Oct. 31, 2023, 1:53 a.m. UTC
From: wangxuewen <wangxuewen@kylinos.cn>

This allows for a lower address branch on the Longarch platform.

./hugemmap24
tst_hugepage.c:83: TINFO: 4 hugepage(s) reserved
tst_test.c:1560: TINFO: Timeout per run is 0h 00m 30s
hugemmap24.c:64: TINFO: can't use slice_boundary: 0x20000000000: EINVAL (22)
hugemmap24.c:64: TINFO: can't use slice_boundary: 0x30000000000: EINVAL (22)
hugemmap24.c:64: TINFO: can't use slice_boundary: 0x40000000000: EINVAL (22)
hugemmap24.c:64: TINFO: can't use slice_boundary: 0x50000000000: EINVAL (22)
hugemmap24.c:64: TINFO: can't use slice_boundary: 0x60000000000: EINVAL (22)
hugemmap24.c:64: TINFO: can't use slice_boundary: 0x70000000000: EINVAL (22)
hugemmap24.c:64: TINFO: can't use slice_boundary: 0x80000000000: EINVAL (22)
hugemmap24.c:64: TINFO: can't use slice_boundary: 0x90000000000: EINVAL (22)
hugemmap24.c:64: TINFO: can't use slice_boundary: 0xa0000000000: EINVAL (22)
hugemmap24.c:64: TINFO: can't use slice_boundary: 0xb0000000000: EINVAL (22)
hugemmap24.c:64: TINFO: can't use slice_boundary: 0xc0000000000: EINVAL (22)
hugemmap24.c:64: TINFO: can't use slice_boundary: 0xd0000000000: EINVAL (22)
hugemmap24.c:64: TINFO: can't use slice_boundary: 0xe0000000000: EINVAL (22)
hugemmap24.c:64: TINFO: can't use slice_boundary: 0xf0000000000: EINVAL (22)
hugemmap24.c:64: TINFO: can't use slice_boundary: 0x100000000000: EINVAL (22)
hugemmap24.c:72: TFAIL: couldn't find 2 free neighbour slices: EINVAL (22)

Signed-off-by: wangxuewen <wangxuewen@kylinos.cn>
---
 testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Li Wang Nov. 15, 2023, 6:04 a.m. UTC | #1
Hi Xuewen,

I think this is duplicated with another one, can double check your patch?
https://github.com/linux-test-project/ltp/commit/6738fb488d05871f28b204239d45c30cdb05a379

On Tue, Nov 14, 2023 at 5:50 PM <wangxuewen@kylinos.cn> wrote:

> From: wangxuewen <wangxuewen@kylinos.cn>
>
> This allows for a lower address branch on the Longarch platform.
>
> ./hugemmap24
> tst_hugepage.c:83: TINFO: 4 hugepage(s) reserved
> tst_test.c:1560: TINFO: Timeout per run is 0h 00m 30s
> hugemmap24.c:64: TINFO: can't use slice_boundary: 0x20000000000: EINVAL
> (22)
> hugemmap24.c:64: TINFO: can't use slice_boundary: 0x30000000000: EINVAL
> (22)
> hugemmap24.c:64: TINFO: can't use slice_boundary: 0x40000000000: EINVAL
> (22)
> hugemmap24.c:64: TINFO: can't use slice_boundary: 0x50000000000: EINVAL
> (22)
> hugemmap24.c:64: TINFO: can't use slice_boundary: 0x60000000000: EINVAL
> (22)
> hugemmap24.c:64: TINFO: can't use slice_boundary: 0x70000000000: EINVAL
> (22)
> hugemmap24.c:64: TINFO: can't use slice_boundary: 0x80000000000: EINVAL
> (22)
> hugemmap24.c:64: TINFO: can't use slice_boundary: 0x90000000000: EINVAL
> (22)
> hugemmap24.c:64: TINFO: can't use slice_boundary: 0xa0000000000: EINVAL
> (22)
> hugemmap24.c:64: TINFO: can't use slice_boundary: 0xb0000000000: EINVAL
> (22)
> hugemmap24.c:64: TINFO: can't use slice_boundary: 0xc0000000000: EINVAL
> (22)
> hugemmap24.c:64: TINFO: can't use slice_boundary: 0xd0000000000: EINVAL
> (22)
> hugemmap24.c:64: TINFO: can't use slice_boundary: 0xe0000000000: EINVAL
> (22)
> hugemmap24.c:64: TINFO: can't use slice_boundary: 0xf0000000000: EINVAL
> (22)
> hugemmap24.c:64: TINFO: can't use slice_boundary: 0x100000000000: EINVAL
> (22)
> hugemmap24.c:72: TFAIL: couldn't find 2 free neighbour slices: EINVAL (22)
>
> Signed-off-by: wangxuewen <wangxuewen@kylinos.cn>
> ---
>  testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c
> b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c
> index 158a03010..431dc1bbf 100644
> --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c
> +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c
> @@ -30,7 +30,7 @@ static int init_slice_boundary(int fd)
>         unsigned long slice_size;
>         void *p, *heap;
>         int i;
> -#if defined(__LP64__) && !defined(__aarch64__)
> +#if defined(__LP64__) && !defined(__aarch64__) && !defined(__loongarch__)
>         /* powerpc: 1TB slices starting at 1 TB */
>         slice_boundary = 0x10000000000;
>         slice_size = 0x10000000000;
> --
> 2.34.1
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>
>
diff mbox series

Patch

diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c
index 158a03010..431dc1bbf 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c
@@ -30,7 +30,7 @@  static int init_slice_boundary(int fd)
 	unsigned long slice_size;
 	void *p, *heap;
 	int i;
-#if defined(__LP64__) && !defined(__aarch64__)
+#if defined(__LP64__) && !defined(__aarch64__) && !defined(__loongarch__)
 	/* powerpc: 1TB slices starting at 1 TB */
 	slice_boundary = 0x10000000000;
 	slice_size = 0x10000000000;