From patchwork Tue Feb 23 08:12:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 62677 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1703410lbl; Tue, 23 Feb 2016 00:17:23 -0800 (PST) X-Received: by 10.141.1.87 with SMTP id c84mr42378878qhd.1.1456215443055; Tue, 23 Feb 2016 00:17:23 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id e7si22047316qga.19.2016.02.23.00.17.22; Tue, 23 Feb 2016 00:17:23 -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 Received: by lists.linaro.org (Postfix, from userid 109) id B1EB961749; Tue, 23 Feb 2016 08:17:21 +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=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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 9002B62F05; Tue, 23 Feb 2016 08:14:51 +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 0692A62EFF; Tue, 23 Feb 2016 08:14:41 +0000 (UTC) Received: from mail-pf0-f180.google.com (mail-pf0-f180.google.com [209.85.192.180]) by lists.linaro.org (Postfix) with ESMTPS id AB5D662EFF for ; Tue, 23 Feb 2016 08:13:28 +0000 (UTC) Received: by mail-pf0-f180.google.com with SMTP id c10so111794302pfc.2 for ; Tue, 23 Feb 2016 00:13:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vZ5Xa9zJsHWjl0pnFdKyN7MQxH0qlXcxNDKaZ7G/ob4=; b=W59ITD5go2z53XpvyCbm4GqF7Wygy8EfyPOjVztoMPsRGvMAgVU+vm6AGEn10J8bd9 r/0plk7hlKSP5QdYin1bP6XRbS9j/j6R6pmubATJTE8QVPV/xtn4i9OSN1dl3Y2Uzjjv CNuDYOt0LHxGAY64bmnokHTWqVKfmq1HzyMOC2dmSrtN5qj+GjHKR6iRzfFdwMYBVOKX xYedrbXeslLoJ967BqE8vKtTx5FiIdUO1mgVXz78KUfyplFzf4PqGjdivHHWzfF4Wwh9 K3A1CN21MrUqctsvqckQ/825srBxBiQEs6BnPPrqhgGRzeJgpUb/wemlLkUud6eKVA9F XD/w== X-Gm-Message-State: AG10YOTuJG/GviZ+/ErbI5o12xN81toR7VF8S1s8gNCIAGwglZdo05ZvByocgD0uAKhaJXcTZU0= X-Received: by 10.98.32.150 with SMTP id m22mr44182979pfj.27.1456215208094; Tue, 23 Feb 2016 00:13:28 -0800 (PST) Received: from ubuntu1504.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id 17sm41920352pfp.96.2016.02.23.00.13.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Feb 2016 00:13:27 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Tue, 23 Feb 2016 16:12:51 +0800 Message-Id: <1456215173-4456-7-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456215173-4456-1-git-send-email-hongbo.zhang@linaro.org> References: <1456215173-4456-1-git-send-email-hongbo.zhang@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v4 6/8] linux-generic: systemcpu(): use input parameter instead of global data 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Hongbo Zhang In the systemcpu() function, odp_global_data.system_info.huge_page_size should be sysinfo->huge_page_size instead, because when systemcpu() is called, the &odp_global_data.system_info is passed as parameter, we should operate the parameter instead of the global data directly, what's more, in function systemcpu(), sysinfo->cpu_count and sysinfo->cache_line_size are used, we should follow same pattern for sysinfo->huge_page_size. Signed-off-by: Hongbo Zhang Reviewed-and-tested-by: Bill Fischofer --- 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 bedbbc8..2d202a0 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -137,7 +137,7 @@ static int systemcpu(odp_system_info_t *sysinfo) return -1; } - odp_global_data.system_info.huge_page_size = huge_page_size(); + sysinfo->huge_page_size = huge_page_size(); return 0; }