Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp668234pxb; Fri, 14 Jan 2022 13:36:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmUWpReXQAo0G9L7xqCoOYrekqFrJB2E+VC48P6z5DgjB5QoGUIfeVQU1AYAtmAigLPJ/+ X-Received: by 2002:a17:90b:4ad1:: with SMTP id mh17mr6853924pjb.160.1642196173342; Fri, 14 Jan 2022 13:36:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642196173; cv=none; d=google.com; s=arc-20160816; b=fn6cmb91pIduP4kc9xmZQlyELgMmsQG9huojy1MgEcZmz25PNLiZaj+4mGzGLEdtWg VBdUa3Ghe8JOXNIjFKWz7tOZE+pEGn97gvNt4sdECuo6qoqB+SA4uKPLJKgQg7vvnZn5 n8ueZYZiOIfijwNkXAExDRkt9jXmESt71y3e1q31eFnEgQKb6X+Fw0N0r/aswr4O26xF VFygvWlaxvN/pKO91w1KYxmV7GJB5yzfp52xLa4fgKLmBfjA4qjMuaKrCQP4NkLfXDf+ blosqUiISHWvYSwfAv2cxvCGboDTJtr9Vfhf1S8fF9dPd7kxRDJ8VbMsoPVUvbXZZ7QL UNRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4dui9+NpX4w52rrVA0g43taTTsULBafA6eRdbjyTa0s=; b=nb7FuNBP4wKMGE02Lnkz2jVZ06LB8Ld3+D20CT107rC9MpCqhdZaPN/KxsB7Ti/OkE 3e2rdpIFUcK8UfW3tGyfaZTMo4DVQLii6k6YnXJTb9WYxqo4gVyWcE7vEwmutNnxhRFx WJ41fOjUP3TUms1eqJDmxvs+Zwb/pWjsHyy4QGBeJkD1HCTK3rVK09hTP3aINBVWICP0 QAmpbEaQMFFMYiDd6mdt5yjC9j8J2YCNMs68ztBo8uuwOZ8HhXiv/vH54j9hpUI6EQRz uCl4hyuTZEQavZbu5vh/DJ/PYttKi8fkqH+mG2s867mhS9lZXVQ4b1314/EDGwvEg103 LaDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rD4w4QP1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c8si6359219pls.601.2022.01.14.13.36.01; Fri, 14 Jan 2022 13:36:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rD4w4QP1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242254AbiANPIs (ORCPT + 99 others); Fri, 14 Jan 2022 10:08:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235794AbiANPIn (ORCPT ); Fri, 14 Jan 2022 10:08:43 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E7D2C061746 for ; Fri, 14 Jan 2022 07:08:42 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id x11so5463252lfa.2 for ; Fri, 14 Jan 2022 07:08:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4dui9+NpX4w52rrVA0g43taTTsULBafA6eRdbjyTa0s=; b=rD4w4QP10UDyrS9EQ5coM1KCAFC9PxRPJ9d9lH+BANBIoZQkYN1mZUCY/MUm5E9Qry 1wLzrMKT0O+F524Qx07gOZCBpDVamGz+r/VWiGT81TyQhXzxeNHVajeaW0jeDtXtbbtY TwrLh0yEEdk1qCV9CVetAJqHRE+rVcDBu5j+YkQhlvqBaXRarqeu/0bhT+oGWsZ9c8xm 8ZoF3e/vx7WE2RM/C0pJac76Qk8t7FVqhQD8MhoniX8t+60HKHL9S5t8SJHqlva2NnDS VXlnotD/BRXqyI4dXsTqLT27BUVFPhMifVhqPTTf9LDyMWnJbFO2P+DQBDZU/FfRTgDb VrMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4dui9+NpX4w52rrVA0g43taTTsULBafA6eRdbjyTa0s=; b=UjX3EOVWKIGWVifq+mBNyQqd0DUXt36rYTQq44aMKfvtQmoEioKgh04wzyaRhTGuTW 65vpYAw5JEb0YKiJbxc7WCegqo8lp4f3h4QdSwmI+RZBhD+3FPS2Ymy6FfnMGq+uTG5V te+fUt5G5kIH0Hb3lBAoOdN6wX5eEbfK7xyWP8vQ5QOa4U6NuawlYZtn6t+1SBfePrA1 Q8h2bUmXqZFckB5W1rIrfmn7jJISRZQhxTCawTVYeKeEUjbWLoRH0CGjt3rW/rsLz6wb EJ/VPNOZlvf48MsR60tidYx7EZGMGZ+IyKnL2irNFGVG3zJyZS1PQFu6G9koG4itevT5 hVZA== X-Gm-Message-State: AOAM530vrdfoOru095cznIWOjMMofXj3Qka4vjmLCNUihdKHkT4BXz6+ 7Mh1rtD2CQW0/HehhWQbNdxM+kBIO7UtLA== X-Received: by 2002:a2e:9609:: with SMTP id v9mr5847790ljh.45.1642172920876; Fri, 14 Jan 2022 07:08:40 -0800 (PST) Received: from jade.urgonet (h-94-254-48-165.A175.priv.bahnhof.se. [94.254.48.165]) by smtp.gmail.com with ESMTPSA id i31sm40517lfv.67.2022.01.14.07.08.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jan 2022 07:08:40 -0800 (PST) From: Jens Wiklander To: linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org Cc: Sumit Garg , Herbert Xu , Devaraj Rangasamy , Rijo Thomas , David Howells , Tyler Hicks , Jens Wiklander Subject: [PATCH v2 02/12] tee: remove unused tee_shm_pool_alloc_res_mem() Date: Fri, 14 Jan 2022 16:08:14 +0100 Message-Id: <20220114150824.3578829-3-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220114150824.3578829-1-jens.wiklander@linaro.org> References: <20220114150824.3578829-1-jens.wiklander@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org None of the drivers in the TEE subsystem uses tee_shm_pool_alloc_res_mem() so remove the function. Signed-off-by: Jens Wiklander --- drivers/tee/tee_shm_pool.c | 56 -------------------------------------- include/linux/tee_drv.h | 30 -------------------- 2 files changed, 86 deletions(-) diff --git a/drivers/tee/tee_shm_pool.c b/drivers/tee/tee_shm_pool.c index fcbb461fc59c..a9f9d50fd181 100644 --- a/drivers/tee/tee_shm_pool.c +++ b/drivers/tee/tee_shm_pool.c @@ -47,62 +47,6 @@ static const struct tee_shm_pool_mgr_ops pool_ops_generic = { .destroy_poolmgr = pool_op_gen_destroy_poolmgr, }; -/** - * tee_shm_pool_alloc_res_mem() - Create a shared memory pool from reserved - * memory range - * @priv_info: Information for driver private shared memory pool - * @dmabuf_info: Information for dma-buf shared memory pool - * - * Start and end of pools will must be page aligned. - * - * Allocation with the flag TEE_SHM_DMA_BUF set will use the range supplied - * in @dmabuf, others will use the range provided by @priv. - * - * @returns pointer to a 'struct tee_shm_pool' or an ERR_PTR on failure. - */ -struct tee_shm_pool * -tee_shm_pool_alloc_res_mem(struct tee_shm_pool_mem_info *priv_info, - struct tee_shm_pool_mem_info *dmabuf_info) -{ - struct tee_shm_pool_mgr *priv_mgr; - struct tee_shm_pool_mgr *dmabuf_mgr; - void *rc; - - /* - * Create the pool for driver private shared memory - */ - rc = tee_shm_pool_mgr_alloc_res_mem(priv_info->vaddr, priv_info->paddr, - priv_info->size, - 3 /* 8 byte aligned */); - if (IS_ERR(rc)) - return rc; - priv_mgr = rc; - - /* - * Create the pool for dma_buf shared memory - */ - rc = tee_shm_pool_mgr_alloc_res_mem(dmabuf_info->vaddr, - dmabuf_info->paddr, - dmabuf_info->size, PAGE_SHIFT); - if (IS_ERR(rc)) - goto err_free_priv_mgr; - dmabuf_mgr = rc; - - rc = tee_shm_pool_alloc(priv_mgr, dmabuf_mgr); - if (IS_ERR(rc)) - goto err_free_dmabuf_mgr; - - return rc; - -err_free_dmabuf_mgr: - tee_shm_pool_mgr_destroy(dmabuf_mgr); -err_free_priv_mgr: - tee_shm_pool_mgr_destroy(priv_mgr); - - return rc; -} -EXPORT_SYMBOL_GPL(tee_shm_pool_alloc_res_mem); - struct tee_shm_pool_mgr *tee_shm_pool_mgr_alloc_res_mem(unsigned long vaddr, phys_addr_t paddr, size_t size, diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h index 5e1533ee3785..6b0f0d01ebdf 100644 --- a/include/linux/tee_drv.h +++ b/include/linux/tee_drv.h @@ -278,36 +278,6 @@ static inline void tee_shm_pool_mgr_destroy(struct tee_shm_pool_mgr *poolm) poolm->ops->destroy_poolmgr(poolm); } -/** - * struct tee_shm_pool_mem_info - holds information needed to create a shared - * memory pool - * @vaddr: Virtual address of start of pool - * @paddr: Physical address of start of pool - * @size: Size in bytes of the pool - */ -struct tee_shm_pool_mem_info { - unsigned long vaddr; - phys_addr_t paddr; - size_t size; -}; - -/** - * tee_shm_pool_alloc_res_mem() - Create a shared memory pool from reserved - * memory range - * @priv_info: Information for driver private shared memory pool - * @dmabuf_info: Information for dma-buf shared memory pool - * - * Start and end of pools will must be page aligned. - * - * Allocation with the flag TEE_SHM_DMA_BUF set will use the range supplied - * in @dmabuf, others will use the range provided by @priv. - * - * @returns pointer to a 'struct tee_shm_pool' or an ERR_PTR on failure. - */ -struct tee_shm_pool * -tee_shm_pool_alloc_res_mem(struct tee_shm_pool_mem_info *priv_info, - struct tee_shm_pool_mem_info *dmabuf_info); - /** * tee_shm_pool_free() - Free a shared memory pool * @pool: The shared memory pool to free -- 2.31.1