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: 456817 Delivered-To: patches@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp5115929jae; Wed, 9 Jun 2021 03:23:41 -0700 (PDT) X-Received: by 2002:a05:6512:3084:: with SMTP id z4mr13377128lfd.128.1623234221197; Wed, 09 Jun 2021 03:23:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623234221; cv=none; d=google.com; s=arc-20160816; b=LCBxMA/6f3iJ7Rb0iDeXB+Nw6sKgjHUPvlr5JAUqbdC9ZXg8oaCmRl9hk+aYq+x9ee eZXqVHexIW7AUQhyj9AFMqcBJq8UpH8a0wSDr+bAIbbZDsnJvLkFYTYb2EQhtwSJWAR5 qImdCevAiXISr6tn3zx8jQue8gOb5CoGRf0EdBfsCYCqBi8s2TK56RKJzqHCjXWvwE/B sOJylGjWUP10j9UO281ofD1lGEcwzkhJUO4gZTF5oKC7dkCWTuy1jAy3tcPpcqDcm/3y KXVONhGkjzm2a/Uh4RwOt6DqdfPYhnnse0h5hAHmFvuWrmelHYgOW5L7djj4/jF5U8EO HlOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=iBza1mKhlqsg6etHF8D7TfcQzqGCBqmRr7/AGAencgU=; b=vNiq4Dk8h78roYW2lSnXBkgtEUpjzuBHtQuxoF61CsGjUL6VTGNJH7JH0ksxPZKe9m 6ni6mf/uGygHjinlXQn+9qCHCL7BFCPxQSsIU82puUXeXN5eb22kMqENiR7UGAbvXuaU Pla6WcYFwsylW7j+bf45Hk2Bw4IiMs3Zv6OJVibYlDOq2Omn1N/y+RPAl0qJJ0Z6H2wX qGSQOHR6a5TOyU7tGu3V5I5Av6CGWQf+w6idMbXhFVt1x1NoCXydOvUvYkU6MDWn3P1I 5gu5M+gwZgVTp0Rgnm9Pi+1QEW8ws2yExGHF43xeyTgqc7B7vWMuDQQQ36qBM0uuqkRe ubLA== 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 jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id i3sor1150275lji.70.2021.06.09.03.23.41 for (Google Transport Security); Wed, 09 Jun 2021 03:23:41 -0700 (PDT) Received-SPF: pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IABFa0bj; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=gtO5ytRKjy8jP/7js9tVnGP/V13p+iiewU/0hKA4A6WwztFB8Zt4UteIYsuMEW8OjJ 1eHUoycIixbVLAv56ncsy+dg+wKKTURAIax+27T8Om/HenQrYYSuPUBV/800faHM2tG2 d2KlmUoBOwhWiLuRsvipm32NW6hY+yOBlfgGZSiO0+YytQP9z+CSa+vooZzuOanUTI9o 9iJWgKUhQnWEUCsKUPUwtdTUWIg8r/jr7L9yiAsl7z9DXovP4YVfyDLkkY6nldIlx43q 48M7keu7souoT6w/9pAjnRAYiBg1EfwuoNTNwmyV+D9HJrwc1wL79Hu4X2I7gnYE5FC+ Ujtw== X-Gm-Message-State: AOAM532NvK+32RvcikMUbGrIzvu+DYSXH+2AvTzfGv3gQmZMPJaaIxj4 u8x9kHJX6FHHKMKkSu2QWHDbT9L8 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) Return-Path: 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 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(-) -- 2.31.1 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); }