From patchwork Wed Mar 2 19:29:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 63412 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2559393lbc; Wed, 2 Mar 2016 11:32:25 -0800 (PST) X-Received: by 10.140.22.212 with SMTP id 78mr31478221qgn.77.1456947145702; Wed, 02 Mar 2016 11:32:25 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q131si37331576qha.85.2016.03.02.11.32.25; Wed, 02 Mar 2016 11:32:25 -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 447DD62FC4; Wed, 2 Mar 2016 19:32: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=-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 6A395650ED; Wed, 2 Mar 2016 19:30:55 +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 3C9A462EF6; Wed, 2 Mar 2016 19:30:47 +0000 (UTC) Received: from mail-qg0-f46.google.com (mail-qg0-f46.google.com [209.85.192.46]) by lists.linaro.org (Postfix) with ESMTPS id A822D650C9 for ; Wed, 2 Mar 2016 19:30:20 +0000 (UTC) Received: by mail-qg0-f46.google.com with SMTP id t4so21112076qge.0 for ; Wed, 02 Mar 2016 11:30:20 -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=Mrw9DvY+XbaVsKXBTH0wv1Gaj+PTqjFnyWtm2qBv/B0=; b=AhH6ExGmt9rQ4IrxoVqQgiL8fY99MIc/VdnhzrGNQifjm9nprdznW5EU2h0hLpjC2m po/3pbP/Ek+G3it5GB+7ymyYbDOMaxzT9dIXJ4qJDNizQIUmDdHZ5b3Y+vurBSqt2g5C yj9zV9lSAe3fmKxlIQlrpqV9ejFjNwYUTO6t5rCvjmlgQVY6dafr79btMuFI3mxYQXba h074KybHMJ4oUL82zkDHwtp1MKcuSs/+qhP9Mas9q9RNSqWrIlyXaBy3MAc1uCDFfE3T Ojt3unJm1Co1M6u3AUQu7EaXdIogh1Lia/j4UwOUZOpaiCDqb5zZc5qZL+lIK+g5o24f FmZA== X-Gm-Message-State: AD7BkJIDjdZLY0A+pzajDpvCntFV/ciUGEgbNBDjR2cRfGK0qUr81PsEYvsOY1cKxHxLYzSzHXs= X-Received: by 10.140.19.52 with SMTP id 49mr35384117qgg.103.1456947020418; Wed, 02 Mar 2016 11:30:20 -0800 (PST) Received: from localhost.localdomain (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by smtp.gmail.com with ESMTPSA id a129sm15527538qkb.45.2016.03.02.11.30.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Mar 2016 11:30:19 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Wed, 2 Mar 2016 14:29:50 -0500 Message-Id: <1456946992-19251-7-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1456946992-19251-1-git-send-email-mike.holmes@linaro.org> References: <1456946992-19251-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v5 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; }