Received: by 10.223.164.202 with SMTP id h10csp4691938wrb; Wed, 29 Nov 2017 10:15:01 -0800 (PST) X-Google-Smtp-Source: AGs4zMay0cULNOnwyN899zmD0An0j9CAJqgzNeL4n3+V+rcbgtGRlAfQeepzFz5FRBeqA6HkVb+e X-Received: by 10.99.123.24 with SMTP id w24mr3558510pgc.438.1511979301816; Wed, 29 Nov 2017 10:15:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511979301; cv=none; d=google.com; s=arc-20160816; b=qzJ7dzFSZHZFXcun6RqK9T6GLtUO0/dYHY17R+iQ4u1sdiXxosQRdC/42Tqp00jHGd zVL+Ydgld0kpQ5ci7hZzujUbG5BhwsH72LQGWoKSnMdkAucWMFHfp28ODPHaIyEsEBsl V3vz8HjzxzMVkUD68eOoCMK99k+P1Qi9qiEkqD2u/DsDwaIyFRZJup9B4ssVVuXW6C8D MfYUYeEvdFlUmzgqfV4LeYqYbSW11ffNTk63gBBYA/I/eymhus3TbAGdACFgTnwPuDUD qTfL0Ltv0Hrg/9FTOxf9Nz8Opl/gBgKc+jBadKyR2tjYySJ1TNEneZbZImrLPCP2Uz4s tgbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=jI3W5Ta3UeiAVnehSuswc6HoI1Wh42RB5asb2f4WGmg=; b=ktObK87w+jEKr+cy5Cf95LA476YUe5Eo4RKRd6PZbFKme7Tj6rzcjg2cmGcvYOGdZX Y3m32RtMRHZJ+oKzpaA6HCe5/a98sf6tFPNocYkl6vK5q0SOQjqqnQspfJVo/BdipAyR ifWR77FNdjgZD7Xg+3gLLtsFdk3JMSk/l7rY6KkEycAh2ZiRVDt8JVW3OhuHeTLklmK0 HKfmU4fifcUSj+Yl+k3IWRk6EhyqGQbeDSz68B+yYRPz9cf6L0fK6he8+3qZX0cz3khO KEOBjTnqBElCpl+SEF7FlXHTL3aqG4dir603xcSo1drC5BdCWBDpW/oQKNCx831x/Wq4 ShMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@epam.com header.s=selector1 header.b=f07uzlC5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2si1607922pge.198.2017.11.29.10.14.51; Wed, 29 Nov 2017 10:15:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@epam.com header.s=selector1 header.b=f07uzlC5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932604AbdK2MtW (ORCPT + 70 others); Wed, 29 Nov 2017 07:49:22 -0500 Received: from mail-he1eur01on0085.outbound.protection.outlook.com ([104.47.0.85]:48496 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754845AbdK2MtS (ORCPT ); Wed, 29 Nov 2017 07:49:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jI3W5Ta3UeiAVnehSuswc6HoI1Wh42RB5asb2f4WGmg=; b=f07uzlC5+UtgN7igC4EmmjDHxCFNR4fXsh5n1ECxOY/ycrvfLZRflszYAQOtmcb+vAF/nhsrHRoa5a+vB/hTt73wcDhWBD/EQwkZnf33HPiWgWrwebsVkluGqfFSzlofF/lhGkEGxWJ/DEG3H7Dfql9RAgjGLNyMccJ2G3qYxo4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Volodymyr_Babchuk@epam.com; Received: from EPUAKYIW2556.kyiv.epam.com (85.223.209.56) by AM4PR03MB1763.eurprd03.prod.outlook.com (2603:10a6:200:10::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Wed, 29 Nov 2017 12:49:14 +0000 Received: by EPUAKYIW2556.kyiv.epam.com (sSMTP sendmail emulation); Wed, 29 Nov 2017 14:49:09 +0200 From: Volodymyr Babchuk To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tee-dev@lists.linaro.org, Jens Wiklander Cc: Volodymyr Babchuk , volodymyr_babchuk@epam.com Subject: [RESEND PATCH v2 04/14] tee: shm: add page accessor functions Date: Wed, 29 Nov 2017 14:48:28 +0200 Message-Id: <1511959718-5421-5-git-send-email-volodymyr_babchuk@epam.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511959718-5421-1-git-send-email-volodymyr_babchuk@epam.com> References: <1507923164-12796-1-git-send-email-volodymyr_babchuk@epam.com> <1511959718-5421-1-git-send-email-volodymyr_babchuk@epam.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [85.223.209.56] X-ClientProxiedBy: HE1PR0102CA0069.eurprd01.prod.exchangelabs.com (2603:10a6:7:7d::46) To AM4PR03MB1763.eurprd03.prod.outlook.com (2603:10a6:200:10::7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4fbf5aea-06ad-4fd3-fb1a-08d5372798c6 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(5600026)(4604075)(4534020)(4602075)(7168020)(4627115)(201703031133081)(201702281549075)(2017052603199);SRVR:AM4PR03MB1763; X-Microsoft-Exchange-Diagnostics: 1;AM4PR03MB1763;3:oXFkNYa7cwPHIhrhzP/+o7qAcm19Bffs9AKcFZnru1ALCL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yDE46fO24dpGtzoeZMt/WFneZWY2fvS5m+5yYoRJZ2jZw8//jU0KrPKFbqjePvGFtQvZXFvr6J10jWcpkDZPc3sG45eD+2/A2T40nS5xwe/rUnPnGEuYKgEZA0uY+GdIAZktM9nCPfXb7Q6hoZ26SGtq0YHQxgGLWqDrYmpMorPNl7QFzsPcARFNNaFJla3HZ6UvvK14MFf+fLWOozIyliJYqYE7XL2BDl7TM0pe/EboEQfEBhsBzKK7rfx0yDhuB+iJQf5MJSQSVZyueihf80kPp2m5tqvbahmyo0DlRFoAS3pa8db6cJSJ0OcCIArG;4:r4/5BSZfawJrkQj9nDaFe3HmN/nLsIiVkkmgXKSBI251jibeAu92dtf3KO1aCat2T4rUsKrSyZO23HzWq8C6WT40ojl0VgufPFueoTnQHLzLRh1NpdqNDAwihLy3ISNxgK0PW/Qyih2WxXGZV2wc+jeQhohEPBneafxrbVErxdeJCUHKZFAOyV1T92+WKV2H+J0qU3DGGQw8/DNv7DeWff27pO6FIstOEqCmRTpk7ercNFOXQBzDQdicnBO4MTFZrWVbvNlNeG4JlQc6xK0AJg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(3231022)(3002001)(10201501046)(93006095)(93001095)(6041248)(20161123560025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(6072148)(201708071742011);SRVR:AM4PR03MB1763;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:AM4PR03MB1763; X-Forefront-PRVS: 05066DEDBB X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(376002)(366004)(346002)(199003)(189002)(50986999)(68736007)(76176999)(97736004)(101416001)(6916009)(2950100002)(2906002)(80792005)(6666003)(6116002)(4326008)(53936002)(3846002)(316002)(81166006)(106356001)(8936002)(33646002)(81156014)(72206003)(16586007)(5660300001)(36756003)(42186006)(305945005)(478600001)(50226002)(48376002)(51416003)(7736002)(8676002)(105586002)(50466002)(66066001)(55236003)(47776003)(86362001)(107886003)(52116002)(189998001)(122856001)(39060400002)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM4PR03MB1763;H:EPUAKYIW2556.kyiv.epam.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: epam.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;AM4PR03MB1763;23:L7+8FKEek0fNTKFQ1b7z2Z8mid+lOky6oyE1q5mbs?= =?us-ascii?Q?DhwKCMPHcO4eVg1WvCcht81EVbFZ0rqomrd59X0PWkrzfou9xRwmkIoNCyEB?= =?us-ascii?Q?9DRo8lJDtTxUapcimd3HQXfqHGouG+nYfx8UmgfcGsEZvoi/oHSdvlAUYreF?= =?us-ascii?Q?nPMh2/d0RRYpjTc2ru1WDuZiAOLX81ur/XJNuUjCB/WpWL+SzaW/J/Vnai6K?= =?us-ascii?Q?mVHinzNK0gRSlvGgWwshcVcpPfE4eYnODK8QHXJ5Cws1Rp1g5wxAGGt44ucv?= =?us-ascii?Q?ExBjEg4har/4Ayk93XYfk6QYDGRcB7F7iCUjPlwTAfZ38KkKKQQcoxImQeJF?= =?us-ascii?Q?rMTjRQs/rrrfmWdvziSJ9oQ6mI8b4RBPWF2ZrHWunXBCr+NXKcans7QKy2Ub?= =?us-ascii?Q?XgSwEIdP6E09IpVeecvIOk31TBpOkRyPROe3N2l8pUVr0naUlq3UnaGiEHNn?= =?us-ascii?Q?iDrTOxxgN6zpfjE5zW2QS3zO5MT7jTEDIjpmu5PIx+72ltLCLDNx/dvPalkH?= =?us-ascii?Q?DCrnATpB7pSkpkCYSMKkb6RbQpB9R6tQq5VvYjZxgi4gEU90PvW/VATQC/vZ?= =?us-ascii?Q?UuvtwAYITiYrib1cax3mqi8kYXsXfpfw8SzOW4jkVJlA7or6X/ARM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XI0P1caBl7AMr3FDkw2kz2WnInWqn2aAmjRJkEdFSbtWeuR5nLP5y7Zh3b4V9zGKZQL70MNlnfa2IpZgf6qRF1c6NvJUjoJ624f0SI4XwzTu9qL2rSl2gCFfUiPfdpo2IP4vvIVESgDmW7bYwt+aj9+M0YU37LogRs=;24:vFAwiPkUZ+UuuJUS6CU/czQkI7of7CQTdfvdZKHJyV++bcO2T7lvvUSHrDYCdgBe6/GFPOMYYyiraczdCADP3ywqMYi44ODSzgPVRufJ+bo=;7:mQVX73Wt2vXeFb3xm/jcqBcENBRjceaHtpGafVg93j1MN51/gFaADRCJYQ9rMVI9kjHCJtxMQV/LyNyW+tqo9yTGgkT5B2d0tWFbufapoAl5l+/R5PO4E8tZhvUfsSEEk/ZgpbG/ub9H2MoiO3Gom3wcRXnKpSoEjTRIvcNKyfPiLnn+mLKoIcdwjNnF6SMWj5MaAc5iP/HBfWpmiUtpYxsGHjQqj1FuzTGQ++ic+u5gVDZU8P3y1gXiYm6ozeMt SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2017 12:49:14.1409 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4fbf5aea-06ad-4fd3-fb1a-08d5372798c6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR03MB1763 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Volodymyr Babchuk In order to register a shared buffer in TEE, we need accessor function that return list of pages for that buffer. Signed-off-by: Volodymyr Babchuk --- include/linux/tee_drv.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h index 0d7f2a5..5489c38 100644 --- a/include/linux/tee_drv.h +++ b/include/linux/tee_drv.h @@ -394,6 +394,19 @@ static inline size_t tee_shm_get_size(struct tee_shm *shm) } /** + * tee_shm_get_pages() - Get list of pages that hold shared buffer + * @shm: Shared memory handle + * @num_pages: Number of pages will be stored there + * @returns pointer to pages array + */ +static inline struct page **tee_shm_get_pages(struct tee_shm *shm, + size_t *num_pages) +{ + *num_pages = shm->num_pages; + return shm->pages; +} + +/** * tee_shm_get_page_offset() - Get shared buffer offset from page start * @shm: Shared memory handle * @returns page offset of shared buffer -- 2.7.4 From 1581172156292538753@xxx Fri Oct 13 19:34:35 +0000 2017 X-GM-THRID: 1579807647998704518 X-Gmail-Labels: Inbox,Category Forums