diff options
| author | Gary S. Robertson <gary.robertson@linaro.org> | 2014-11-24 16:59:15 -0600 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-12-10 13:33:28 +0100 |
| commit | ec2b501573d075b5cbc71bbe58c57896dc431247 (patch) | |
| tree | 9a4d75bf39eab35f38d87e87593809488a6dd14a | |
| parent | b52a206e1df067e1f0921efc115c977845903d0a (diff) | |
| download | meta-openembedded-ec2b501573d075b5cbc71bbe58c57896dc431247.tar.gz | |
libhugetlbfs: Fix page size & text offset for arm arches
Fixed computation of page size and text segment offset for various arm
architectures - including both LE and BE variants of armv7 as well as
aarch64
Upstream Status: Accepted at libhugetlbfs project
Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
3 files changed, 58 insertions, 33 deletions
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patch deleted file mode 100644 index da60ba0aee..0000000000 --- a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patch +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | Subject: [PATCH] aarch64: fix page size not properly computed | ||
| 2 | |||
| 3 | There's 2 issues fixed: | ||
| 4 | * typo on MB variable (MB -> $MB) | ||
| 5 | * some linker variants are missing (linux and big endian) | ||
| 6 | - aarch64elfb | ||
| 7 | - aarch64linux | ||
| 8 | - aarch64linuxb | ||
| 9 | |||
| 10 | Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> | ||
| 11 | |||
| 12 | Upstream-Status: Submitted | ||
| 13 | --- | ||
| 14 | ld.hugetlbfs | 2 +- | ||
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 16 | |||
| 17 | diff --git a/ld.hugetlbfs b/ld.hugetlbfs | ||
| 18 | index df446dd..6553547 100755 | ||
| 19 | --- a/ld.hugetlbfs | ||
| 20 | +++ b/ld.hugetlbfs | ||
| 21 | @@ -87,7 +87,7 @@ elf32ppclinux|elf64ppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;; | ||
| 22 | elf64lppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;; | ||
| 23 | elf_i386|elf_x86_64) HPAGE_SIZE=$((4*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; | ||
| 24 | elf_s390|elf64_s390) HPAGE_SIZE=$((1*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; | ||
| 25 | -armelf_linux_eabi|aarch64elf) HPAGE_SIZE=$((2*MB)) SLICE_SIZE=$HPAGE_SIZE ;; | ||
| 26 | +armelf_linux_eabi|aarch64elf*|aarch64linux*) HPAGE_SIZE=$((2*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; | ||
| 27 | esac | ||
| 28 | |||
| 29 | if [ "$HTLB_ALIGN" == "slice" ]; then | ||
| 30 | -- | ||
| 31 | 1.9.2 | ||
| 32 | |||
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch new file mode 100644 index 0000000000..4e5b7bbbbc --- /dev/null +++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | From 1ab6f7f9b34fc745451140fc21db6763dffc5785 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Gary S. Robertson" <gary.robertson@linaro.org> | ||
| 3 | Date: Thu, 25 Sep 2014 14:57:06 -0500 | ||
| 4 | Subject: [PATCH] ld.hugetlbfs: arm arches - fix page size and text offset | ||
| 5 | setup | ||
| 6 | |||
| 7 | There's 3 issues fixed: | ||
| 8 | * typo on MB variable (MB -> $MB) | ||
| 9 | * some linker variants are missing (linux and big endian) | ||
| 10 | - armelfb_linux_eabi | ||
| 11 | - aarch64elfb | ||
| 12 | - aarch64linux | ||
| 13 | - aarch64linuxb | ||
| 14 | * text segment offset was not specified for armv7 BE | ||
| 15 | |||
| 16 | NOTE: This patch replaces and makes obsolete the following previously | ||
| 17 | submitted patch: | ||
| 18 | |||
| 19 | aarch64: fix page size not properly computed | ||
| 20 | by: Fathi Boudra <fathi.boudra@linaro.org> | ||
| 21 | |||
| 22 | Upstream Status: Accepted at libhugetlbfs project | ||
| 23 | |||
| 24 | Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> | ||
| 25 | --- | ||
| 26 | ld.hugetlbfs | 8 ++++---- | ||
| 27 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 28 | |||
| 29 | diff --git a/ld.hugetlbfs b/ld.hugetlbfs | ||
| 30 | index df446dd..4417442 100755 | ||
| 31 | --- a/ld.hugetlbfs | ||
| 32 | +++ b/ld.hugetlbfs | ||
| 33 | @@ -87,7 +87,7 @@ elf32ppclinux|elf64ppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;; | ||
| 34 | elf64lppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;; | ||
| 35 | elf_i386|elf_x86_64) HPAGE_SIZE=$((4*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; | ||
| 36 | elf_s390|elf64_s390) HPAGE_SIZE=$((1*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; | ||
| 37 | -armelf_linux_eabi|aarch64elf) HPAGE_SIZE=$((2*MB)) SLICE_SIZE=$HPAGE_SIZE ;; | ||
| 38 | +armelf*_linux_eabi|aarch64elf*|aarch64linux*) HPAGE_SIZE=$((2*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; | ||
| 39 | esac | ||
| 40 | |||
| 41 | if [ "$HTLB_ALIGN" == "slice" ]; then | ||
| 42 | @@ -96,9 +96,9 @@ if [ "$HTLB_ALIGN" == "slice" ]; then | ||
| 43 | |||
| 44 | # targeting the ARM platform one needs to explicitly set the text segment offset | ||
| 45 | # otherwise it will be NULL. | ||
| 46 | - if [ "$EMU" == "armelf_linux_eabi" ]; then | ||
| 47 | - HTLBOPTS="$HTLBOPTS -Ttext-segment=$SLICE_SIZE" | ||
| 48 | - fi | ||
| 49 | + case "$EMU" in | ||
| 50 | + armelf*_linux_eabi) HTLBOPTS="$HTLBOPTS -Ttext-segment=$SLICE_SIZE" ;; | ||
| 51 | + esac | ||
| 52 | fi | ||
| 53 | |||
| 54 | ${LD} "${args[@]}" ${HTLBOPTS} | ||
| 55 | -- | ||
| 56 | 1.7.9.5 | ||
| 57 | |||
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb index c90621703d..4ce6a1901e 100644 --- a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +++ b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb | |||
| @@ -16,7 +16,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \ | |||
| 16 | file://tests-Makefile-install-static-4G-edge-testcases.patch \ | 16 | file://tests-Makefile-install-static-4G-edge-testcases.patch \ |
| 17 | file://0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch \ | 17 | file://0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch \ |
| 18 | file://0001-aarch64-fix-cross-compilation.patch \ | 18 | file://0001-aarch64-fix-cross-compilation.patch \ |
| 19 | file://0001-aarch64-fix-page-size-not-properly-computed.patch \ | 19 | file://0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch \ |
| 20 | file://0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch \ | 20 | file://0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch \ |
| 21 | file://0001-Extend-arm32-support-to-include-BE-variants.patch \ | 21 | file://0001-Extend-arm32-support-to-include-BE-variants.patch \ |
| 22 | file://0001-Makefile-Recognize-all-ix86-arches.patch \ | 22 | file://0001-Makefile-Recognize-all-ix86-arches.patch \ |
