From: Chunrong Guo
Signed-off-by: Chunrong Guo
---
...fs-Remove-segment-based-alignment-restric.patch | 131
...-run_tests.py-fix-typo-in-test-invocation.patch | 30 +
.../files/Fix-cross-compiling-on-PPC.patch | 28
.../libhugetlbfs/files/aarch64-support.patch | 88 +
.../files/aarch64-unit-test-fixes.patch| 62 +
.../files/add-PROT-NONE-to-the-mprotest-test.patch | 38 ++
.../files/checks-if-mtab-is-a-symlink.patch| 30 +
.../libhugetlbfs/files/cross-compile.patch | 83
...x-lib64-can-not-be-shiped-in-64bit-target.patch | 64 ++
.../libhugetlbfs/files/install64-fix.patch | 20 +++
...s-Fix-perl-lib-can-not-be-shiped-to-sub-p.patch | 31 +
...s-avoid-search-host-library-path-for-cros.patch | 99 +++
...ng-LIB32-and-LIB64-if-they-point-to-the-s.patch | 48 +++
.../libhugetlbfs/libhugetlbfs_git.bb | 58 +
14 files changed, 810 insertions(+), 0 deletions(-)
create mode 100644
meta-oe/recipes-benchmark/libhugetlbfs/files/0003-libhugetlbfs-Remove-segment-based-alignment-restric.patch
create mode 100644
meta-oe/recipes-benchmark/libhugetlbfs/files/0004-tests-run_tests.py-fix-typo-in-test-invocation.patch
create mode 100644
meta-oe/recipes-benchmark/libhugetlbfs/files/Fix-cross-compiling-on-PPC.patch
create mode 100644
meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-support.patch
create mode 100644
meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-unit-test-fixes.patch
create mode 100644
meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch
create mode 100644
meta-oe/recipes-benchmark/libhugetlbfs/files/checks-if-mtab-is-a-symlink.patch
create mode 100644
meta-oe/recipes-benchmark/libhugetlbfs/files/cross-compile.patch
create mode 100644
meta-oe/recipes-benchmark/libhugetlbfs/files/fix-lib64-can-not-be-shiped-in-64bit-target.patch
create mode 100644
meta-oe/recipes-benchmark/libhugetlbfs/files/install64-fix.patch
create mode 100644
meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-Fix-perl-lib-can-not-be-shiped-to-sub-p.patch
create mode 100644
meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-search-host-library-path-for-cros.patch
create mode 100644
meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch
create mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
diff --git
a/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-libhugetlbfs-Remove-segment-based-alignment-restric.patch
b/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-libhugetlbfs-Remove-segment-based-alignment-restric.patch
new file mode 100644
index 000..31f0516
--- /dev/null
+++
b/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-libhugetlbfs-Remove-segment-based-alignment-restric.patch
@@ -0,0 +1,131 @@
+Upstream-Status: Accepted
+
+From eee53989d5b7393352d77451b66066768113072a Mon Sep 17 00:00:00 2001
+From: Becky Bruce
+Date: Tue, 19 Apr 2011 14:13:18 -0500
+Subject: [PATCH 1/2] libhugetlbfs: Remove segment-based alignment restrictions
+
+The existing library code enforces classic PPC segment restrictons on the
+alignment and allocation of hugepages. BookE Freescale processors
+don't have this restriction and allowing it to remain in place
+is overly restrictive on 32-bit processors. Define PPC_NO_SEGMENTS to
+turn this off.
+
+Signed-off-by: Becky Bruce
+---
+ Makefile |2 +-
+ elflink.c |7 ---
+ libhugetlbfs_internal.h|3 ++-
+ morecore.c |2 +-
+ tests/brk_near_huge.c |2 +-
+ tests/truncate_above_4GB.c |6 --
+ 6 files changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index d781871..3160f83 100644
+--- a/Makefile
b/Makefile
+@@ -29,7 +29,7 @@ INSTALL = install
+ LDFLAGS += -Wl,-z,noexecstack -ldl
+ CFLAGS ?= -O2 -g
+ CFLAGS += -Wall -fPIC
+-CPPFLAGS += -D__LIBHUGETLBFS__
++CPPFLAGS += -D__LIBHUGETLBFS__ -DPPC_NO_SEGMENTS
+
+ ARCH = $(shell uname -m | sed -e s/i.86/i386/)
+
+diff --git a/elflink.c b/elflink.c
+index c24bedc..432f3d7 100644
+--- a/elflink.c
b/elflink.c
+@@ -552,7 +552,8 @@ bail2:
+ seg->extrasz = end_orig - start;
+ }
+
+-#if defined(__powerpc64__) || defined (__powerpc__)
++#if defined(__powerpc64__) || \
++ (defined(__powerpc__) && !defined(PPC_NO_SEGMENTS))
+ #define SLICE_LOW_TOP (0x1UL)
+ #define SLICE_LOW_SIZE(1UL << SLICE_LOW_SHIFT)
+ #define SLICE_HIGH_SIZE (1UL << SLICE_HIGH_SHIFT)
+@@ -574,7 +575,7 @@ static unsigned long hugetlb_slice_start(unsigned long
addr)
+ return SLICE_LOW_TOP;
+ else
+ return ALIGN_DOWN(addr, SLICE_HIGH_SIZE);
+-#elif defined(__powerpc__)
++#elif defined(__powerpc__) && !defined(PPC_NO_SEGMENTS)
+ ret