Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4634728pxb; Tue, 25 Jan 2022 15:05:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJQF5SB/kyxrE4p09suP1DDfQGC95/yQbRvlVrn3TmhTgFfVeO3bcCzKOOBNdCvD2n7iAT X-Received: by 2002:a17:902:6b06:b0:14b:f88:5f9b with SMTP id o6-20020a1709026b0600b0014b0f885f9bmr20642753plk.169.1643151957933; Tue, 25 Jan 2022 15:05:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643151957; cv=none; d=google.com; s=arc-20160816; b=UelWEAxcVpy2l4r5CJQRUJBduGd5aoRwCFed8fDdbp6FQBGuUyzIip9iCPgQoxYBa7 6232Ca+VJUZ6UHQimx0DahZFIlDqtWmjyH8d/2ix61+2xaOABQ2ITDW4+ZQwkmQVRqcc tInESQUceMV4shPHdDhMVYhkFlrI46vIdb0N2aZv1AjlGKh14djEwKqSxSyKVjQ/NW5T 5LpvlbEJ8zcCuohxnMWi01ZFn1+OQ4CU+yT3qyWfHYhmq21/BJgyZa85N8eHWGrhECgr +dvy8qGUMB7nCyP3Q9/3vsAM2CxNQwwSnwCkRXj6MWX2JbO4bXCcHag3/IjT0pu1vNh3 nDhg== 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=oN4lu8lbyhaxFZyXszWUPj3DflZg95OHRJxVYyEjsXM=; b=d3woh3kJCu9XuJ+YPcMJ3YFRxY8VkhuIHZ9g9z83FPHGFoivxFjF/+AM0eWdC+QaGI UR/jPMRieBygJ2xNyMo11ist5Y1uiChWrRguFs0chwTMFsvrZNLxtO1esAXkd1JP/YHJ qoTPYoYaDZjBqUG5Zo+4HRu0AnvvyoFW8kf+v3z5rt2HpgEEINYc0DrXpJlRV6HSOnJ1 2v8pXM0Cod5g7oLcXnfY/dsw9vcDiX64JFU81X0Q8hUpKFN7iaZTcoFgpQ3xxU7rQSOc uM18KJbQ2CDT/L+pK0xROfiMPleAYuyQhXMAQmvJpFLYRGV80xDg49YFzjAPl9Hae2Ib pSxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d4Lgc7Ee; 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 f34si1320847pjd.146.2022.01.25.15.05.45; Tue, 25 Jan 2022 15:05:57 -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=d4Lgc7Ee; 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 S1450778AbiAYQdd (ORCPT + 99 others); Tue, 25 Jan 2022 11:33:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379305AbiAYQ3s (ORCPT ); Tue, 25 Jan 2022 11:29:48 -0500 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D93F5C06173B for ; Tue, 25 Jan 2022 08:29:47 -0800 (PST) Received: by mail-lj1-x22f.google.com with SMTP id q127so2798121ljq.2 for ; Tue, 25 Jan 2022 08:29:47 -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=oN4lu8lbyhaxFZyXszWUPj3DflZg95OHRJxVYyEjsXM=; b=d4Lgc7EeeMJ4uPc5SPPd5GZD4n3Q9Xc67fU5XsOVjJGh8lxQ9Xp0bEs6OGoLMusZst peZ0AyCrvHbdXCpbRqOj9fpepFn2qQV4+gVXwJnK0q/DaZ8zXvEvlMsKh9uOqMvCpJFN jxjzbxuD1+kEXfneEbg7ydFbCLL3bdlC8CtpbSzzJrKc9x8skOSJbvLr6SmpLMV0FQpG 6j8EuRDEJ7P7Wed2SpaasZWtHsWeVFEQLmeqRJf0ZVnEXa4mkbM6JO8ExgBGn2WM3lWg 7dto3Y/85cqfmQVP/l9aYE4mQHtZ/IqgCpSo/P83qKGYu0fYayOd/J5tx4Vl63XryQ/j K9+Q== 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=oN4lu8lbyhaxFZyXszWUPj3DflZg95OHRJxVYyEjsXM=; b=zxWYIjHexnd7esWNF+GT+mEp/NNQ6cqze1VFY03WiL8DoeX1xWXoirjYtHwYyquoav OWNXdNn1frIftfwKptocV7vfwh2exgY0qSZLiLteg7X2LdSfYWuCUIncK48FCQydXEaT pRH9cYSpPhjt7Cnyx3ykvjeuW7TsXL3qI96Kt2ioLyJqirI/Cnt22ZNU9cTIyHiDJ+JO LhIfSXUlkJXibqXy7mOdFtN62LeE5/Oo2qKMLA1zDtb8wuorHltg6NMUhpWTxgIgzQ6Q Yac8RiS0xkV01eKVNidCPRC4B6FGuzqqkkCDy6W4kkYAMxna2cnrkmPGWGcEt11VK4Q/ IDsw== X-Gm-Message-State: AOAM531qI6RrbPx37klDCQdqkkqGumPXPI7PKLlyMv0la9wqXYPOdr21 hbEube+YW9Ld6WqxsbFJ6w4+r8DuI59Sng== X-Received: by 2002:a2e:913:: with SMTP id 19mr7947878ljj.299.1643128185951; Tue, 25 Jan 2022 08:29:45 -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 d13sm536240lfq.75.2022.01.25.08.29.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 08:29:45 -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 v3 01/12] hwrng: optee-rng: use tee_shm_alloc_kernel_buf() Date: Tue, 25 Jan 2022 17:29:27 +0100 Message-Id: <20220125162938.838382-2-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220125162938.838382-1-jens.wiklander@linaro.org> References: <20220125162938.838382-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 Uses the new simplified tee_shm_alloc_kernel_buf() function instead of the old deprecated tee_shm_alloc() function which required specific TEE_SHM-flags. Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander --- drivers/char/hw_random/optee-rng.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/char/hw_random/optee-rng.c b/drivers/char/hw_random/optee-rng.c index 135a82590923..a948c0727b2b 100644 --- a/drivers/char/hw_random/optee-rng.c +++ b/drivers/char/hw_random/optee-rng.c @@ -145,10 +145,10 @@ static int optee_rng_init(struct hwrng *rng) struct optee_rng_private *pvt_data = to_optee_rng_private(rng); struct tee_shm *entropy_shm_pool = NULL; - entropy_shm_pool = tee_shm_alloc(pvt_data->ctx, MAX_ENTROPY_REQ_SZ, - TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); + entropy_shm_pool = tee_shm_alloc_kernel_buf(pvt_data->ctx, + MAX_ENTROPY_REQ_SZ); if (IS_ERR(entropy_shm_pool)) { - dev_err(pvt_data->dev, "tee_shm_alloc failed\n"); + dev_err(pvt_data->dev, "tee_shm_alloc_kernel_buf failed\n"); return PTR_ERR(entropy_shm_pool); } -- 2.31.1