Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5017331pxj; Wed, 9 Jun 2021 07:22:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTbOavlOyNQf5WXZp8wSjcyQIC1ea6S1aUwG33GuQzKtnMgLIQX6n9gDbSm0YSghZl7B+H X-Received: by 2002:a05:6402:1705:: with SMTP id y5mr30695291edu.232.1623248576152; Wed, 09 Jun 2021 07:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623248576; cv=none; d=google.com; s=arc-20160816; b=oLjwUw9MYE9DjlgwUY6yb9VEu2qibJT7Hes7hLl9//RqbqYWzQuFDnymOdNyQiDqz2 r4dDoFDZuKizzk0nhKEZ7zy4VeOgPBxdOWJBsjQOfh56DXWp2Mlddpz365Cen92j+Z59 jmM+gNcuphbp7gXXjI9cg9afdFQOsaN/YOCC2JXoRcmuZC6Rmll1e+0GpnF4UVh09yMf vAWUcN6HKcV+OwdsR1slI7ST36UdAGsRYCcUwCMtaszX6z8fxP5cfzoZnIQ6xsD/eT3j VfktjnhCA1/1qB9ISznkVv2oT9KjGtvWLW5bDCIOq9xZw0g0j2q/N+TYJEGCtNtve8vj YUPw== 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=iBza1mKhlqsg6etHF8D7TfcQzqGCBqmRr7/AGAencgU=; b=fiCFY7XbHkhH785cbSlelZBYPngzmpoKfOM5lUPYepdwd3NzNE75p6qCBQwBJw8jyi GEUFtrP58luZxctnn3sKAbhjL2DOwv6Okd0RlX1DPS6UucPTP0j8ijkXlhi5b5VMkLhM xePfcuiOfaLr6NEjlZJqZtefLsORkhd2/pi4BNAZxQnKk861BUpWSbc3kvsXaVUnpo+g TNUpE2KuUD8eWzsZKj1x9VQx0IHXRf+VkFZMjQypnkr/VTJdkeUj+5/NI0E+oP7XRZmt bGauEaFc5n7ArAKPphpjzlNasPsxhhW54faCaXtqlm4dKikTxfFphTJi2HQhQFYlI6ta s7Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IABFa0bj; 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 y21si1276741ejk.112.2021.06.09.07.22.32; Wed, 09 Jun 2021 07:22:56 -0700 (PDT) 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=IABFa0bj; 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 S238764AbhFIK0k (ORCPT + 99 others); Wed, 9 Jun 2021 06:26:40 -0400 Received: from mail-lj1-f170.google.com ([209.85.208.170]:36501 "EHLO mail-lj1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238766AbhFIK0g (ORCPT ); Wed, 9 Jun 2021 06:26:36 -0400 Received: by mail-lj1-f170.google.com with SMTP id 131so31006476ljj.3 for ; Wed, 09 Jun 2021 03:24:41 -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=CZUqeIHJG7OFba1ND0lmGYlefO2ThBvgkDxBEP649ADJkElXrpFUbbSJwrbQVF022u 9IqO7cmoS+UYxengPUdOMf5HYtzrxjCTT1jd7iXoOGbvgxHI/p/yd12KZnJrXfO6zk7+ iabTgwDE0kqhiSsotaCSCBB5plaQSpGL5Z2MUJ8rwk6jEaGlsgXk08zrv+KxGN9Ara/a jyUrCBaRqtU/wKX4JJZpuOz3LzYDN0LItBAMBoSEOPH+PLqMYMHkjBCyPH5BKNm6xxay ToEB5SanvncRuac00mub3D9BOYRqGviiKHutLel96f6EFsoLqwh/pNMS3SAxk4/jq6rm ClKQ== X-Gm-Message-State: AOAM532D44FFz2MnHGOAdnPxh0XN7wtH8UkxK/HmVLo3bcUQt+orT0Zw MBq4B832THn4De/n3SXtvj7FosDDEYvCXawv 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 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. 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