Skip to content

Commit

Permalink
hugemmap24: Add __longarch__ for compatibility with Loongarch
Browse files Browse the repository at this point in the history
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: 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 <[email protected]>
Reviewed-by: Li Wang <[email protected]>
  • Loading branch information
wangxuewen authored and wangli5665 committed Nov 13, 2023
1 parent da1b1d6 commit 6738fb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6738fb4

Please sign in to comment.