From patchwork Mon Jan 23 08:47:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 92200 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1111679qgi; Sun, 22 Jan 2017 23:49:03 -0800 (PST) X-Received: by 10.237.40.39 with SMTP id r36mr23547589qtd.282.1485157743619; Sun, 22 Jan 2017 23:49:03 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id x26si10243440qta.287.2017.01.22.23.49.03; Sun, 22 Jan 2017 23:49:03 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 240ED60943; Mon, 23 Jan 2017 07:49:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id B65EA60947; Mon, 23 Jan 2017 07:48:57 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 3822060949; Mon, 23 Jan 2017 07:48:55 +0000 (UTC) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by lists.linaro.org (Postfix) with ESMTPS id 1A35F60943 for ; Mon, 23 Jan 2017 07:48:54 +0000 (UTC) Received: by mail-lf0-f45.google.com with SMTP id n124so88705767lfd.2 for ; Sun, 22 Jan 2017 23:48:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pyeMu2UCCdvbdSFNh75cv+tf4vynpm9sp3Y5ssypK2U=; b=dE8Z5MFbtCIxHgQD3IB6WV7JuWF6zoAL76P2casniWFbgodB2s5O8iEZpBcbRvHlCf M5vaelUfLOK1i4cf5NQulYjtzetYvhqvcabesvKso+sR4ivV8BYLnJSEHC/oY9GYGjth x6L2EDq70LChQykvlmDwh0tTmh7wiP5cB4abSMfqYFUxCOBE7HmzPVv4lxpq2QmrrhwI 20WGZg6D1qPYMJdaQ3RUil2P87ladIL3Pu0JoOLxuveyjyiD2p46gstU3LpkVj9L9Alz gJWfuu9cM6DhGuJXJ3tr/1iNtj91EroW+trnwZhs5pQssCv3jLBru+KI8fb/Y4N6Yfox 3SGw== X-Gm-Message-State: AIkVDXLQtZv25Wr4UsEJutHz0Rt2s2+itSLpxbqe3363epYWCj7Y+IUeXOryNi/ASs1jM+RuPx4= X-Received: by 10.25.99.134 with SMTP id v6mr8853959lfi.170.1485157732818; Sun, 22 Jan 2017 23:48:52 -0800 (PST) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-76-66.cust.bredband2.com. [83.233.76.66]) by smtp.gmail.com with ESMTPSA id p19sm6091231lfe.1.2017.01.22.23.48.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 22 Jan 2017 23:48:52 -0800 (PST) From: Christophe Milard To: mike.holmes@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Mon, 23 Jan 2017 09:47:57 +0100 Message-Id: <1485161277-4743-1-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [lng-odp] [PATCHv2] linux-gen: _ishm: fix normal page fallback X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Fixing failure due to lack of huge pages. Fixes: https://bugs.linaro.org/show_bug.cgi?id=2842 Signed-off-by: Christophe Milard --- platform/linux-generic/_ishm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/platform/linux-generic/_ishm.c b/platform/linux-generic/_ishm.c index f889834..3797f20 100644 --- a/platform/linux-generic/_ishm.c +++ b/platform/linux-generic/_ishm.c @@ -547,7 +547,7 @@ static void *do_map(int block_index, uint64_t len, uint32_t align, addr = alloc_fragment(len, block_index, align, &fragment); if (!addr) { ODP_ERR("alloc_fragment failed.\n"); - if (new_block->filename[0]) { + if (!new_block->external_fd) { close(*fd); *fd = -1; delete_file(new_block); @@ -562,7 +562,7 @@ static void *do_map(int block_index, uint64_t len, uint32_t align, if (mapped_addr == NULL) { if (flags & _ODP_ISHM_SINGLE_VA) free_fragment(fragment); - if (new_block->filename[0]) { + if (!new_block->external_fd) { close(*fd); *fd = -1; delete_file(new_block);