Message ID | 1442325342-13806-18-git-send-email-hongbo.zhang@freescale.com |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDPILVOKSELBBA6P4CXQKGQERQBJN6Y@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by patches.linaro.org (Postfix) with ESMTPS id 260F322A0D for <linaro@patches.linaro.org>; Tue, 15 Sep 2015 14:13:24 +0000 (UTC) Received: by lamp12 with SMTP id p12sf60537317lam.2 for <linaro@patches.linaro.org>; Tue, 15 Sep 2015 07:13:23 -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:mime-version:spamdiagnosticoutput :spamdiagnosticmetadata:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :content-type:content-transfer-encoding:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list; bh=pcxtNOA6qYLrjFEeRftfMDUi9HN9LJfaevB3CTAlNE8=; b=gzHVw5DXMD7e1QGp1SUFZdTJklCLJhXpWqqJRtM5VLEnBZU602ReDEdut+THgluOh+ hXtTqXJfIuOn8/8KLuW5EM6u/1jl8rms9EskGdoNdDfMMkFPWPyQwTgU8Xrggc1EQojq zzZuordlxWTnLav4zT0wZ54k43bvmjw/oyjsMbkIqhTHskwHw5Mmqkzd7yTHxkRTIja+ +4beaBLBasSsd1ZgByv5rhyKuIOsVzGU5N8a5MFOxaaOj90yVkzuREii4cg4EkIH3duv iApdeCQp4kk1uyibnDCmSIE0bs+AASR+wP2n3VUOnfQ9Pdu8kdntDRGakILk7oh3b3ik OlzA== X-Gm-Message-State: ALoCoQkibE5bI7tqTMP3Uibkm+cp9C7PY6k00X3XZujjByaQ9ikchkI1O/SvplS3Qp+5JHj03Q9a X-Received: by 10.112.125.104 with SMTP id mp8mr2433104lbb.20.1442326403093; Tue, 15 Sep 2015 07:13:23 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.42 with SMTP id g10ls382340lah.91.gmail; Tue, 15 Sep 2015 07:13:23 -0700 (PDT) X-Received: by 10.112.162.2 with SMTP id xw2mr21338994lbb.98.1442326402968; Tue, 15 Sep 2015 07:13:22 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id ab1si4899515lbc.108.2015.09.15.07.13.22 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2015 07:13:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by lahg1 with SMTP id g1so79028944lah.1 for <patchwork-forward@linaro.org>; Tue, 15 Sep 2015 07:13:22 -0700 (PDT) X-Received: by 10.112.72.97 with SMTP id c1mr21514131lbv.86.1442326402827; Tue, 15 Sep 2015 07:13:22 -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.59.35 with SMTP id w3csp1830548lbq; Tue, 15 Sep 2015 07:13:21 -0700 (PDT) X-Received: by 10.140.86.85 with SMTP id o79mr32566684qgd.26.1442326401650; Tue, 15 Sep 2015 07:13:21 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m9si17071597qkl.95.2015.09.15.07.13.20; Tue, 15 Sep 2015 07:13:21 -0700 (PDT) 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; Received: by lists.linaro.org (Postfix, from userid 109) id 1FFA761963; Tue, 15 Sep 2015 14:13:20 +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=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 46AA462CCD; Tue, 15 Sep 2015 13:58:44 +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 EA8E862CDF; Tue, 15 Sep 2015 13:58:40 +0000 (UTC) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0126.outbound.protection.outlook.com [207.46.100.126]) by lists.linaro.org (Postfix) with ESMTPS id 5DC93619AE for <lng-odp@lists.linaro.org>; Tue, 15 Sep 2015 13:56:35 +0000 (UTC) Received: from BLUPR0301CA0032.namprd03.prod.outlook.com (10.162.113.170) by BN3PR0301MB1267.namprd03.prod.outlook.com (10.161.209.147) with Microsoft SMTP Server (TLS) id 15.1.268.17; Tue, 15 Sep 2015 13:56:31 +0000 Received: from BN1AFFO11FD035.protection.gbl (2a01:111:f400:7c10::136) by BLUPR0301CA0032.outlook.office365.com (2a01:111:e400:5259::42) with Microsoft SMTP Server (TLS) id 15.1.268.17 via Frontend Transport; Tue, 15 Sep 2015 13:56:31 +0000 Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD035.mail.protection.outlook.com (10.58.52.159) with Microsoft SMTP Server (TLS) id 15.1.262.18 via Frontend Transport; Tue, 15 Sep 2015 13:56:31 +0000 Received: from hongbo.ap.freescale.net (hongbo.ap.freescale.net [10.193.20.3]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t8FDtiXg031670; Tue, 15 Sep 2015 06:56:28 -0700 From: <hongbo.zhang@freescale.com> To: <lng-odp@lists.linaro.org> Date: Tue, 15 Sep 2015 21:55:42 +0800 Message-ID: <1442325342-13806-18-git-send-email-hongbo.zhang@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442325342-13806-1-git-send-email-hongbo.zhang@freescale.com> References: <1442325342-13806-1-git-send-email-hongbo.zhang@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD035; 1:/JgphjmastDJhTAwu4RmpNONb0bW+4JW6oqyofTOTrNuOyXsvjYYmBn8vXI+uQ2fd6BoU75Q426Z0FirtHKBpWare4uCbJ0ZOoL/wmIc44xaP67bIFvTKgutk2sryoJp7T8wTjxQTAgupE8pTe9jy+wUi9tDWG4vGdZgLC88VpnGHr5abP/YYfE04lap8IDeY0+bnM+XMYwDLOr2UxTJfwzZvbON7PAEEDBEQNw7B+6z7R/7OHOd6/3BGR3DM8j3x+ncoIGMq9LQtwU/mjyXfS3fYf343IzTaAA9ZUhA6wTdMNphJ6kc7jYZojD0JbSK4a2zCXzyAtTonvua2AU++IwPYI8LS+asKAqtBfBJCz9Sx/Sv4Uk7dyhjYDcpF9kifBXsujAWE4yG2GuKuLDLcg== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(86152002)(105606002)(77156002)(189998001)(19580405001)(64706001)(69596002)(62966003)(87936001)(19580395003)(47776003)(5001860100001)(85426001)(68736005)(104016003)(77096005)(5001960100002)(5007970100001)(110136002)(5003940100001)(5001830100001)(106466001)(4001540100001)(2351001)(48376002)(97736004)(229853001)(50226001)(81156007)(6806004)(50986999)(46102003)(76176999)(92566002)(2950100001)(50466002)(86362001)(33646002)(11100500001)(36756003)(41533002)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR0301MB1267; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1267; 2:IkOJc+wCNWUa6P0rPvMqiXa2rdnzTnP1d9TOOsY6yHSlwrIK1ty8Pt2JMKrdJqHg/gpasu0yH7dzeiN5/3FzusLP1PW8InxZoUrlQg6+OyQUF7lw95+CPNbytB1A8ofb7qAhkE3Ol5LfdnWwwDLbupAPGKgKoMqWZvO6w132ZUg=; 3:GOMX+Ym1bPSlB3gIolu+6vUeMXxSIkIj9bl+Ai4lDIFATZ/4yhP7LlGQegOQj1wl47rAduC0t0dnTKxJqmcWrgFlJ9DQmR55PhOEHd+W6l3+HzhCMOdBWxkINoeWcGZPD8ZE2yrIevgYblOkzNizE7e7JozJpVMZDlUX0tbcR6VwsDxcQzOym+6BvKEdEY0ENq5S0ONpVzTnUnzrknHymBYQpOon6Qks6+j1odywTIc=; 25:kqQ6ZyTs/O1kKwOiv/6YgC2YVuhvWLvrr9Vtu30sCaxOdyADGDQ0raVAk+ijBB1Zj143Gi5ChVgK76h43t/XOcpNfYsA5CFjtt32mx7RZ99puzfyEg/zRiFmrY8oa4Uoms4EKJjP0z8lUgXTBFRbrhPRDlEq4GDJBfkpQUBrWLSXFsUzI1qv+H53zXDpaS76ePXPEzoJA8m2IyqtOPjx0rD10hXwLN61rr/ERfaZCFLJCC9ESKOHj7+bamuo9gi2X+5TJPxc5yYmhq31V8qllw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1267; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1267; 20:mZVO9QwCJaTryZw/DSueXzfU9AOylTVHLAPywN+3/EQQXkpfp4PgLicds8NFdfHRWMCeTT108QObPW/NhAM7C2k/Ru3uWAJrokE1EizktFGyf1xZ/vovnH2DpjBYghxwVhnB2IFv9fMMNTSAdTle8tqsIsutJSM3FfET+23907xhHKfGgilU0h6zfD8WRDOh1U45IpXQfYZVE+Gk5JPp7HtITDVk/7dDBI3L4sxbvMfUPW9MDTh1QcJSsMotL/hfP22/RDj8u6LGAu6ovgW7xGvsDxSWZz00NFaYypPX6BN9xUWJ56hYJay8XyzO/vHQwze0CQEqZjKRg0fCh47+ThukPfpEhxX/MhMB+NUSZ6A=; 4:YYuOXEhBEfk3eprjFjZ3TZDM1c49cGmN9GndDnNx1WnI5v/KTO/fKleQpBm9BridMHOCcFikPzK8iu7FDIqdKMpjsKwnoEDUJMyqofgKgUyT3PQid79SVoqF2vhF24wiECx+o1CBtYD+J1+Ok2yWrOwh119mFtAOagnrmR6pMXIPZPkGwvekn7fGhlpUOx706GJhUATe7H8R37zoW7lTYepnQZucwqRjOaDmgHT0q7aJVib+RBj0ih8DgNr5t3sxyrwD/E2gnMPnenQE0xwCcGrAycMslhNeLku5dnD5xjhgM1l9P8HI9RjMttOPqSY85q4PB5dwN8CWmgJ+IKK7ewwlYQy3uqz6ArY3sZdBwHA= X-Microsoft-Antispam-PRVS: <BN3PR0301MB12670ADD29B6C39C7535CA5D8E5C0@BN3PR0301MB1267.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(8121501046)(520075)(5005006)(520078)(3002001); SRVR:BN3PR0301MB1267; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0301MB1267; X-Forefront-PRVS: 070092A9D3 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0301MB1267; 23:JG4e09o7n3Bp3uTL2JBZB9/meDiX3XzS4bJ8a5Y?= =?us-ascii?Q?8dvWlyeVUN4YKhtZnwTRCyKmIbLwKELMA86AUFjU6xijTLTujahp4eqkAV15?= =?us-ascii?Q?ctYDDPd0xPjP7g9WaqXQGILn+++a604brJXybdgxk4yH7Pe1jVDfM1Muy+4l?= =?us-ascii?Q?jjnk6VNd9ONE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y/Gx?= =?us-ascii?Q?XOxAT43Yr0CANF6X6O0TX5n804Vf/jJn+JRcAj2HnN+iXsjr9/5v2/xJcrld?= =?us-ascii?Q?EpwpTBKqmesQgNNh3CrFoCBNBfbjpnYdwbmtDnlS1Z5E09OamR67m69b2Rd2?= =?us-ascii?Q?CCZOEhIGvbiOt6WnwWrvZ9RlTc1rKuJSJJ9Ic7Qw1MoZcr5AIIvmZpjztOXZ?= =?us-ascii?Q?of4vcn8xL8tpvmuxygkIEQVys6+TMDSRtPrHZBe+S9q6lbVe4aVVdJ3qfKys?= =?us-ascii?Q?EqQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1267; 5:94W9wMED8/kJD3rWZ4MgCgZHmW8Dk3W/rk6v9h2/tbHByvaalW4gSs76+q0annFHsAPlr2KjV3SgOol2rP2FvTYqqWnDDtRT/ZL7/eIEJifAg3VjBHHQ6uHC3RyNb3zy7DeNPLnizkZZ8c3FCVERCQ==; 24:ahYD1Gxx21H0xv45o6O4OYNbSVqmAwri/QAmib1KSIt/+7ISEv2oCaXweLo4syiU3RJJSYedfpvrhdnULuNaKIFOgJQVOoehfWhA3t0OJDw=; 20:ZmEfY15ybsYHIcOdKgLBRrVT2JFfgmPQgBhQUNRxmzzZDDclwUbJxzYKjHn28BgRv+cU0/M+Vl8ZoD4SpvucEA== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2015 13:56:31.2132 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0301MB1267 X-Topics: patch Cc: petri.savolainen@nokia.com, stuart.haslam@arm.com Subject: [lng-odp] [API NEXT PATCH v5 17/17] linux-generic: update CPU Hz calling functions X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <https://lists.linaro.org/mailman/listinfo/lng-odp>, <mailto:lng-odp-request@lists.linaro.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" <lng-odp-bounces@lists.linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@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.48 as permitted sender) smtp.mailfrom=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 |
diff --git a/platform/linux-generic/arch/linux/odp_time_cycles.c b/platform/linux-generic/arch/linux/odp_time_cycles.c index 4dc0764..ed6e560 100644 --- a/platform/linux-generic/arch/linux/odp_time_cycles.c +++ b/platform/linux-generic/arch/linux/odp_time_cycles.c @@ -11,6 +11,7 @@ #include <odp/time.h> #include <odp/hints.h> +#include <odp/cpu.h> #include <odp/system_info.h> #include <odp_debug_internal.h> @@ -27,7 +28,7 @@ uint64_t odp_time_cycles(void) if (ret != 0) ODP_ABORT("clock_gettime failed\n"); - hz = odp_sys_cpu_hz(); + hz = odp_cpu_hz_max(); sec = (uint64_t) time.tv_sec; ns = (uint64_t) time.tv_nsec; diff --git a/platform/linux-generic/odp_time.c b/platform/linux-generic/odp_time.c index a08833d..f864ade 100644 --- a/platform/linux-generic/odp_time.c +++ b/platform/linux-generic/odp_time.c @@ -8,6 +8,7 @@ #include <odp/time.h> #include <odp/hints.h> +#include <odp/cpu.h> #include <odp/system_info.h> #define GIGA 1000000000 @@ -22,7 +23,7 @@ uint64_t odp_time_diff_cycles(uint64_t t1, uint64_t t2) uint64_t odp_time_cycles_to_ns(uint64_t cycles) { - uint64_t hz = odp_sys_cpu_hz(); + uint64_t hz = odp_cpu_hz_max(); if (cycles > (UINT64_MAX / GIGA)) return (cycles/hz)*GIGA; @@ -33,7 +34,7 @@ uint64_t odp_time_cycles_to_ns(uint64_t cycles) uint64_t odp_time_ns_to_cycles(uint64_t ns) { - uint64_t hz = odp_sys_cpu_hz(); + uint64_t hz = odp_cpu_hz_max(); if (ns > (UINT64_MAX / hz)) return (ns/GIGA)*hz;