From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-23.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE226C48BCD for ; Wed, 9 Jun 2021 14:52:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9D1BC6128A for ; Wed, 9 Jun 2021 14:52:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238344AbhFIOx4 (ORCPT ); Wed, 9 Jun 2021 10:53:56 -0400 Received: from linux.microsoft.com ([13.77.154.182]:54086 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238328AbhFIOxu (ORCPT ); Wed, 9 Jun 2021 10:53:50 -0400 Received: from sequoia (162-237-133-238.lightspeed.rcsntx.sbcglobal.net [162.237.133.238]) by linux.microsoft.com (Postfix) with ESMTPSA id 36F1720B7188; Wed, 9 Jun 2021 07:51:55 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 36F1720B7188 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1623250315; bh=/HOmnjissLx+lpthetr985W/qYtb76YNAtpL9Q+TgUo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c80DgLo+RZ7PeCM+jUdVjeYBRw/W44I+zJd6qzZdHN9r7ORuQQ6AGzFitDP+/AVLR JLqhPwpsBqvYed6u1ExXDP2dxSO+TkFg+aHZOAMCQwO11kq6EKDMweBAINbQYrfvAS Ymdij+JezbRgdwPbVaGZvQYQQ2nDt5LNqgJSnrw8= Date: Wed, 9 Jun 2021 09:51:53 -0500 From: Tyler Hicks To: Jens Wiklander Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, op-tee@lists.trustedfirmware.org, Sumit Garg , Herbert Xu , Sakkinen , Sasha Levin , Thirupathaiah Annapureddy , Vikas Gupta , "David S . Miller" Subject: Re: [PATCH 4/7] hwrng: optee-rng: use tee_shm_alloc_kernel_buf() Message-ID: <20210609145153.GH4910@sequoia> References: <20210609102324.2222332-1-jens.wiklander@linaro.org> <20210609102324.2222332-5-jens.wiklander@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210609102324.2222332-5-jens.wiklander@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-06-09 12:23:21, Jens Wiklander wrote: > 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. > > Signed-off-by: Jens Wiklander Reviewed-by: Tyler Hicks Tyler > --- > 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 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 930A0C48BCD for ; Wed, 9 Jun 2021 16:06:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 58FA46136D for ; Wed, 9 Jun 2021 16:06:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 58FA46136D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Jg/Ri3tqD1K/hPolgVM5k0xNQPyWnYsL4oAkS5tcIpM=; b=1W9h3JacnH19Qs /wQPqR0Gvicb7Ne2wYJGxZMHZGRUiq1tK03q0szE8OAUG5/uTn8bUpa257GwkQyN9mkfYMx+voTIE 6AN37QrL3xOIgi4XyC4lPhqAFE/PwMvotNcSnEVZabF6imcAtMagVD1pHD1G/ke5Xr3+DsfCew2qK VaLezO6id2q8KkSTkubP3CubtdyYwhcp4at6GwDwGu2gPfuZ9cwHX3MsPhqQYeS/I4czz3Z5zoJsp P2hAyUNCR1mJSuMpOI0ak5ft0viYADF+GXeHL+ZbHNXJ2r4ecVpZJVSio2vkYusY4iM1dfVR7YjN5 5984TK91c4HvKgE/NSVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lr0hA-00EmNT-Uv; Wed, 09 Jun 2021 16:04:45 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqzYj-00EQ07-10 for linux-arm-kernel@lists.infradead.org; Wed, 09 Jun 2021 14:51:58 +0000 Received: from sequoia (162-237-133-238.lightspeed.rcsntx.sbcglobal.net [162.237.133.238]) by linux.microsoft.com (Postfix) with ESMTPSA id 36F1720B7188; Wed, 9 Jun 2021 07:51:55 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 36F1720B7188 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1623250315; bh=/HOmnjissLx+lpthetr985W/qYtb76YNAtpL9Q+TgUo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c80DgLo+RZ7PeCM+jUdVjeYBRw/W44I+zJd6qzZdHN9r7ORuQQ6AGzFitDP+/AVLR JLqhPwpsBqvYed6u1ExXDP2dxSO+TkFg+aHZOAMCQwO11kq6EKDMweBAINbQYrfvAS Ymdij+JezbRgdwPbVaGZvQYQQ2nDt5LNqgJSnrw8= Date: Wed, 9 Jun 2021 09:51:53 -0500 From: Tyler Hicks To: Jens Wiklander Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, op-tee@lists.trustedfirmware.org, Sumit Garg , Herbert Xu , Sakkinen , Sasha Levin , Thirupathaiah Annapureddy , Vikas Gupta , "David S . Miller" Subject: Re: [PATCH 4/7] hwrng: optee-rng: use tee_shm_alloc_kernel_buf() Message-ID: <20210609145153.GH4910@sequoia> References: <20210609102324.2222332-1-jens.wiklander@linaro.org> <20210609102324.2222332-5-jens.wiklander@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210609102324.2222332-5-jens.wiklander@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210609_075157_154492_10A3CB4A X-CRM114-Status: GOOD ( 15.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-06-09 12:23:21, Jens Wiklander wrote: > 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. > > Signed-off-by: Jens Wiklander Reviewed-by: Tyler Hicks Tyler > --- > 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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel