diff mbox series

hugemmap24: loongarch:Add __longarch__ for compatibility with Loongarch

Message ID 20231109025456.71696-1-18810879172@163.com
State Accepted
Headers show
Series hugemmap24: loongarch:Add __longarch__ for compatibility with Loongarch | expand

Commit Message

18810879172@163.com Nov. 9, 2023, 2:54 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. 13, 2023, 6:51 a.m. UTC | #1
Thanks for the fix, pushed.
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;