|
|
7f92c5 |
Backport of https://www.mail-archive.com/libhugetlbfs-devel@lists.sourceforge.net/msg13914.html
|
|
|
7f92c5 |
|
|
|
7f92c5 |
--
|
|
|
7f92c5 |
diff --git a/Makefile b/Makefile
|
|
|
7f92c5 |
index 9500fd5..fab7607 100644
|
|
|
7f92c5 |
--- a/Makefile
|
|
|
7f92c5 |
+++ b/Makefile
|
|
|
7f92c5 |
@@ -46,6 +46,12 @@ CC32 = gcc -m32
|
|
|
7f92c5 |
ELF32 = elf32ppclinux
|
|
|
7f92c5 |
endif
|
|
|
7f92c5 |
else
|
|
|
7f92c5 |
+ifeq ($(ARCH),ppc64le)
|
|
|
7f92c5 |
+CC64 = $(CC) -m64
|
|
|
7f92c5 |
+ELF64 = elf64lppc
|
|
|
7f92c5 |
+TMPLIB64 = lib64
|
|
|
7f92c5 |
+CUSTOM_LDSCRIPTS = no
|
|
|
7f92c5 |
+else
|
|
|
7f92c5 |
ifeq ($(ARCH),ppc)
|
|
|
7f92c5 |
CC32 = gcc -m32
|
|
|
7f92c5 |
ELF32 = elf32ppclinux
|
|
|
7f92c5 |
@@ -117,6 +123,7 @@ endif
|
|
|
7f92c5 |
endif
|
|
|
7f92c5 |
endif
|
|
|
7f92c5 |
endif
|
|
|
7f92c5 |
+endif
|
|
|
7f92c5 |
|
|
|
7f92c5 |
ifdef CC32
|
|
|
7f92c5 |
OBJDIRS += obj32
|
|
|
7f92c5 |
diff --git a/contrib/tlbmiss_cost.sh b/contrib/tlbmiss_cost.sh
|
|
|
7f92c5 |
index 1f1e234..8fbf798 100755
|
|
|
7f92c5 |
--- a/contrib/tlbmiss_cost.sh
|
|
|
7f92c5 |
+++ b/contrib/tlbmiss_cost.sh
|
|
|
7f92c5 |
@@ -44,7 +44,7 @@ cpumhz() {
|
|
|
7f92c5 |
FNAME="cpu MHz"
|
|
|
7f92c5 |
FINDEX=4
|
|
|
7f92c5 |
case "`uname -m`" in
|
|
|
7f92c5 |
- ppc64)
|
|
|
7f92c5 |
+ ppc64|ppc64le)
|
|
|
7f92c5 |
FNAME="clock"
|
|
|
7f92c5 |
FINDEX=3
|
|
|
7f92c5 |
;;
|
|
|
7f92c5 |
diff --git a/ld.hugetlbfs b/ld.hugetlbfs
|
|
|
7f92c5 |
index ba9e00a..df446dd 100755
|
|
|
7f92c5 |
--- a/ld.hugetlbfs
|
|
|
7f92c5 |
+++ b/ld.hugetlbfs
|
|
|
7f92c5 |
@@ -84,6 +84,7 @@ fi
|
|
|
7f92c5 |
MB=$((1024*1024))
|
|
|
7f92c5 |
case "$EMU" in
|
|
|
7f92c5 |
elf32ppclinux|elf64ppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;;
|
|
|
7f92c5 |
+elf64lppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;;
|
|
|
7f92c5 |
elf_i386|elf_x86_64) HPAGE_SIZE=$((4*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;
|
|
|
7f92c5 |
elf_s390|elf64_s390) HPAGE_SIZE=$((1*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;
|
|
|
7f92c5 |
armelf_linux_eabi|aarch64elf) HPAGE_SIZE=$((2*MB)) SLICE_SIZE=$HPAGE_SIZE ;;
|
|
|
7f92c5 |
diff --git a/sys-elf64ppc.S b/sys-elf64ppc.S
|
|
|
7f92c5 |
index 1b63ff0..d50f4a6 100644
|
|
|
7f92c5 |
--- a/sys-elf64ppc.S
|
|
|
7f92c5 |
+++ b/sys-elf64ppc.S
|
|
|
7f92c5 |
@@ -20,7 +20,7 @@
|
|
|
7f92c5 |
*/
|
|
|
7f92c5 |
|
|
|
7f92c5 |
.text
|
|
|
7f92c5 |
-
|
|
|
7f92c5 |
+#if _CALL_ELF != 2
|
|
|
7f92c5 |
.align 2
|
|
|
7f92c5 |
.globl direct_syscall
|
|
|
7f92c5 |
.globl .direct_syscall
|
|
|
7f92c5 |
@@ -32,6 +32,11 @@ direct_syscall:
|
|
|
7f92c5 |
.previous
|
|
|
7f92c5 |
.type .direct_syscall,@function
|
|
|
7f92c5 |
.direct_syscall:
|
|
|
7f92c5 |
+#else
|
|
|
7f92c5 |
+ .globl direct_syscall
|
|
|
7f92c5 |
+ .type direct_syscall,@function
|
|
|
7f92c5 |
+direct_syscall:
|
|
|
7f92c5 |
+#endif
|
|
|
7f92c5 |
mr 0,3
|
|
|
7f92c5 |
mr 3,4
|
|
|
7f92c5 |
mr 4,5
|
|
|
7f92c5 |
--
|
|
|
7f92c5 |
1.8.3.1
|
|
|
7f92c5 |
|