Received: by 10.223.164.202 with SMTP id h10csp4691790wrb; Wed, 29 Nov 2017 10:14:49 -0800 (PST) X-Google-Smtp-Source: AGs4zMaYYB6ntsc1TfvROh6rITkSh8WuWqDI1Xzm/hdw5SCqxNQK77j0v8Iet3JSzZaXpVQ0sdMf X-Received: by 10.159.240.134 with SMTP id p6mr3723850plr.344.1511979289629; Wed, 29 Nov 2017 10:14:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511979289; cv=none; d=google.com; s=arc-20160816; b=jUDUOCvt5/9aNHk0WY2ksKF/h25E/kGPM8rplP9IznNVqXYIyeUv+VWSslZZM8FhbY iD+onsCUTo5GQRX+0HrtIQWJFn0o8i8eMnUZfUfLx6vxUr/h0qWO2CBjn7VW/5ZXhbZ5 4NzJzFni4/yliC6DEO5TI2oiWBTcFE21FRciimlb5HRTjs48Sltf1p/mDewQK8/ntwnH L6Qj1ylIkgUrXhr2d5icjGxq4I/P2QjG/Yn6xBmDd1UfzZABtGk6NZ+naFdBmZ4XrDHE jtW7pgJZzJHFveG4Y2bnILlgj6fiOJgBbmy8+C/Bf+84dnzgkAUyPtd5FWBvxYYYXDEI 49sA== 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=QMbX6CBw2MXVPF3hUPNIGlGkIP8pWT77YzJInpsqJVo=; b=ePRLiw6u884xX7naULM644aWC/M6Q42peQ6HCLfmeTPxQVE/1AjK1Xzul7q3/M7B+9 PJ5gtdy3VW6EG1d/dvaX6AnR8zqyb9r4RSlQ1A1/GKhpK7LRR6bmdVo441O04SNX4q4w kefSr0STpS+rglYw8XngSiCA7xKYayMZvGqzAezm9zjMd8metPVFpLp1ByHVyDKbOzjP SvWtoZZgcF+f86vOirs2pOx2G/W5TQov7ySH3MexmPcvDr6yTo4ZMpIt/tzY98pINs7g 0I9Q83xW1VmnEtIavs/xcsMJ4eV0JgjgNhPqw7gNOZ071CGnLov+wKMY8UWJrN4bfBAZ Xc9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@epam.com header.s=selector1 header.b=G21wK9Nz; 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 u7si1603168plq.179.2017.11.29.10.14.39; Wed, 29 Nov 2017 10:14:49 -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=G21wK9Nz; 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 S1754856AbdK2MtP (ORCPT + 70 others); Wed, 29 Nov 2017 07:49:15 -0500 Received: from mail-eopbgr40066.outbound.protection.outlook.com ([40.107.4.66]:26752 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754845AbdK2MtM (ORCPT ); Wed, 29 Nov 2017 07:49:12 -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=QMbX6CBw2MXVPF3hUPNIGlGkIP8pWT77YzJInpsqJVo=; b=G21wK9Nzx/gVbrj9qdCAdbe6S3ElJZSQTu8nSfptb48HX0kGmuRFEquVkQkYiUbpeqOnmTra/f9WL8q/q+zsNA52mpOWvx5VSTHfnNQ9BppISyRWHEpmGAPkZabHxeDgx8szRYVWtt27rt/Me+8NNLc1cL9MJ657qmFxbydvHkU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Volodymyr_Babchuk@epam.com; Received: from EPUAKYIW2556.kyiv.epam.com (85.223.209.56) by AM4PR03MB1762.eurprd03.prod.outlook.com (2603:10a6:200:f::28) 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:07 +0000 Received: by EPUAKYIW2556.kyiv.epam.com (sSMTP sendmail emulation); Wed, 29 Nov 2017 14:49:03 +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 03/14] tee: shm: add accessors for buffer size and page offset Date: Wed, 29 Nov 2017 14:48:27 +0200 Message-Id: <1511959718-5421-4-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: DB6PR0301CA0045.eurprd03.prod.outlook.com (2603:10a6:4:54::13) To AM4PR03MB1762.eurprd03.prod.outlook.com (2603:10a6:200:f::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: db7990fb-281e-412c-b4ca-08d537279472 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(7168020)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603270);SRVR:AM4PR03MB1762; X-Microsoft-Exchange-Diagnostics: 1;AM4PR03MB1762;3:oRtpAd2M5+EGSNwPIeU7TFCTUMoP2mNSTJEPNKVX1Nz+Eg0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3W+vZLokDO1E9Ni7Wbcjuo8wBU3bz/ZGFXHUOUQLavWwbPPbkrWJuY3npGD0rkyRnu+4bfbf6R043CzC83UbPW/kSz5/hG+ej8CesHUwbfDR2ohIRizM1kIDOXO1ZvCLIaor6mv5Tx+R2mi370x6x2nP7soA37n5anQTJUH5XEo9tdwIPoJe3L3bYuPaq5Bhh1VvAzjoog/qqyxnPJ3u2CzG8uAIaKhehUoCFyDIj8ZUfMioU3wnoQdq5/Tv+Tdby+Jnnhm713z54FA1WnKP2ARiD9eZubebODTMvkVIOM/oXUDlcUPUlLvtz0iVtQ6hh9sn;4:8jPcbbsOZrizqXIOpModfkiyeCfpOxHbI8wUP9qmJTUYnL0LxNIc9tYdIfEQCIZn3REnbe0vvplK8bplqqCp7Pt6Gv7Nlpk4KbiixLmRHjAZ14oWshaaqIQsDhM9Uwcqu1oz3pMiu3enVif1mzA5oEbWbvwdK6mjKn+wK1WzN3uHW/Ldh83Bw46QKk2OwRsFolQJTZxknUo6s4T2gStB1ijECttmE5YmQIAW/7x3mnmtr4u6les2X/OIQIp0g6D0kTtMssXjBtBcpxyHHCm+2w== 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)(3002001)(93006095)(93001095)(3231022)(10201501046)(6041248)(20161123564025)(20161123555025)(20161123560025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:AM4PR03MB1762;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:AM4PR03MB1762; X-Forefront-PRVS: 05066DEDBB X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(376002)(366004)(346002)(189002)(199003)(106356001)(2950100002)(42186006)(16586007)(107886003)(50226002)(2906002)(97736004)(50466002)(80792005)(55236003)(52116002)(66066001)(47776003)(122856001)(53936002)(4326008)(6916009)(48376002)(316002)(39060400002)(8936002)(6666003)(51416003)(50986999)(3846002)(6116002)(76176999)(5660300001)(68736007)(189998001)(36756003)(81166006)(81156014)(105586002)(8676002)(101416001)(7736002)(305945005)(478600001)(86362001)(72206003)(33646002)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM4PR03MB1762;H:EPUAKYIW2556.kyiv.epam.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A: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;AM4PR03MB1762;23:cHN/1smPyJsM9PwYRrjggKjYUdCilav7xq7of2Izp?= =?us-ascii?Q?fPA18n4t74aWmWmIR86QC6pPPWYAbgkrHHsU2paaNK/7u22OiaP7qnTIVEoV?= =?us-ascii?Q?wjP1lqmcEB6ws96VxZvp4Ll64VUn69K5K3Rr8aRy4Fll0Oig2oM0it7lA6LD?= =?us-ascii?Q?GsSQ1ECRR7IdVZ8aLqDhj0LtBn6YOIqdGhlnQw3EHuChsgrOxXkzH++SaPbX?= =?us-ascii?Q?mgoZyiUk1lXoEJflJLD+/dfGqxy2MjihdF/rrKPdo9mEHt3EtPVTYlVMeyrS?= =?us-ascii?Q?dmJgnRJlpvXYUkHF0fdfjtOCsnbNZJ7ru94uf307yTHEtvQF0YObkIOcxmPG?= =?us-ascii?Q?zFVyV2xMwsOQc1E14wakxvpPUzWx2b1ZvDl8vTMypAwIKpixv/9PyyFp5Ths?= =?us-ascii?Q?oBB7EXLmoIQxs9BM+Ec6qeAzMPZwnwEbei0zjTWEH7tE7zDeDQlNCNyqx0ID?= =?us-ascii?Q?JM5hk1povy71VqRGF6uq1mIuBud4h89BOo6RrBZGfLHfdOcCaZ+MhgrSBMi4?= =?us-ascii?Q?YIY8vyK1LjvHnrEyUm0vi+CEK1ME/Is+RXm2g6j3uTOhTgDwG/EZ18M7OyEv?= =?us-ascii?Q?dT1dJrIWmsRIveSpMZ+pG0+Pfp24LIHS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ze6MloeS9sqwLhKYpZtQ=;5:FCF+IYlmdlPn9EAfvCDVYv3Ljcqbb61NOJwoYCyBxcvxR3GETk4kJHyWz1PnKjxLVylYLCo+2OpWxIi3lmLSvQRo1cAhz+OgZZhQxgZtPgWChwuF/ShO46eqRKvjUnysVTzLHAWBEN5c+7HgcY4zrmA/gR1au+WshZOVOoYjfg8=;24:gK3dec4koT8ndEfZ7JrRsO9RgNLweCxEJU4jrndiR3De6y42mhuS01rboEsTljpwj7Mkwq3EL1s3fS6dxegZt7s0qPh9AwLD344LaKLVXzQ=;7:ftZ/SVWGAUod1cvow+DfmSyymW0Cer/0MGyftt6vgG7NpRCy35elFivRkzpbKRJYGT4TaSQOdA/LNGnumSfBC50GtZdm6ONNH+3Qo0UUlEs3Zolir1Qk7aNJnK/pwN8y94kr8ezmekK8Kks8foqPBiQXbDlVa1KfFcAwykptE5jKyZwUf7wnp/kGBqct/MrcOsbf3MlKlf1392M8RFSdKMU2H0zDJeuQBl/Cjcg9LVDPa4o58y7/VYX36iPEi6mi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2017 12:49:07.0184 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: db7990fb-281e-412c-b4ca-08d537279472 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR03MB1762 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Volodymyr Babchuk These two function will be needed for shared memory registration in OP-TEE Signed-off-by: Volodymyr Babchuk --- include/linux/tee_drv.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h index 70b9c73..0d7f2a5 100644 --- a/include/linux/tee_drv.h +++ b/include/linux/tee_drv.h @@ -384,6 +384,26 @@ void *tee_shm_get_va(struct tee_shm *shm, size_t offs); int tee_shm_get_pa(struct tee_shm *shm, size_t offs, phys_addr_t *pa); /** + * tee_shm_get_size() - Get size of shared memory buffer + * @shm: Shared memory handle + * @returns size of shared memory + */ +static inline size_t tee_shm_get_size(struct tee_shm *shm) +{ + return shm->size; +} + +/** + * tee_shm_get_page_offset() - Get shared buffer offset from page start + * @shm: Shared memory handle + * @returns page offset of shared buffer + */ +static inline size_t tee_shm_get_page_offset(struct tee_shm *shm) +{ + return shm->offset; +} + +/** * tee_shm_get_id() - Get id of a shared memory object * @shm: Shared memory handle * @returns id -- 2.7.4 From 1581172164696487011@xxx Fri Oct 13 19:34:43 +0000 2017 X-GM-THRID: 1579807706125043350 X-Gmail-Labels: Inbox,Category Forums