From patchwork Wed Jun 9 10:23:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 12309541 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=-17.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,USER_AGENT_GIT 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 4A616C48BCD for ; Wed, 9 Jun 2021 10:33:05 +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 1038E61375 for ; Wed, 9 Jun 2021 10:33:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1038E61375 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CdLy0OE+CA/7wsgiBqc5qJBCJRngjUNSiNSu6Rwl/hc=; b=lWGdNDdkQteD0J 4cGTTWwMacl5E5SpdbnOFCKJVm4oHYL48qnPmX3zrvNmpF42Ti42Ww319d7g71UWSfoz/PUgWQ8Dk VJnwUR+i6nUw0ZbXOph/D0rLcMGuO39XzWgCs0aY2w1d8gIUvtvUxUf5orzdm/jpAVIGyGsomv79h YDzWF+4yz6DWrF5LcDQHst1QtQ3qlJBTZRhvqwGHXzrEV2vsAfJvXoEa7yLnWXC/8jmhwrOj7AuaL uwygfXyHKtndJ/4zXoqKk83a+5hKqgE8aHs8JuttDqR5CFIxIq4aGTxu41gAlQX0/mGyfSEzhs130 Jp+CmQ+ez1SuGJUIOUig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqvUK-00D0ln-Tw; Wed, 09 Jun 2021 10:31:09 +0000 Received: from mail-lj1-f177.google.com ([209.85.208.177]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqvO6-00Cykl-SL for linux-arm-kernel@lists.infradead.org; Wed, 09 Jun 2021 10:24:44 +0000 Received: by mail-lj1-f177.google.com with SMTP id e2so31007607ljk.4 for ; Wed, 09 Jun 2021 03:24:42 -0700 (PDT) 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=iBza1mKhlqsg6etHF8D7TfcQzqGCBqmRr7/AGAencgU=; b=IABFa0bjwccpp/bNIj/Ur6wWmjvpwTQ4uvwHXETm960Yor7fI7C0+IUiKkqzhdMHYt iIbNcwWw7mSP3CTqJM5WCz9e1fVOkqqyJ6IbJ7vb4F0AOABdAqzfgZynRLN+8RPYb3s4 i8P1Mbi9AiOyCUoNtiLGY1WaWlwAMtRFzd33qTh+ik4miJF8Nyfg1ll+Pyr+6KOk03+/ NxPSZaHEVcrddgn2hJqbpig76yiGdjbrffGibYYLE58P0dgOSFhz0/bgc7JeNwIYwxn1 ULxNvboBP4WgP5Ou48sQjvhcfGoKYsGZbxYJsszS0eBdqj3Y1FLFX8d/tR8aJ7iJCT1P lXFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iBza1mKhlqsg6etHF8D7TfcQzqGCBqmRr7/AGAencgU=; b=ocAd71vAFPxw/b4HUMm9VGz6LDBzviX6iaRotxG7UBOZN8nHgN7JV/Vny/i1dSLmVe J3OpkgoEDuJAFZJOTzyaBVea4abNcl3/kbNHXOCGN44IFCr+q5Ldd4K2B2VR4j5vBDIu yPvANq1wItmvRaTtMkbUobbHAFi30VDZhStf22z9aeDUfppuHPZjcVEs6vAT9ysMXrW9 M+H7rCV9KSHu/yetBlYct3mnNJRbbyvkc+REmBGnuBmpCht8OjzH1AX80CBFcqthjzpx 3rnWd5AidjSkptefCsoe6vVSJDT088aYbLFXV5tAsaezN+8aNAnzSjYHjFf3rmK1Bwun q8pA== X-Gm-Message-State: AOAM532K5MyRR7f7ZnTEZjZshlm8l1vZVwERVIDSpRQWU2YqW8DPo2sm FlKu/Cjg1Eus6xR7sUP3Tc+5bg== X-Google-Smtp-Source: ABdhPJxJ/g/8K2URkWfxiXdN18FhFhzSSYRq1MrmDLL0fZZa78RlccOZrwenL4lGTKNI4NcOB4D9Nw== X-Received: by 2002:a2e:914d:: with SMTP id q13mr6919196ljg.179.1623234220818; Wed, 09 Jun 2021 03:23:40 -0700 (PDT) Received: from jade.urgonet (h-79-136-85-3.A175.priv.bahnhof.se. [79.136.85.3]) by smtp.gmail.com with ESMTPSA id m4sm302966ljp.9.2021.06.09.03.23.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 03:23:40 -0700 (PDT) From: Jens Wiklander To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, op-tee@lists.trustedfirmware.org Cc: Sumit Garg , Herbert Xu , Sakkinen , Sasha Levin , Thirupathaiah Annapureddy , Vikas Gupta , "David S . Miller" , Tyler Hicks , Jens Wiklander Subject: [PATCH 4/7] hwrng: optee-rng: use tee_shm_alloc_kernel_buf() Date: Wed, 9 Jun 2021 12:23:21 +0200 Message-Id: <20210609102324.2222332-5-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210609102324.2222332-1-jens.wiklander@linaro.org> References: <20210609102324.2222332-1-jens.wiklander@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210609_032442_978339_EB816E67 X-CRM114-Status: GOOD ( 11.98 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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. Signed-off-by: Jens Wiklander Reviewed-by: Tyler Hicks --- 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); }