[glibc] sparc: Align THP tests to the 8MB huge-page size

Adhemerval Zanella via Glibc-cvs <[email protected]> Thu, 16 Jul 2026 20:20:57 +0000 (GMT)
Newsgroups gmane.comp.lib.glibc.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2678adc8eb9617daea54d900f8ffc39d3039e2a5

commit 2678adc8eb9617daea54d900f8ffc39d3039e2a5
Author: Adhemerval Zanella <[email protected]>
Date:   Wed Jul 15 10:09:10 2026 -0300

    sparc: Align THP tests to the 8MB huge-page size
    
    The sparc64 uses an 8KB base page and 8MB PMD transparent huge page.
    It fixes the following regression on sparc:
    
    FAIL: elf/tst-thp-1
    FAIL: elf/tst-thp-1-no-s-code
    FAIL: elf/tst-thp-1-no-s-code-pde
    FAIL: elf/tst-thp-1-no-s-code-static
    FAIL: elf/tst-thp-1-pde
    FAIL: elf/tst-thp-1-static
    FAIL: elf/tst-thp-align
    
    Checked with the elf tests on qemu sparc64.
    
    Tested-by: Andreas K. Hüttel <[email protected]>

Diff:
---
 sysdeps/unix/sysv/linux/sparc/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sysdeps/unix/sysv/linux/sparc/Makefile b/sysdeps/unix/sysv/linux/sparc/Makefile
index e0056c9413..57e73d0a14 100644
--- a/sysdeps/unix/sysv/linux/sparc/Makefile
+++ b/sysdeps/unix/sysv/linux/sparc/Makefile
@@ -14,3 +14,8 @@ endif
 ifeq ($(subdir),signal)
 sysdep_routines += sigreturn_stub
 endif
+
+ifeq ($(subdir),elf)
+# The sparc64 uses an 8KB base page and 8MB PMD transparent huge page
+THP-PAGE-SIZE = 0x800000
+endif