Message ID | 1444734798-29063-10-git-send-email-hongbo.zhang@freescale.com |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDPILVOKSELBBQ626OYAKGQEAIWYJZY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by patches.linaro.org (Postfix) with ESMTPS id 255C020490 for <linaro@patches.linaro.org>; Tue, 13 Oct 2015 11:38:44 +0000 (UTC) Received: by wijq8 with SMTP id q8sf8946812wij.1 for <linaro@patches.linaro.org>; Tue, 13 Oct 2015 04:38:43 -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=R7ig6bHhW0wgCfEQOCTlbYdedaapqiz7DvY/xdEensg=; b=UlDZZiDq9GkFNhuySgyC2W4g6dDe6hAWH7ifjRyvJA+QadsurgrifaCVMYBs5tT7sO IwnEHe5ZUYt+Twc5XXhVkJPGv+q+LANBuRE3xEDQiVsZe8B1o84JsLkrLmYFrt2X9JZv byZT/dWCauyPrVf7HYbzbemshmA+maJYTXrn62Twr3zIT8xZUxzrOKrTwZIVGO89R9cu fI/IF6TPMqMoEnsJcoHz/tH/+YDgynroGIRCMIkmbVuNFhN7vQmN+pzgWAMaolicE8qx ZzFCrSpkfRJNSqu33G8dr1wizDMKCtHQqEccsxlIUXFX3PxdOa5j1B7ngz8PMmK/i/G9 DSRA== X-Gm-Message-State: ALoCoQmMIdiw+qt3HeJ23xIUCBk6Pgh4A/5tRbT6H9AnTlSwDuF5tA7AdoGcm4QgmiBt6plooium X-Received: by 10.112.202.165 with SMTP id kj5mr6826046lbc.5.1444736323375; Tue, 13 Oct 2015 04:38:43 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.85.81 with SMTP id j78ls632437lfb.81.gmail; Tue, 13 Oct 2015 04:38:43 -0700 (PDT) X-Received: by 10.25.18.226 with SMTP id 95mr9609733lfs.96.1444736323263; Tue, 13 Oct 2015 04:38:43 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id a21si1893603lfa.82.2015.10.13.04.38.43 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Oct 2015 04:38:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbbck17 with SMTP id ck17so16326444lbb.1 for <patchwork-forward@linaro.org>; Tue, 13 Oct 2015 04:38:43 -0700 (PDT) X-Received: by 10.112.17.34 with SMTP id l2mr14570927lbd.117.1444736323150; Tue, 13 Oct 2015 04:38:43 -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 w3csp2076538lbq; Tue, 13 Oct 2015 04:38:42 -0700 (PDT) X-Received: by 10.55.197.132 with SMTP id k4mr38257726qkl.18.1444736322256; Tue, 13 Oct 2015 04:38:42 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f92si2381028qge.78.2015.10.13.04.38.42; Tue, 13 Oct 2015 04:38:42 -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 D862A61A1E; Tue, 13 Oct 2015 11:38:41 +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 0EBDE61099; Tue, 13 Oct 2015 11:33:25 +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 03FC361B57; Tue, 13 Oct 2015 11:33:18 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0139.outbound.protection.outlook.com [157.56.110.139]) by lists.linaro.org (Postfix) with ESMTPS id 749BD61A21 for <lng-odp@lists.linaro.org>; Tue, 13 Oct 2015 11:31:55 +0000 (UTC) Received: from BY2PR03CA006.namprd03.prod.outlook.com (10.255.93.23) by BL2PR03MB324.namprd03.prod.outlook.com (10.141.68.27) with Microsoft SMTP Server (TLS) id 15.1.293.16; Tue, 13 Oct 2015 11:31:53 +0000 Received: from BN1BFFO11FD018.protection.gbl (10.255.93.4) by BY2PR03CA006.outlook.office365.com (10.255.93.23) with Microsoft SMTP Server (TLS) id 15.1.293.16 via Frontend Transport; Tue, 13 Oct 2015 11:31:52 +0000 Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD018.mail.protection.outlook.com (10.58.144.81) with Microsoft SMTP Server (TLS) id 15.1.293.9 via Frontend Transport; Tue, 13 Oct 2015 11:31:52 +0000 Received: from hongbo.ap.freescale.net (hongbo.ap.freescale.net [10.193.20.96]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t9DBVOFr009638; Tue, 13 Oct 2015 04:31:49 -0700 From: <hongbo.zhang@freescale.com> To: <lng-odp@lists.linaro.org> Date: Tue, 13 Oct 2015 19:13:13 +0800 Message-ID: <1444734798-29063-10-git-send-email-hongbo.zhang@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1444734798-29063-1-git-send-email-hongbo.zhang@freescale.com> References: <1444734798-29063-1-git-send-email-hongbo.zhang@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD018; 1:kz8ukq+BtSyb60tdRYq2GxYgGhYHipNC7XCjtBSKam9ogE65rMLhVVz06wZEKsMSDHNkCLHIhmmt0jfsSaWG6WlDHWgIVhXYjWmTWgeSWpIE7Fcm8wbQ2qSf8yJ6rz8EU2AblJg0LpaR48Mluly7C0k8W5n4+CP+Pnxs2q2uv/Gi0txudzchbCz2V+qYKmv96LJWuu3jrOb5VJDTfUTtJ0LqQkpLAkSDwkS494DHdLv2dn8GudRXVJ8xCN4H2Rxi9gxcs/LaFca/OeUt+pgYluZccx93KuEre44np5DMN67TqXRi24FVvaGR9ZqEX/VYwgy3uuZPpfxqP9CHTQYeUAMangwnoRyRU1HnDJOtQvVL+bS1v4fj/0/DtcKHq1qA0KWh6z1dLP0ro9TCCf3p8Q== X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(105606002)(46102003)(6806005)(5007970100001)(106466001)(77096005)(229853001)(85426001)(33646002)(50986999)(5003940100001)(11100500001)(19580405001)(92566002)(110136002)(64706001)(47776003)(76176999)(19580395003)(87936001)(2950100001)(2351001)(104016004)(81156007)(50226001)(97736004)(50466002)(36756003)(5008740100001)(86362001)(189998001)(5001920100001)(48376002)(86152002)(5001960100002)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR03MB324; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB324; 2:PwBPkslKaJQRoBh9PNF8kW0YIvQEhwFMJs4+zFHvKrPIwZ8bLicUfv5FBvuWBHwGvfacxt0QwiyIZqLjd6Tf6i1djF/Ka2Lu1DBe+liMGotI8wVD5B8j11lPpXUqRJxOKlOAeSb6ODDz1HqdRuQk42rXVD/Nqr8yrCywH9VplQ8=; 3:B7hitdItkual2gK6KYECDou4aXd5+qXCbw+pzqDozyOWt7Mlm9msNrYbprBHgGz+cqfsGiQ5+g4+nlLLvXDMJk2XadBg7eCvIbdeX7EtdOUG1JNZKholz6lxs5uBUUaJVKkKUNv9mCw8i5ydsG50PY7tjF/GMU4hc/fYFoqnMGGoUIYaLLdbOlHxNnSNFNSr8tOamH9ZlTpnj7P/drG5eBrmA659ccZ+urYjtL4R8No=; 25:IQuU5TLwReRIYnnNzasVe2aCct+iulHlLcolMqp/7z0IR4iRIY40dLII/XC4RTvolwDY0y52EeZBzFK4mqJMA1UVtIY/pfFBCABMqPhaPNwBZikYWvvprHQy54O0t8CEDipi+lE5sTTAE+DHNvTtAQ5DV1MUGSenAAE7jJf7kH4KBT9vt+PDEXvGaQnX71b7Dn5qvftcQFZ9ftRrqxZaj+dcvqENpc29GV6aWK+1gi22/yWFuNIgMKqWS74w9MsnFDc7Azv/2gManYhKydojOQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB324; X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB324; 20:BDCa4R4rZx8sNftFUiTvJRgPaHR3ppw1W2IbsxT0/Ys9+tBX/SVLFPA+3kQH4GzoXjwmKrzmr1t9+cqS7igWhL97vL2keBOWjeKgn2X6VORw3Xov3SpkpHeITqmiIO7FNh+sYaRCg/CMc4yRwD4suq+6a6/x9ZFuLG2feC/hclzFUJRHGUlvgPi5kHivXzTBguDdz2KuIJNc5YtBwgJ2jvMIg79ECdg9fn8KikgDXiyygTZNWeZjXX0jE6KCVUCGwmK0YsMQhOjNbl1MNl9RxSLabstxniDqeDI+KpobRq0ofm8B2jpFB1t3ZWG1KsR0OWdrwSkWLG4TvEO6/kW/DesWyCqspK6rlLdFmGmx+PY=; 4:nRaCrNbJhuVzt6WEQOL4s08GHj5FaYMoPk31nD/ELoxbNa+ikVryOh+6FgIYr/VvVgJxUFQhcPYGKxwOYOm1EP58ecyCDZDANH7CcAOShgTn2mS1tSmXjVUPazc/txWzibAe/u21098mqirwEf7mO2KcBO+0GUAQfGEGYYUUhf8jT7Uy0imW2UkmcSj6SV2i38eMgkOhL7OvOGQW1GBJND30NmBiycW/DPXHU+9CJcbwNJjVaHL2QR6IBhBOc1dJmDcT2IS8QRi2n9GD21MjJ2R65o6JkoVHJz/Fo6w1hshSuuTk1WZCn6d2o1aCTABT4NwyZxoc9VAwObk2oVkP2PFlWSsCr3ww9te5nR7ug4o= X-Microsoft-Antispam-PRVS: <BL2PR03MB32402B809A480164BB3A7B18E300@BL2PR03MB324.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(520078)(3002001); SRVR:BL2PR03MB324; BCL:0; PCL:0; RULEID:; SRVR:BL2PR03MB324; X-Forefront-PRVS: 07283408BE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL2PR03MB324; 23:aUf/3VHQRGQM8VrfG101tYzUg05tFjxGsDzEcxquKE?= =?us-ascii?Q?Y/7QgX+nqKrfqewr+GHo2+wB7+No+OVPSY0Ff8oss0k914zsxhWhFebjw5oZ?= =?us-ascii?Q?PdyaF1jOjRw5ilqL/iOIxntHT54F7tdnRxwBQagb4JPisY8Zbx7TB/HxOIfc?= =?us-ascii?Q?jjaeJdqL2PaIcP7tTSLkIhrWKGd0weQLp3WSt56WTO5GYOv1AQJWCYy37vD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DvkB1nseEC50jfAHL9yPve1IojaVX8IS?= =?us-ascii?Q?x+dPN1S/UqAMvChSt5vaVioAopL29cpOSvZsGVB7xdp7MsUc6AzQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB324; 5:8eXW/dsijQLMT3WrIJ2gmy0Jx+h+zXnUGOnMlQcPY2OopheZzmqVVtClpcxbABhIr+XlEfy9Lu1yr5W+f4VaUhWPbjJJYlDLze3rMQ3uocX+Uxn0nIXP0dvYGBTRtbZxE9jIHC4uNYF5lxfp5QmjZA==; 24:05706QDtgWC22fMZWmNHmyahEFtSxUgWWlWEZQpFYHM89MDg45zSng02Gp72BYV5mjIHYUF/sacO97sALJwNZ0NK4SBkewc+I9/mrsb8//M=; 20:/QQcydjSBmwkVXfjCqVQlARWdf/+1afVIGuMRvi2fp4X6ghxwjXh3hwZBQGCK2QOk2gdM87ulpPUbXep4jHQrA== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2015 11:31:52.3393 (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.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB324 X-Topics: patch Cc: petri.savolainen@nokia.com, stuart.haslam@arm.com Subject: [lng-odp] [API NEXT PATCH v7 09/14] api: cpu: add new API to get per-CPU current frequency 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.217.174 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/include/odp/api/cpu.h b/include/odp/api/cpu.h index 7eb326d..80d2638 100644 --- a/include/odp/api/cpu.h +++ b/include/odp/api/cpu.h @@ -75,6 +75,17 @@ const char *odp_cpu_model_str_id(int id); uint64_t odp_cpu_hz(void); /** + * Current CPU frequency of a CPU (in Hz) + * + * Returns current frequency of specified CPU + * + * @param id CPU ID + * + * @return CPU frequency in Hz + */ +uint64_t odp_cpu_hz_id(int id); + +/** * Maximum CPU frequency in Hz * * Returns maximum frequency of this CPU diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c index 385a7d0..8bd1584 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -422,6 +422,11 @@ uint64_t odp_cpu_hz(void) return arch_cpu_hz_current(id); } +uint64_t odp_cpu_hz_id(int id) +{ + return arch_cpu_hz_current(id); +} + uint64_t odp_cpu_hz_max(void) { return odp_cpu_hz_max_id(0);