summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-benchmark/libhugetlbfs/files
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2014-05-03 15:42:46 +0300
committerMartin Jansa <Martin.Jansa@gmail.com>2014-05-04 17:14:11 +0200
commit447ef234d4e69f527e4c1c2bea6129b08af30010 (patch)
treef5b7f705f4c80f2158cfd87d6206f204fa41b97e /meta-oe/recipes-benchmark/libhugetlbfs/files
parent25ca3cf168103ca2591658ffa83946ebd24733b5 (diff)
downloadmeta-openembedded-447ef234d4e69f527e4c1c2bea6129b08af30010.tar.gz
libhugetlbfs: update srcrev to 2.18 release
* Update recipe: - update SRCREV to latest release, 2.18 - switch back to master branch - increase verbosity (pass V=1 to EXTRA_OEMAKE) to make debugging easier * Drop patches: - fix-lib64-can-not-be-shiped-in-64bit-target.patch replaced by LIBARGS definition. the build system allows to override libdir using LIB32 and LIB64 variables - 0001-install-perl-lib-to-directory-perl-instead-of-perl5.patch replaced by a one-liner to fixup perl module directory hardcoded to perl5 * Refresh skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch - only disable the error to skip the check * Add patches: - 0001-aarch64-fix-cross-compilation.patch - submitted upstream allow to override CC and use it for aarch64 case like the other arch - 0001-aarch64-fix-page-size-not-properly-computed.patch - submitted upstream fix typo on MB variable (MB -> $MB) and add the missing linker variants (aarch64elfb, aarch64linux, aarch64linuxb) - 0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch submitted upstream. replace lib/lib64 hardcoded values by LIBDIR32 and LIBDIR64 variables * Remove patches that aren't applied in the recipe (they're all merged upstream and available in 2.18 release): - libhugetlbfs/files/aarch64-support.patch - aarch64-unit-test-fixes.patch - add-PROT-NONE-to-the-mprotest-test.patch Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-benchmark/libhugetlbfs/files')
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-cross-compilation.patch34
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patch32
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch29
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-support.patch88
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-unit-test-fixes.patch62
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch38
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch41
7 files changed, 103 insertions, 221 deletions
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-cross-compilation.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-cross-compilation.patch
new file mode 100644
index 000000000..215ae728d
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-cross-compilation.patch
@@ -0,0 +1,34 @@
1Subject: [PATCH] aarch64: fix cross compilation
2
3This patch allow to override CC and use it for aarch64 case like
4the other architectures.
5
6Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
7
8Upstream-Status: Submitted
9---
10 Makefile | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12
13diff --git a/Makefile b/Makefile
14index 91502e1..5aa1e12 100644
15--- a/Makefile
16+++ b/Makefile
17@@ -33,7 +33,7 @@ CFLAGS += -Wall -fPIC
18 CPPFLAGS += -D__LIBHUGETLBFS__
19
20 ARCH = $(shell uname -m | sed -e s/i.86/i386/)
21-CC = gcc
22+CC ?= gcc
23
24 CUSTOM_LDSCRIPTS = yes
25
26@@ -66,7 +66,7 @@ ELF32 += armelf_linux_eabi
27 CUSTOM_LDSCRIPTS = no
28 else
29 ifneq (,$(findstring aarch64,$(ARCH)))
30-CC64 = gcc
31+CC64 = $(CC)
32 ELF64 = aarch64elf
33 TMPLIB64 = lib64
34 CUSTOM_LDSCRIPTS = no
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
new file mode 100644
index 000000000..da60ba0ae
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patch
@@ -0,0 +1,32 @@
1Subject: [PATCH] aarch64: fix page size not properly computed
2
3There'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
10Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
11
12Upstream-Status: Submitted
13---
14 ld.hugetlbfs | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/ld.hugetlbfs b/ld.hugetlbfs
18index 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--
311.9.2
32
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch
new file mode 100644
index 000000000..9e2a5e58d
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch
@@ -0,0 +1,29 @@
1Subject: [PATCH 1/1] Replace lib/lib64 hardcoded values by LIBDIR32/LIBDIR64
2 variables
3
4Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
5
6Upstream-Status: Submitted
7---
8 Makefile | 4 ++--
9 1 file changed, 2 insertions(+), 2 deletions(-)
10
11diff --git a/Makefile b/Makefile
12index 91502e1..682c0db 100644
13--- a/Makefile
14+++ b/Makefile
15@@ -181,9 +181,9 @@ BINDIR = $(PREFIX)/share/libhugetlbfs
16 EXEDIR = $(PREFIX)/bin
17 DOCDIR = $(PREFIX)/share/doc/libhugetlbfs
18 ifdef CC32
19-PMDIR = $(PREFIX)/lib/perl5/TLBC
20+PMDIR = $(LIBDIR32)/perl5/TLBC
21 else
22-PMDIR = $(PREFIX)/lib64/perl5/TLBC
23+PMDIR = $(LIBDIR64)/perl5/TLBC
24 endif
25 MANDIR1 = $(PREFIX)/share/man/man1
26 MANDIR3 = $(PREFIX)/share/man/man3
27--
281.9.2
29
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-support.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-support.patch
deleted file mode 100644
index ceac6b428..000000000
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-support.patch
+++ /dev/null
@@ -1,88 +0,0 @@
1Upstream-Status: Pending
2
3From 52b8430eb4f03e35721f29862de33041fe9c9768 Mon Sep 17 00:00:00 2001
4From: Steve Capper <steve.capper@linaro.org>
5Date: Wed, 10 Apr 2013 14:51:12 +0100
6Subject: [PATCH] Aarch64 support.
7
8This patch adds support for Aarch64.
9
10As with ARMv7, We do not add the xBT/xBDT style linker scripts as
11these have been deprecated in favour of adjusting the page sizes
12via command line parameter to ld.
13
14Signed-off-by: Steve Capper <steve.capper@linaro.org>
15---
16 Makefile | 7 +++++++
17 sys-aarch64elf_linux.S | 34 ++++++++++++++++++++++++++++++++++
18 2 files changed, 41 insertions(+)
19 create mode 100644 sys-aarch64elf_linux.S
20
21diff --git a/Makefile b/Makefile
22index 48205af..28ceade 100644
23--- a/Makefile
24+++ b/Makefile
25@@ -57,6 +57,12 @@ TMPLIB32 = lib
26 ELF32 += armelf_linux_eabi
27 CUSTOM_LDSCRIPTS = no
28 else
29+ifeq ($(ARCH),aarch64)
30+CC64 = gcc
31+ELF64 = aarch64elf_linux
32+TMPLIB64 = lib64
33+CUSTOM_LDSCRIPTS = no
34+else
35 ifeq ($(ARCH),i386)
36 CC32 = gcc
37 ELF32 = elf_i386
38@@ -100,6 +106,7 @@ endif
39 endif
40 endif
41 endif
42+endif
43
44 ifdef CC32
45 OBJDIRS += obj32
46diff --git a/sys-aarch64elf_linux.S b/sys-aarch64elf_linux.S
47new file mode 100644
48index 0000000..699ff4c
49--- /dev/null
50+++ b/sys-aarch64elf_linux.S
51@@ -0,0 +1,34 @@
52+/*
53+ * libhugetlbfs - Easy use of Linux hugepages
54+ * Copyright (C) 2013 Linaro Ltd.
55+ *
56+ * This library is free software; you can redistribute it and/or
57+ * modify it under the terms of the GNU Lesser General Public License
58+ * version 2.1 as published by the Free Software Foundation.
59+ *
60+ * This library is distributed in the hope that it will be useful, but
61+ * WITHOUT ANY WARRANTY; without even the implied warranty of
62+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
63+ * Lesser General Public License for more details.
64+ *
65+ * You should have received a copy of the GNU Lesser General Public
66+ * License along with this library; if not, write to the Free Software
67+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
68+ */
69+
70+ .text
71+
72+ .globl direct_syscall
73+
74+
75+direct_syscall:
76+ uxtw x8, w0
77+ mov x0, x1
78+ mov x1, x2
79+ mov x2, x3
80+ mov x3, x4
81+ mov x4, x5
82+ mov x5, x6
83+ mov x6, x7
84+ svc 0x0
85+ RET
86--
871.7.9.5
88
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-unit-test-fixes.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-unit-test-fixes.patch
deleted file mode 100644
index 0b6fd8a30..000000000
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-unit-test-fixes.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1Upstream-Status: Pending
2
3From 9bb940bd6a86f09280bdcd48a7177a835d72a25c Mon Sep 17 00:00:00 2001
4From: Steve Capper <steve.capper@linaro.org>
5Date: Wed, 10 Apr 2013 15:52:46 +0100
6Subject: [PATCH] Aarch64 unit test fixes.
7
8On Aarch64, zero bytes are illegal instructions, this is added to
9the icache-hygiene test.
10
11In mremap-expand-slice-collision, if __LP64__ is defined then
12mappings are attempted at 1TB boundaries which are outside the
13allowable mmap region for Aarch64. For __aarch64__ we change this
14mapping back to 256MB slices.
15
16Signed-off-by: Steve Capper <steve.capper@linaro.org>
17---
18 tests/icache-hygiene.c | 7 ++++---
19 tests/mremap-expand-slice-collision.c | 2 +-
20 2 files changed, 5 insertions(+), 4 deletions(-)
21
22diff --git a/tests/icache-hygiene.c b/tests/icache-hygiene.c
23index 51792b3..876ce10 100644
24--- a/tests/icache-hygiene.c
25+++ b/tests/icache-hygiene.c
26@@ -54,7 +54,7 @@ static void cacheflush(void *p)
27 {
28 #if defined(__powerpc__)
29 asm volatile("dcbst 0,%0; sync; icbi 0,%0; isync" : : "r"(p));
30-#elif defined(__arm__)
31+#elif defined(__arm__) || defined(__aarch64__)
32 __clear_cache(p, p + COPY_SIZE);
33 #endif
34 }
35@@ -87,8 +87,9 @@ static void *sig_expected;
36 static void sig_handler(int signum, siginfo_t *si, void *uc)
37 {
38 #if defined(__powerpc__) || defined(__powerpc64__) || defined(__ia64__) || \
39- defined(__s390__) || defined(__s390x__) || defined(__sparc__)
40- /* On powerpc and ia64 and s390, 0 bytes are an illegal
41+ defined(__s390__) || defined(__s390x__) || defined(__sparc__) || \
42+ defined(__aarch64__)
43+ /* On powerpc, ia64, s390 and Aarch64, 0 bytes are an illegal
44 * instruction, so, if the icache is cleared properly, we SIGILL
45 * as soon as we jump into the cleared page */
46 if (signum == SIGILL) {
47diff --git a/tests/mremap-expand-slice-collision.c b/tests/mremap-expand-slice-collision.c
48index c25f4c6..853f3c3 100644
49--- a/tests/mremap-expand-slice-collision.c
50+++ b/tests/mremap-expand-slice-collision.c
51@@ -38,7 +38,7 @@ void init_slice_boundary(int fd)
52 unsigned long slice_size;
53 void *p1, *p2, *heap;
54 int slices_ok, i, rc;
55-#ifdef __LP64__
56+#if defined(__LP64__) && !defined(__aarch64__)
57 /* powerpc: 1TB slices starting at 1 TB */
58 slice_boundary = 0x10000000000;
59 slice_size = 0x10000000000;
60--
611.7.9.5
62
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch
deleted file mode 100644
index 673f2046d..000000000
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1Upstream-Status: Pending
2
3From c7fcb7270bb510d7271a1c0cea095a4dbea49420 Mon Sep 17 00:00:00 2001
4From: Steve Capper <steve.capper@linaro.org>
5Date: Mon, 3 Jun 2013 17:00:45 +0100
6Subject: [PATCH] Add PROT_NONE to the mprotect test.
7
8The mprotect unit test checks PROT_READ and PROT_READ | PROT_WRITE
9protections. We recently found that PROT_NONE wasn't properly
10supported in our huge page kernel code.
11
12This patch adds PROT_NONE tests to mprotect. The expected behaviour
13is that neither reads nor writes should succeed.
14
15Signed-off-by: Steve Capper <steve.capper@linaro.org>
16---
17 tests/mprotect.c | 6 ++++++
18 1 file changed, 6 insertions(+)
19
20diff --git a/tests/mprotect.c b/tests/mprotect.c
21index aa4673e..db6a662 100644
22--- a/tests/mprotect.c
23+++ b/tests/mprotect.c
24@@ -213,5 +213,11 @@ int main(int argc, char *argv[])
25 test_mprotect(fd, "RW->R 1/2", 2*hpage_size, PROT_READ|PROT_WRITE,
26 hpage_size, PROT_READ);
27
28+ /* PROT_NONE tests */
29+ test_mprotect(fd, "NONE->R", hpage_size, PROT_NONE,
30+ hpage_size, PROT_READ);
31+ test_mprotect(fd, "NONE->RW", hpage_size, PROT_NONE,
32+ hpage_size, PROT_READ|PROT_WRITE);
33+
34 PASS();
35 }
36--
371.7.9.5
38
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch
index 329637604..07a99719b 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch
@@ -3,46 +3,21 @@ From: Ting Liu <b28495@freescale.com>
3Date: Mon, 18 Jun 2012 16:37:05 +0800 3Date: Mon, 18 Jun 2012 16:37:05 +0800
4Subject: [PATCH] skip checking LIB32 and LIB64 if they point to the same place 4Subject: [PATCH] skip checking LIB32 and LIB64 if they point to the same place
5 5
6
7Upstream-Status: Inappropriate [oe-core specific] 6Upstream-Status: Inappropriate [oe-core specific]
8Signed-off-by: Ting Liu <b28495@freescale.com> 7Signed-off-by: Ting Liu <b28495@freescale.com>
9--- 8---
10 Makefile | 22 +++++++++++-----------
11 1 files changed, 11 insertions(+), 11 deletions(-)
12 9
13diff --git a/Makefile b/Makefile 10diff --git a/Makefile b/Makefile
14index 1017950..bac5f01 100644 11index 91502e1..bfb3414 100644
15--- a/Makefile 12--- a/Makefile
16+++ b/Makefile 13+++ b/Makefile
17@@ -131,17 +131,17 @@ endif 14@@ -167,7 +167,6 @@ REALLIB32 = $(realpath $(PREFIX)/$(LIB32))
18 15 REALLIB64 = $(realpath $(PREFIX)/$(LIB64))
19 # If TMPLIB64 is set, then sure we are not resolving LIB32 and LIB64 to the 16 ifneq ($(realpath $(PREFIX)),)
20 # same place 17 ifeq ($(REALLIB32),$(REALLIB64))
21-ifdef TMPLIB64
22-
23-REALLIB32 = $(realpath $(PREFIX)/$(LIB32))
24-REALLIB64 = $(realpath $(PREFIX)/$(LIB64))
25-ifneq ($(realpath $(PREFIX)),)
26-ifeq ($(REALLIB32),$(REALLIB64))
27-$(error LIB32 ($(PREFIX)/$(LIB32) to $(REALLIB32)) and LIB64 ($(PREFIX)/$(LIB64) to $(REALLIB64)) are resolving to the same place. Manually specify LIB32 and LIB64. e.g. make PREFIX=$(PREFIX) LIB32=lib32 LIB64=lib64) 18-$(error LIB32 ($(PREFIX)/$(LIB32) to $(REALLIB32)) and LIB64 ($(PREFIX)/$(LIB64) to $(REALLIB64)) are resolving to the same place. Manually specify LIB32 and LIB64. e.g. make PREFIX=$(PREFIX) LIB32=lib32 LIB64=lib64)
28-endif 19 endif
29-endif 20 endif
30-
31-endif
32+#ifdef TMPLIB64
33+#
34+#REALLIB32 = $(realpath $(PREFIX)/$(LIB32))
35+#REALLIB64 = $(realpath $(PREFIX)/$(LIB64))
36+#ifneq ($(realpath $(PREFIX)),)
37+#ifeq ($(REALLIB32),$(REALLIB64))
38+#$(error LIB32 ($(PREFIX)/$(LIB32) to $(REALLIB32)) and LIB64 ($(PREFIX)/$(LIB64) to $(REALLIB64)) are resolving to the same place. Manually specify LIB32 and LIB64. e.g. make PREFIX=$(PREFIX) LIB32=lib32 LIB64=lib64)
39+#endif
40+#endif
41+#
42+#endif
43 21
44 HEADERDIR = $(PREFIX)/include
45 LIBDIR32 = $(PREFIX)/$(LIB32)
46-- 22--
471.7.0.4 231.9.2
48