hugemmap24: Exclude RISC-V from the powerpc slice layout
PATCH 1/1 hugemmap24: Exclude RISC-V from the powerpc slice layout
Exclude RISC-V with the same way loongarch is excluded from the powerpc 1TB slices branch.
--- testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c +2 -1
@@ -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)/* powerpc: 1TB slices starting at 1 TB */ slice_boundary =0x10000000000 ; slice_size =0x10000000000 ;
Signature · 5 lines
2.34.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Victor,
Quoted 4 lines · Victor Cheng-Yen Yang
hugemmap24: Exclude RISC-V from the powerpc slice layout
Exclude RISC-V with the same way loongarch is excluded from the powerpc 1TB slices branch.
Could this explain why RISC-V needs the lower-address branch? On RV64 with Sv39, the task size is 256 GB, so the 1 TB MAP_FIXED addresses are outside the user address space and the test fails before exercising mremap(). The current text only restates the change.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Vitor,
Quoted 13 lines
Exclude RISC-V with the same way loongarch is excluded from the powerpc 1TB slices branch.
Signed-off-by Victor Cheng-Yen Yang <[email protected]>--- testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c +0
-0
testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c static int init_slice_boundary(int fd) · line 32
Quoted 6 lines
testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c +2
-1@@ -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?
testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c +2 -2
@@ -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
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp