Message ID | 1442495411-12362-11-git-send-email-hongbo.zhang@freescale.com |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDPILVOKSELBB4EB5OXQKGQE3ABXKIA@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id C990522E57 for <linaro@patches.linaro.org>; Thu, 17 Sep 2015 13:32:33 +0000 (UTC) Received: by lbot4 with SMTP id t4sf6390195lbo.0 for <linaro@patches.linaro.org>; Thu, 17 Sep 2015 06:32:32 -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=tdseatFz4CE036TAt3pLc4fuhRkOX0aT2isiNYogpW4=; b=HZNDmJSvW9+BBn8bs0zlsSwXpgx4jOpS0Zf1JGV9AhrqC5Xl/fV2LqJAR03kuV0Ber Q01z0FjOYIOEuD9oR56CPQK8XCVDr071BYV/bt2GHTDmMYyUqfFFD7+/LMPCvmIaoZhB IAdLTcg+/bua48QDusGwO72DdiuBYc5YGnz7hSH2kbSF5ycQECz2s3kAXvOLEEdEjkG3 9vbY2pyeP8Iq71zTZ5VpNT8JFWhhCrEYP1zdEybWovf+8/INlT26n2/fQx0NfpWLa7yZ mL04jOWBpzSam1qMhCr14s1xA6OrLcctSrkwhiyL9ORKuENErRXBUQYStjFKpryxMjTI lNhA== X-Gm-Message-State: ALoCoQm3q4Tcf+PVTobLEByUHz9GKsRQ4fReecx7wrdplRfMuF1dMxlL7C7IBb47azSRO5laG+Do X-Received: by 10.152.26.5 with SMTP id h5mr2893994lag.5.1442496752803; Thu, 17 Sep 2015 06:32:32 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.98 with SMTP id j2ls85060laj.81.gmail; Thu, 17 Sep 2015 06:32:32 -0700 (PDT) X-Received: by 10.152.22.164 with SMTP id e4mr36485965laf.40.1442496752674; Thu, 17 Sep 2015 06:32:32 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id f10si1996615lbd.66.2015.09.17.06.32.32 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Sep 2015 06:32:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by lanb10 with SMTP id b10so11176561lan.3 for <patchwork-forward@linaro.org>; Thu, 17 Sep 2015 06:32:32 -0700 (PDT) X-Received: by 10.112.168.66 with SMTP id zu2mr36235544lbb.29.1442496752565; Thu, 17 Sep 2015 06:32:32 -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 w3csp3074196lbq; Thu, 17 Sep 2015 06:32:31 -0700 (PDT) X-Received: by 10.107.35.16 with SMTP id j16mr6649629ioj.167.1442496751401; Thu, 17 Sep 2015 06:32:31 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j3si2482999igx.31.2015.09.17.06.32.30; Thu, 17 Sep 2015 06:32:31 -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 B964D62D67; Thu, 17 Sep 2015 13:32:30 +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 49C1A62D6C; Thu, 17 Sep 2015 13:26:11 +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 9796D62D5B; Thu, 17 Sep 2015 13:26:00 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0137.outbound.protection.outlook.com [157.56.110.137]) by lists.linaro.org (Postfix) with ESMTPS id 4B33662D5E for <lng-odp@lists.linaro.org>; Thu, 17 Sep 2015 13:24:49 +0000 (UTC) Received: from BY2PR03CA004.namprd03.prod.outlook.com (10.255.93.21) by CY1PR0301MB1273.namprd03.prod.outlook.com (10.161.214.21) with Microsoft SMTP Server (TLS) id 15.1.268.17; Thu, 17 Sep 2015 13:24:47 +0000 Received: from BN1BFFO11FD029.protection.gbl (10.255.93.4) by BY2PR03CA004.outlook.office365.com (10.255.93.21) with Microsoft SMTP Server (TLS) id 15.1.274.16 via Frontend Transport; Thu, 17 Sep 2015 13:24:47 +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 BN1BFFO11FD029.mail.protection.outlook.com (10.58.144.92) with Microsoft SMTP Server (TLS) id 15.1.274.4 via Frontend Transport; Thu, 17 Sep 2015 13:24:46 +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 t8HDOGbn005200; Thu, 17 Sep 2015 06:24:43 -0700 From: <hongbo.zhang@freescale.com> To: <lng-odp@lists.linaro.org> Date: Thu, 17 Sep 2015 21:10:07 +0800 Message-ID: <1442495411-12362-11-git-send-email-hongbo.zhang@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442495411-12362-1-git-send-email-hongbo.zhang@freescale.com> References: <1442495411-12362-1-git-send-email-hongbo.zhang@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD029; 1:agelXChgJ1+/cOlwKP4U6Zek3YSUsIaFwIGQWxTLo9t2aypUXU52+5zckjv/Q744TIUNPzO1yOQtV6yRIQu7NDlidyGwFodLHJVUIGgNruvqmIhjSUBMwx3UhTRFtp10PWxChFIiB+GmpTfxRYR2AY30jYCFrzesoa8FrQeH+G9WnrN8coDqQo/q94+N+8dq0fz6pDCDgJxyVKM2qQzYYAJ9X1iG/1WFf9cPyjH+23aNRjlRfgcrAu5ifkRhtolxzvB96eAh+WcHKSRN5Tjk5hAVt/XdzTcRKHivfoCywzv5jTudTBfDBx6UJ4S8PMlFhNEtLItNTUnfPPo/IIMeBAfAWlsKbrKK4bLM1PRENJeFtsYjmaHQuijYRNcV3KIlUJ3jA/he5EPFnirxiwKRiw== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(5003940100001)(62966003)(50226001)(5007970100001)(85426001)(36756003)(77156002)(64706001)(6806004)(76176999)(69596002)(86362001)(2950100001)(92566002)(19580405001)(5001830100001)(104016003)(19580395003)(110136002)(86152002)(97736004)(11100500001)(48376002)(106466001)(4001540100001)(575784001)(47776003)(46102003)(2351001)(50466002)(105606002)(33646002)(81156007)(189998001)(5001860100001)(5001960100002)(50986999)(77096005)(68736005)(87936001)(229853001)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0301MB1273; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1273; 2:tuIqftS3UnPWkbkEZXw8VzO5QDdgA3sSWi7Tcyp6wkOXJxED1CNzn+E1PvXHuXvaUsfByTeP782C4roxVEnGDneQH6XrfUG3Us+rtfYHv1Nc7UJDHS4Ohozi+4uAdSL1NM29HusHGP8sqZgAUyb8cYLKvizcknd5ZjklA7jsBTo=; 3:iNo0NT261ahHmRogkfra3RojUU6EtKiIkjJl78q15pJw6UBd3OJF1D1RN6vCPtvQWHRE4dMv2LXEZFuYcKNPuxshoEYbXrAk9sF//yrzfNjlHIm5ch8mGvsS620y8jM3yuAFASncH3AhPh+dL9saSFTRMbbVgAQ1TReGxZfbxKNMQxcTAhvAD6H+Q0fwgJh4z51wRXpjpnr1e78EXvCP/gL2Tgu33FjeXGXZAAGYfBU=; 25:3A5Q6eBU5rThBrXY25/eInsmdQrIv85XMsh+bROqvTMQXQ/RQvqS5iDTyy5I6nS9l2QVV0dcKfFSfZNzfb1antFiH/1J3CxfQhRMyuD7BvIzXQZG/GveklxmSeM48vWHVFSUM+HWU0Sqz5gopMJpDvDDrnJTQ3IZpCqDx8P1l4HoDdM1/criNBHi1IKec0ctU36c7fDZ/+j+F+O0nH9NOfXEqxCdOC/JuRKZAVkbsu2D914McOfXu+EbyovEepDM X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1273; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1273; 20:Y7eIepM2veYh4yR6y1kQm24nqa0yTCJH8MQVghoMU3ydf0AEPon0CWUMUPbfUEIQbyrgbkIcYZa79CwXGddgftuyn9X6lCoUlPIrlMM7mYwG5DTxyqc2OWXFInuR1kjoNP18ptyy7hp1TrCpy3G2NDTnHf8u+Ok70Yvm0Mnftg8xkvHSEfxbB/7zzbHSJEuodHy2NpREq2UIacTQP4zWFFK2YuQbmDcAdqAepZzWORCHRgBzQNIQODfss+wSNpK8Pt1Co49RNi8VxHA9e4vrok/BcBfOdexpwnFomd90ldtPhuVSNRlDY3EFDHp1Xlw56ObJ2V786w6DawcQjP4xsw5RexOXHr74PQY2uxlVmxw=; 4:Clg88eQjOoizeYI9ZDn/V4gtGp8Rw/gES34f4nbOilU26oMwFwp9kE51y7Ds4N9GzPuDRg4WOjHQ6bTA3a7MiLpRA+mucSHgkgNimjd6TWm8AJ3ecWVZg1coMB7w0qchdb/YFMp9f3obWKVf5N2dzI9K/tgBJJ7VhipS4NbQeAxmjukRMgfg6zBTpLYZMo5YlH4HxiKVWOzgGulF+9YHggaF3ht4FfpjYZMMShnBRtFguk9cKWM179i6zUBDWa6GokaFWJLFVQrVx4lWBFkgqyXMrLZC3Pm8UZI1df79JPtrOWh9pBEURtSNpnRCaJ0+bsmPv6MYIqczb/6abF0037UJe7Aon6oSPxVKanDfUyI= X-Microsoft-Antispam-PRVS: <CY1PR0301MB12737DCACA4CC5359210471C8E5A0@CY1PR0301MB1273.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(520078)(520075)(5005006)(8121501046)(3002001); SRVR:CY1PR0301MB1273; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0301MB1273; X-Forefront-PRVS: 07025866F6 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB1273; 23:F0RmqhQT4KC7GIq5fajeoOVTTidKb2sGoPtc3mc?= =?us-ascii?Q?el2+lXd7TVZn/p5f5/9JHLfijCF//R0wkkRvCJ3ex4g7hu4SqaSYbliHnXpm?= =?us-ascii?Q?fo8yGv+ofzu8b2nGrKZHmhBv9NFzSjTbTAIPFwrerebXdzhWNR7Mp1408uPx?= =?us-ascii?Q?T01zqni7IJ3tlp1eXLIdeJ9QhXaPiueQ48OtTNrz3hdL9sTywH3vO6H0BwaS?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k6jcgtpUkC9aKf9WjCoLBEKYYDHd5vIo+?= =?us-ascii?Q?6oDUUOuVlp701haTp+yboJPdmtlYsiIlkapXsWljmitGRv0OIavdMkRjBvY7?= =?us-ascii?Q?TJbNBZmoTdPdskgkXosrUNgVsDQUkwe7L/oZ1OM0uXfxQBH57ui02m/R2pwa?= =?us-ascii?Q?Z8khozuWR+9AfaKSp+r25bfVuhPme14QTV4mJ7mLJa0H/SM5M1JNnZfUAXJ0?= =?us-ascii?Q?ZFA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1273; 5:Xiq00zv5UtLWKVXzelqfMvV5EGJl7iOqTROS4fN9XIeT/2Qhdrnf8tvd1KdhLxl0/c5461fIqkUosgZXYJZNuVBHtvRecSHyqgl+60ZTg5XmSDOdnZ4rUcOHc0ZwSDTl24+kYpx5p5Kb2b4FKsAgSg==; 24:4DzX00s0YBM5G84EKh7KVBqFQHBbuvuwEIRMNhOmN56AUeRGCjnSSB9tv5Ow5eCDgEqrIBkDv+fHl470AlDPQiP/CprF7puRX9tjEPMN5cM=; 20:cHjPPQir+SniNBVsGJLkRWZRkBoJFRqYFGasRuGROfzlI+van3yOBn1I/mmBVnVmoqxvIzPW+1FT28JPietCQA== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2015 13:24:46.7725 (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: CY1PR0301MB1273 X-Topics: patch Cc: petri.savolainen@nokia.com, stuart.haslam@arm.com Subject: [lng-odp] [API NEXT PATCH v6 10/14] api: cpumask: add new API odp_cpumask_all_available() 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.47 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/cpumask.h b/include/odp/api/cpumask.h index 2ad7fea..5b458b5 100644 --- a/include/odp/api/cpumask.h +++ b/include/odp/api/cpumask.h @@ -218,6 +218,16 @@ int odp_cpumask_def_worker(odp_cpumask_t *mask, int num); int odp_cpumask_def_control(odp_cpumask_t *mask, int num); /** + * Report all the available CPUs + * + * All the available CPUs include both worker CPUs and control CPUs + * + * @param[out] mask CPU mask to hold all available CPUs + * @return cpu number of all available CPUs + */ +int odp_cpumask_all_available(odp_cpumask_t *mask); + +/** * @} */ diff --git a/platform/linux-generic/odp_cpumask_task.c b/platform/linux-generic/odp_cpumask_task.c index 665e82a..9de0d71 100644 --- a/platform/linux-generic/odp_cpumask_task.c +++ b/platform/linux-generic/odp_cpumask_task.c @@ -50,3 +50,14 @@ int odp_cpumask_def_control(odp_cpumask_t *mask, int num ODP_UNUSED) odp_cpumask_set(mask, 0); return 1; } + +int odp_cpumask_all_available(odp_cpumask_t *mask) +{ + odp_cpumask_t mask_work, mask_ctrl; + + odp_cpumask_def_worker(&mask_work, 0); + odp_cpumask_def_control(&mask_ctrl, 0); + odp_cpumask_or(mask, &mask_work, &mask_ctrl); + + return odp_cpumask_count(mask); +}