From patchwork Tue Sep 4 20:00:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 145956 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4089029ljw; Tue, 4 Sep 2018 13:03:25 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ4Z5nvYNHNe5mD3eawfWO+kZRFnxLApqF13h174y/lF6GLRpnGCri5krraOOv7dAzq+su4 X-Received: by 2002:a37:3609:: with SMTP id d9-v6mr30217933qka.117.1536091405670; Tue, 04 Sep 2018 13:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536091405; cv=none; d=google.com; s=arc-20160816; b=0moBP4NBUfTOx5iaOeoI7zCMQwNtePJMw9CN9gQ9eBKB3h8rwgHE69aHAhK9fBXfOu eoBYcKDgHTMLpHUUNeAahfqIeZN5nLZCAiF37CGRWdjcg1Upb45UkVbHcO9Ygf9fUd15 zCqNgmHQj42w095063D/rqFMZiB3As+OsCp5Xhz7I1zy2+mhWYXcklB7+74I/bNWdkeU vdedYe/Ug/QdLy0MQh4FpeTsF6M1Kh6JABHu0Sv2TXjKlzQt8s5s+TZaUSBYfTEkE/25 naOu5ojppoBeWmcz8VFEaWY2LoApi1u3jdRIzTO9bwzl3BO++3cw8jKQMqNqMaFdPhsR SHUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=dyFpDKa+BHQ4cRfU1Q+N0Kryk7/fizHufnnSVJEYKtg=; b=CsDDPG+EIPtQysm0ReUFnGsSzO5X6kO4+LNDEE1yA7dL3gyIckv54dHt4GaAy/qddA aDov576xtdwYW6IrBhQXgoGtDRakcz6Fl12Q8NmwMCsR0AzQ/9ICkgWSvdISvOEWHTYj EBS03nV3xcNapzl86aK5O6Q676OJQRlAf1kV7WC0hjyonJJ9dDpL/IaFeC9ht7kU2P2G p0mP20pAwMfRUwVRC+ybHzfsARhG/sRKpKOhxm/jtM7210LzGC6hWhw/Z+BjrUDhEMRb YIMQfLaaItei7pDZK8t5MXTf8nJvykwSDzJkwwW6V64xNOlNOYWiejBu/HlqT9RuSmsM H+vg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id 44-v6si4278008qvk.145.2018.09.04.13.03.25; Tue, 04 Sep 2018 13:03:25 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 589336863F; Tue, 4 Sep 2018 20:03:25 +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=-3.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW 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 1669768623; Tue, 4 Sep 2018 20:01:10 +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 A97296865A; Tue, 4 Sep 2018 20:01:05 +0000 (UTC) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [77.88.28.109]) by lists.linaro.org (Postfix) with ESMTPS id B89C06864A for ; Tue, 4 Sep 2018 20:00:17 +0000 (UTC) Received: from mxback11j.mail.yandex.net (mxback11j.mail.yandex.net [IPv6:2a02:6b8:0:1619::84]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 568252D879A7 for ; Tue, 4 Sep 2018 23:00:16 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback11j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id nAUh3vuqc5-0G2uoFDV; Tue, 04 Sep 2018 23:00:16 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id IylVyLJbGm-0FnCGhYA; Tue, 04 Sep 2018 23:00:15 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 4 Sep 2018 20:00:12 +0000 Message-Id: <1536091214-8037-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536091214-8037-1-git-send-email-odpbot@yandex.ru> References: <1536091214-8037-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 693 Subject: [lng-odp] [PATCH v4 1/3] linux-gen: sysinfo: return 0 if hugepages are not supported 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" From: Dmitry Eremin-Solenikov Per API return 0 from odp_sys_huge_page_size_all() if hugepages are not supported/detected. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 693 (lumag:fix-cpu_max_hz) ** https://github.com/Linaro/odp/pull/693 ** Patch: https://github.com/Linaro/odp/pull/693.patch ** Base sha: 0a5d67beda902557056d5b5146d8cbe86e5001b0 ** Merge commit sha: e9faf7a05e0ad39aa6fc47d412584fd97d85c724 **/ platform/linux-generic/odp_system_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c index bca02ba14..2ac8b32bb 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -443,7 +443,7 @@ int odp_sys_huge_page_size_all(uint64_t size[], int num) dir = opendir("/sys/kernel/mm/hugepages"); if (!dir) { ODP_ERR("Failed to open huge page directory\n"); - return -1; + return 0; } while ((entry = readdir(dir)) != NULL) {