From patchwork Wed Sep 5 14:00:06 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: 145998 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4976372ljw; Wed, 5 Sep 2018 07:03:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYsnCroJuBgazeUyX7Zm0Z91h4HcxDihwHykDQI8KNv2o+O5XX1Na/HXbObeL6mpVBx4nLe X-Received: by 2002:a0c:d19b:: with SMTP id e27-v6mr32690437qvh.41.1536156204232; Wed, 05 Sep 2018 07:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536156204; cv=none; d=google.com; s=arc-20160816; b=r56zcfpr7M6Q57GfAYxvspX2aDR4b7GQiY9qgQ8ffiDyMZbDQCu1WyALSHrN03Q4E7 u1Hl4Qad43uM6aj0HmDE269F9+l8h1N4HPrFIqAz0hz0e3me1/S+hY6kP/XXiUyGoSJI By6pN2RtdFgsL9T8xcMAj3/v5pp9b51dAPmpStAlsa62ayJ9mu1N+vGbpnROsdAshHkR dA8YgA5SHvyLhF4GCfdkKz5ggqf8cTVIPqdgPcLG9Kfl7lN0vUkBv7h1WadkAVj5yyfy LFq+wNQ1a7aAlnNsjD2DIw9glFUe5wTgjBThp9QraJRRO/Qo8Sbd6ojh9u35muOiOFWn +hJg== 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; bh=2WvqMWUP20mNETAih7Zyu3Os3knwkObLr95motCqI50=; b=JPMuH25nwepydKzZlSSdS6Cl3DkyYr6HpYTm0zp5B7paRnwirtPydjaYQ+xVYt47H/ NrHiYQW7KC/tZ+YV+v5yMlhPd+DdlhXzs8/1YIUuupsIhOkqS68FIEC/6tv9F8PL2rEc bBQtGA7Wh9VlR2EX6uO2mtRM8u7TTZsCcfU1dxgzTLUq0bK5+7Z/8kpbbgyhVkugSESK 9Xq0Bsndkma3izdd0N6DWLx1xFGFg9Z0ci1UXieioXHMowfx+QdFJkK5DjL5fyq1AKs1 nvCQmKN91SrOx56IvA01g7fvjtyAOXQn2zPlmHWETWA+BqN9xI2807xRpZ5dJDzQnAVj N9pQ== 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 l31-v6si1537177qva.232.2018.09.05.07.03.23; Wed, 05 Sep 2018 07:03:24 -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 D2B336862B; Wed, 5 Sep 2018 14:03:23 +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 B8CE960949; Wed, 5 Sep 2018 14:03:12 +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 C942C685DF; Wed, 5 Sep 2018 14:03:08 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id 878A268600 for ; Wed, 5 Sep 2018 14:00:12 +0000 (UTC) Received: from mxback10j.mail.yandex.net (mxback10j.mail.yandex.net [IPv6:2a02:6b8:0:1619::113]) by forward102p.mail.yandex.net (Yandex) with ESMTP id C171F43065A0 for ; Wed, 5 Sep 2018 17:00:10 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback10j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 95igWvgLkP-0AdS4Ieh; Wed, 05 Sep 2018 17:00:10 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id XcngjjK9pV-09Jq5IuS; Wed, 05 Sep 2018 17:00:09 +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: Wed, 5 Sep 2018 14:00:06 +0000 Message-Id: <1536156008-9721-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536156008-9721-1-git-send-email-odpbot@yandex.ru> References: <1536156008-9721-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 693 Subject: [lng-odp] [PATCH v5 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: a057d7593fa6375352a84ec9ce2c997b6581b790 **/ platform/linux-generic/odp_system_info.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c index bca02ba14..608fa51e5 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -442,8 +442,9 @@ int odp_sys_huge_page_size_all(uint64_t size[], int num) /* See: kernel.org: hugetlbpage.txt */ dir = opendir("/sys/kernel/mm/hugepages"); if (!dir) { - ODP_ERR("Failed to open huge page directory\n"); - return -1; + ODP_PRINT("Failed to open /sys/kernel/mm/hugepages: %s\n", + strerror(errno)); + return 0; } while ((entry = readdir(dir)) != NULL) {