From patchwork Wed Apr 1 22:29:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 46669 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 21F662159A for ; Wed, 1 Apr 2015 22:30:36 +0000 (UTC) Received: by wibgr10 with SMTP id gr10sf14726351wib.2 for ; Wed, 01 Apr 2015 15:30:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=Brrw2jviNkGaj1R7x6kpMZr58D0SyB8z98WaLNpJEU8=; b=QrD4vCXc/3AVFu/4/YjXQxh8SlE88h+xCN1yxIxJLVVoZkSFJg/KLeQw4kch/tE3Wh jElZiNv2YUbd0eeoT10QTOyzoZdk0yj4oHao8zeCQPi6gv9PY+vA8HQ6tisuzrDpEOgT eJO4ruz368Xab3Cd/qFVuqkWwTXybBzCguWcVKndWizwbjKW63hdOwVJYo2adesoie+9 xt2RhkMD3gZGxrDFz9rrVma03R5enOu9JdD1XkHGngvH7F1TCew0mXd5gMidGlWRzwld X6W89SLkGTA3WXKlVYtpmldn4JSfrZE0D7LqGmhP+nBgEY4+ar2XvsIgJvuqgT5Mw8l3 o5tw== X-Gm-Message-State: ALoCoQl3P5PCxNvOz60DFNIJQJ0w86EJxZkTr94iNIjKNOhzR2vkPdDrmF+QENYMw/I8ZTOG2doI X-Received: by 10.180.126.37 with SMTP id mv5mr2417836wib.3.1427927435384; Wed, 01 Apr 2015 15:30:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.198.232 with SMTP id jf8ls141591lac.83.gmail; Wed, 01 Apr 2015 15:30:35 -0700 (PDT) X-Received: by 10.152.29.68 with SMTP id i4mr38071166lah.19.1427927435214; Wed, 01 Apr 2015 15:30:35 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id ms7si2695531lbb.51.2015.04.01.15.30.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Apr 2015 15:30:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by lagg8 with SMTP id g8so47638088lag.1 for ; Wed, 01 Apr 2015 15:30:35 -0700 (PDT) X-Received: by 10.112.46.74 with SMTP id t10mr11154420lbm.73.1427927435118; Wed, 01 Apr 2015 15:30:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.57.201 with SMTP id k9csp951909lbq; Wed, 1 Apr 2015 15:30:34 -0700 (PDT) X-Received: by 10.55.16.87 with SMTP id a84mr46509748qkh.86.1427927432500; Wed, 01 Apr 2015 15:30:32 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q67si3256082qgd.39.2015.04.01.15.30.31; Wed, 01 Apr 2015 15:30:32 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 1DF1F6503D; Wed, 1 Apr 2015 22:30:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 96CF865040; Wed, 1 Apr 2015 22:30:04 +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 231D76503D; Wed, 1 Apr 2015 22:30:03 +0000 (UTC) Received: from mail-qc0-f173.google.com (mail-qc0-f173.google.com [209.85.216.173]) by lists.linaro.org (Postfix) with ESMTPS id 76C1265036 for ; Wed, 1 Apr 2015 22:30:02 +0000 (UTC) Received: by qcgx3 with SMTP id x3so54181163qcg.3 for ; Wed, 01 Apr 2015 15:30:02 -0700 (PDT) X-Received: by 10.55.20.145 with SMTP id 17mr42544041qku.46.1427927402279; Wed, 01 Apr 2015 15:30:02 -0700 (PDT) Received: from mike-desktop.?.holmesfamily.ws (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by mx.google.com with ESMTPSA id w130sm2228709qha.25.2015.04.01.15.30.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Apr 2015 15:30:01 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Wed, 1 Apr 2015 18:29:54 -0400 Message-Id: <1427927394-15702-2-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1427927394-15702-1-git-send-email-mike.holmes@linaro.org> References: <1427927394-15702-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 2/2] linux-generic: odp_system_info: rename odp_system_info X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: 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" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mike.holmes@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Mike Holmes --- platform/linux-generic/include/odp_internal.h | 3 +-- platform/linux-generic/odp_system_info.c | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h index 64dee42..1ced46c 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -31,11 +31,10 @@ typedef struct { char model_str[128]; } odp_system_info_t; - struct odp_global_data_s { odp_log_func_t log_fn; odp_abort_func_t abort_fn; - odp_system_info_t odp_system_info; + odp_system_info_t system_info; }; extern struct odp_global_data_s odp_global_data; diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c index cae310f..077e015 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -299,7 +299,7 @@ static int systemcpu(odp_system_info_t *sysinfo) return -1; } - odp_global_data.odp_system_info.huge_page_size = huge_page_size(); + odp_global_data.system_info.huge_page_size = huge_page_size(); return 0; } @@ -343,9 +343,9 @@ int odp_system_info_init(void) { FILE *file; - memset(&odp_global_data.odp_system_info, 0, sizeof(odp_system_info_t)); + memset(&odp_global_data.system_info, 0, sizeof(odp_system_info_t)); - odp_global_data.odp_system_info.page_size = ODP_PAGE_SIZE; + odp_global_data.system_info.page_size = ODP_PAGE_SIZE; file = fopen("/proc/cpuinfo", "rt"); if (file == NULL) { @@ -353,11 +353,11 @@ int odp_system_info_init(void) return -1; } - compiler_info.cpuinfo_parser(file, &odp_global_data.odp_system_info); + compiler_info.cpuinfo_parser(file, &odp_global_data.system_info); fclose(file); - if (systemcpu(&odp_global_data.odp_system_info)) { + if (systemcpu(&odp_global_data.system_info)) { ODP_ERR("systemcpu failed\n"); return -1; } @@ -372,30 +372,30 @@ int odp_system_info_init(void) */ uint64_t odp_sys_cpu_hz(void) { - return odp_global_data.odp_system_info.cpu_hz; + return odp_global_data.system_info.cpu_hz; } uint64_t odp_sys_huge_page_size(void) { - return odp_global_data.odp_system_info.huge_page_size; + return odp_global_data.system_info.huge_page_size; } uint64_t odp_sys_page_size(void) { - return odp_global_data.odp_system_info.page_size; + return odp_global_data.system_info.page_size; } const char *odp_sys_cpu_model_str(void) { - return odp_global_data.odp_system_info.model_str; + return odp_global_data.system_info.model_str; } int odp_sys_cache_line_size(void) { - return odp_global_data.odp_system_info.cache_line_size; + return odp_global_data.system_info.cache_line_size; } int odp_cpu_count(void) { - return odp_global_data.odp_system_info.cpu_count; + return odp_global_data.system_info.cpu_count; }