From patchwork Sat Dec 27 17:22:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Kuster X-Patchwork-Id: 42632 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AD43425B99 for ; Sat, 27 Dec 2014 17:26:38 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf7041038eek.5 for ; Sat, 27 Dec 2014 09:26:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:in-reply-to:references:subject :precedence:reply-to:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=zAcey5mjI7yFMKk3UNtda4zRbEOfKh2D27mXK0FWK1g=; b=gpWVMigzD7rAhPm4mkgKu4BxqTUXYrACp5QsRknRIEGpWomXmN8TsKsB60pfn8IgYs P5Wv2TvBb0Jfx3L9dhJfd/E26m7yeENkUgmGgbf+mqSTBUwy5ZXLvsOiHG+Gs17iqlq5 q329e4NQd1TbgrHuzBvtWFKqa0qXsrV9HfLJiwHQjAZrXm/6uj5X3QsjqT387Ji8ANiJ BL0Xtk1jWkYhbWCFCDS7RZk+UiYtSZ5SpSa+PM8mMLosWlr8kucBnSsUnee5DTgF5Mux OFK6jwt/b6svyqpdkgf+M+PU6/Jq+CKl9liNwqCAoqKVXP5nnVCs1wpiRVCqAUwqee8W w2vQ== X-Gm-Message-State: ALoCoQlKxSdAL1C++FWm6zABy9T600722h+oVzWoHh/ZzTNpu680CbWnddOwqpUCDrld4G3xxDzf X-Received: by 10.112.72.228 with SMTP id g4mr3752303lbv.4.1419701197988; Sat, 27 Dec 2014 09:26:37 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.166 with SMTP id f6ls1573540lam.39.gmail; Sat, 27 Dec 2014 09:26:37 -0800 (PST) X-Received: by 10.112.73.97 with SMTP id k1mr49105283lbv.78.1419701197713; Sat, 27 Dec 2014 09:26:37 -0800 (PST) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com. [2a00:1450:4010:c03::22b]) by mx.google.com with ESMTPS id qy6si21767307lbb.8.2014.12.27.09.26.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 27 Dec 2014 09:26:37 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::22b as permitted sender) client-ip=2a00:1450:4010:c03::22b; Received: by mail-la0-f43.google.com with SMTP id s18so9682550lam.2 for ; Sat, 27 Dec 2014 09:26:37 -0800 (PST) X-Received: by 10.152.87.12 with SMTP id t12mr48666968laz.31.1419701197604; Sat, 27 Dec 2014 09:26:37 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.142.69 with SMTP id ru5csp2383469lbb; Sat, 27 Dec 2014 09:26:36 -0800 (PST) X-Received: by 10.66.120.129 with SMTP id lc1mr77812019pab.86.1419701195804; Sat, 27 Dec 2014 09:26:35 -0800 (PST) Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id hw2si10616368pbb.188.2014.12.27.09.26.34; Sat, 27 Dec 2014 09:26:35 -0800 (PST) Received-SPF: none (google.com: openembedded-devel-bounces@lists.openembedded.org does not designate permitted sender hosts) client-ip=140.211.169.62; Received: from mail.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 280C6728C7; Sat, 27 Dec 2014 17:25:30 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) by mail.openembedded.org (Postfix) with ESMTP id 51135713B9 for ; Sat, 27 Dec 2014 17:22:48 +0000 (UTC) Received: by mail-pd0-f169.google.com with SMTP id z10so14561808pdj.14 for ; Sat, 27 Dec 2014 09:22:49 -0800 (PST) X-Received: by 10.70.88.9 with SMTP id bc9mr15812945pdb.145.1419700969834; Sat, 27 Dec 2014 09:22:49 -0800 (PST) Received: from bigisland.hsd1.ca.comcast.net (c-76-20-92-207.hsd1.ca.comcast.net. [76.20.92.207]) by mx.google.com with ESMTPSA id fu1sm31202444pbb.91.2014.12.27.09.22.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 27 Dec 2014 09:22:48 -0800 (PST) From: Armin Kuster To: openembedded-devel@lists.openembedded.org, otavio@ossystems.com.br Date: Sat, 27 Dec 2014 09:22:06 -0800 Message-Id: <8d8b0f1cc843e6df6f44d16360d712a7a44d17d7.1419700394.git.akuster808@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Subject: [oe] [PATCH 19/27] libhugetlbfs: Fix page size & text offset for arm arches X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: openembedded-devel@lists.openembedded.org List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org X-Original-Sender: akuster808@gmail.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::22b as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: "Gary S. Robertson" 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 Signed-off-by: Martin Jansa Signed-off-by: Armin Kuster --- ...rch64-fix-page-size-not-properly-computed.patch | 32 ------------ ...s-arm-arches-fix-page-size-and-text-offse.patch | 57 ++++++++++++++++++++++ .../libhugetlbfs/libhugetlbfs_git.bb | 2 +- 3 files changed, 58 insertions(+), 33 deletions(-) delete mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patch create mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch 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 da60ba0..0000000 --- a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patch +++ /dev/null @@ -1,32 +0,0 @@ -Subject: [PATCH] aarch64: fix page size not properly computed - -There's 2 issues fixed: -* typo on MB variable (MB -> $MB) -* some linker variants are missing (linux and big endian) - - aarch64elfb - - aarch64linux - - aarch64linuxb - -Signed-off-by: Fathi Boudra - -Upstream-Status: Submitted ---- - ld.hugetlbfs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ld.hugetlbfs b/ld.hugetlbfs -index df446dd..6553547 100755 ---- a/ld.hugetlbfs -+++ b/ld.hugetlbfs -@@ -87,7 +87,7 @@ elf32ppclinux|elf64ppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;; - elf64lppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;; - elf_i386|elf_x86_64) HPAGE_SIZE=$((4*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; - elf_s390|elf64_s390) HPAGE_SIZE=$((1*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; --armelf_linux_eabi|aarch64elf) HPAGE_SIZE=$((2*MB)) SLICE_SIZE=$HPAGE_SIZE ;; -+armelf_linux_eabi|aarch64elf*|aarch64linux*) HPAGE_SIZE=$((2*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; - esac - - if [ "$HTLB_ALIGN" == "slice" ]; then --- -1.9.2 - 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 0000000..4e5b7bb --- /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 @@ +From 1ab6f7f9b34fc745451140fc21db6763dffc5785 Mon Sep 17 00:00:00 2001 +From: "Gary S. Robertson" +Date: Thu, 25 Sep 2014 14:57:06 -0500 +Subject: [PATCH] ld.hugetlbfs: arm arches - fix page size and text offset + setup + +There's 3 issues fixed: +* typo on MB variable (MB -> $MB) +* some linker variants are missing (linux and big endian) + - armelfb_linux_eabi + - aarch64elfb + - aarch64linux + - aarch64linuxb +* text segment offset was not specified for armv7 BE + +NOTE: This patch replaces and makes obsolete the following previously + submitted patch: + + aarch64: fix page size not properly computed + by: Fathi Boudra + +Upstream Status: Accepted at libhugetlbfs project + +Signed-off-by: Gary S. Robertson +--- + ld.hugetlbfs | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/ld.hugetlbfs b/ld.hugetlbfs +index df446dd..4417442 100755 +--- a/ld.hugetlbfs ++++ b/ld.hugetlbfs +@@ -87,7 +87,7 @@ elf32ppclinux|elf64ppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;; + elf64lppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;; + elf_i386|elf_x86_64) HPAGE_SIZE=$((4*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; + elf_s390|elf64_s390) HPAGE_SIZE=$((1*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; +-armelf_linux_eabi|aarch64elf) HPAGE_SIZE=$((2*MB)) SLICE_SIZE=$HPAGE_SIZE ;; ++armelf*_linux_eabi|aarch64elf*|aarch64linux*) HPAGE_SIZE=$((2*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; + esac + + if [ "$HTLB_ALIGN" == "slice" ]; then +@@ -96,9 +96,9 @@ if [ "$HTLB_ALIGN" == "slice" ]; then + + # targeting the ARM platform one needs to explicitly set the text segment offset + # otherwise it will be NULL. +- if [ "$EMU" == "armelf_linux_eabi" ]; then +- HTLBOPTS="$HTLBOPTS -Ttext-segment=$SLICE_SIZE" +- fi ++ case "$EMU" in ++ armelf*_linux_eabi) HTLBOPTS="$HTLBOPTS -Ttext-segment=$SLICE_SIZE" ;; ++ esac + fi + + ${LD} "${args[@]}" ${HTLBOPTS} +-- +1.7.9.5 + diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb index c906217..4ce6a19 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 \ file://tests-Makefile-install-static-4G-edge-testcases.patch \ file://0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch \ file://0001-aarch64-fix-cross-compilation.patch \ - file://0001-aarch64-fix-page-size-not-properly-computed.patch \ + file://0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch \ file://0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch \ file://0001-Extend-arm32-support-to-include-BE-variants.patch \ file://0001-Makefile-Recognize-all-ix86-arches.patch \