Message ID | 1506621851-6929-4-git-send-email-volodymyr_babchuk@epam.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 692586034B for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 28 Sep 2017 18:07:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D954296D2 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 28 Sep 2017 18:07:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 522F3296D9; Thu, 28 Sep 2017 18:07:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C024F296D2 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 28 Sep 2017 18:07:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sIYpvcOTod7ydeqUIg5MJh0yYYR9S5Ii2oodCbeH2gs=; b=Z00M37IYd3ufhS rfOrWk8yab3Qmix8XqPAvF1dDX9cWPC3v0AluWqYR5waV6ZqDrlEsbVEZPHuo3RQGW9dsQnVkaf4o xNLdEPg8keYKgegRF4OcSiEIqY34LTg/DkaIfWLlzfKkgNa/eYjYc61kFqg2SVp6gJ4WINxpqMGCF OvAEw9EuQnB3r2txMJpYaXvisXz+XJV2tn6a0+743Az4TfBhy1AAZaBZCi328AnZv5EKdPYFYU1un oau8kax/ysU86jEsOohx27HovY2gYg1B+abjT8hd5rBckkz2lJ3M4LKm+vv6mc1NYTV775VePf1he b0Ibm55JStTQBDjlIH4g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dxdDK-0006NL-5a; Thu, 28 Sep 2017 18:07:10 +0000 Received: from mail-he1eur01on0050.outbound.protection.outlook.com ([104.47.0.50] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dxdBZ-0003NF-A6 for linux-arm-kernel@lists.infradead.org; Thu, 28 Sep 2017 18:05:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=EPAM.onmicrosoft.com; s=selector1-epam-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=yWmjTaD/vOSAtxs0CvVyg+JpcD9Dr3Ny5P71DrXWDQA=; b=a47uh4kJ+U9NKmuZ2KhRgdUK3v3dxRwUFGjzqvF+h3VgDFWBftDg73eutxzuTnMBYorEj8Cm4u31S/SeXzoTuz9Z0QITKNj08AxtfQVDYzDbOWGDYuji3YyWarZWXsw4oLgDPUnXKNpDanbWDrk06Bv39VPABWBiQU1XihUNewU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Volodymyr_Babchuk@epam.com; Received: from EPUAKYIW2556.kyiv.epam.com (85.223.209.59) by VI1PR0301MB2142.eurprd03.prod.outlook.com (2603:10a6:800:26::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 28 Sep 2017 18:04:53 +0000 Received: by EPUAKYIW2556.kyiv.epam.com (sSMTP sendmail emulation); Thu, 28 Sep 2017 21:04:49 +0300 From: Volodymyr Babchuk <volodymyr_babchuk@epam.com> To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tee-dev@lists.linaro.org, Jens Wiklander <jens.wiklander@linaro.org> Subject: [PATCH v1 03/14] tee: shm: add accessors for buffer size and page offset Date: Thu, 28 Sep 2017 21:04:00 +0300 Message-Id: <1506621851-6929-4-git-send-email-volodymyr_babchuk@epam.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506621851-6929-1-git-send-email-volodymyr_babchuk@epam.com> References: <1506621851-6929-1-git-send-email-volodymyr_babchuk@epam.com> MIME-Version: 1.0 X-Originating-IP: [85.223.209.59] X-ClientProxiedBy: HE1PR0401CA0076.eurprd04.prod.outlook.com (2603:10a6:3:19::44) To VI1PR0301MB2142.eurprd03.prod.outlook.com (2603:10a6:800:26::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 58fab50f-0f74-4cca-51cc-08d5069b6b99 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:VI1PR0301MB2142; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0301MB2142; 3:As8UoywjgCinwgj+zwHf3HhmIJq224aU6bXkVSodEkgKz1Dr3IONlsiLK0U7mu5+MfOo4TY2TefrlnhwpbyzET3BqtvQYf5XNcT0fe7uAuB1TFr+nv50H4IApRyr2wiUd5f8nLdHof3yaVZ04HbeEB0I2ecQIhmm8tRqCciBCwq+J8uZ+1r/hxBe4Sa4LkP3rRPOgSO3FcdEqc5v6d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SRgBLoQjPrsfP6rLeUCuIlQlumzcU/YtvX2u7Hx7FEl4N8KjY2fGvQtswnQv+4EsJen7agpHPafO/4vWp4KCY/Txl/GGwcxc09bphy7fboQkZOT1IIXBkL5mcw2LcQX/wMqeFGpGwBMIyOt; 4:o0/kzLy+BypL4ENyFL73LVV/cUZg0gIOfOfVUlcBAgZcYMm1NitdyLUeQlm/USI0vCRTxHOzhc7EOxxmiXhzqEPubqX14MQXFt1XKvGxFgZ2/rEumhWOWyzoL9r4GhU215snVubRFe+GZJJT1vCHzFc9obfy24clBaLIMh1rz+mjWxncbG/TOaTxq3lRSOqAfyklIg0eJB14jIsREZnTaCz3zp+pwF30BvnDt+2m3JVEftDQdkjtrWTHUrX79OiM X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: <VI1PR0301MB214289E8387EE15425C395E6E6790@VI1PR0301MB2142.eurprd03.prod.outlook.com> X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6041248)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0301MB2142; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0301MB2142; X-Forefront-PRVS: 0444EB1997 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(189002)(199003)(6116002)(97736004)(42186006)(66066001)(53936002)(80792005)(316002)(16586007)(5660300001)(86362001)(50466002)(122856001)(4326008)(3846002)(478600001)(47776003)(72206003)(6666003)(68736007)(81166006)(36756003)(105586002)(50986999)(5003940100001)(81156014)(8936002)(76176999)(101416001)(106356001)(50226002)(8676002)(189998001)(2950100002)(39060400002)(6916009)(48376002)(33646002)(7736002)(305945005)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0301MB2142; 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; VI1PR0301MB2142; 23:Vnwh2lMbWTGcqzaJHwq7ZjCHHBwUG4OVu5jd2rV?= =?us-ascii?Q?+W9QWTqqsv0KFJ8D1wIDZFkUOUTILTvBESNoYUP1ov/dYXvKWNB3ceuqqL0p?= =?us-ascii?Q?YTJaOK3ByKHXfvkR5/eA6QG1tsutc6RuF5Bl2tdZfyhF8TwOw/A4TXIpIcik?= =?us-ascii?Q?nf9tfNqViOuqGIKYVhodHxEPba/0JyDmT+s3Vn1KsXKyMbmSyu3RE+dtAhad?= =?us-ascii?Q?zkjlhKKH2GNpm23NnmSLqJQ+YmpiSv1TYvoEXfobViRkupiBP7hdGY/dZoeb?= =?us-ascii?Q?F+khhGkiSM5BG022QpkUn4uW+PXLkl3j60GwXt3S4dlhGu3qctUTGb3NAGDC?= =?us-ascii?Q?DuQGIVjifkKDLqbUavekdHTM8pPoSLlpoMt5YW3w9Jb1GU1zIMOqK29S0j+R?= =?us-ascii?Q?F/fh8j+NFFpcFl1u2/g5WQbjZpOR2c6WR0x2vYHbMwCqVRClUFlL+NNYZyv6?= =?us-ascii?Q?oBqCMD4XC+kq6FBN50LfTKhvr6/9AlR85f361yYLIDddh1bAN+9AJu5j6ZG6?= =?us-ascii?Q?1//3lUHlF3PD+PKc6jHpKp+NTRNvr6nQ0DS2f6i+FziKYbdurjTbpddimiAv?= =?us-ascii?Q?VFIFSdSu96ig49OaP1/qEEhRo8Xrfwh2D8D7U24CA5nXXvd+lYbO6SFI8p9D?= =?us-ascii?Q?Ph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ntg8qGYV7Gg==; 24:m8QbHFUMLRPChQ1YvnGY7Yp1+My87IFCqUGrKQYmBK785u6SnwT+d7+2LHJB8YkABNLct3N5fblUEPhT/4dw5AdsqxYDN5IeJT2OCpFVIUY=; 7:g8/SR46TwY1fhpwaHodg46kfps7PDZgc0O7Ab0fz/uwpU7zkHefQV5q2FPxkbwF/PS1QwXz14X9YdA3hWHa0ojEkStHPE0BQ5mzncO9yA20soKHR9dHodkHiOOGFFSouEIIKBrSOejlkzu++D/2Iz5YdSckyl3A8hNgB3m+zxtFZFlmadP+MJuULFR7upfUrBW09ue0jpuRfuzlp2Q785aTuG3MYj0LwFrzdR7O5R1U= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2017 18:04:53.1138 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0301MB2142 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170928_110521_793865_99BC0810 X-CRM114-Status: UNSURE ( 7.86 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Volodymyr Babchuk <vlad.babchuk@gmail.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h index 49d6361..6ba8b76 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