From patchwork Wed Jun 9 10:23:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 456818 Delivered-To: patches@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp5115940jae; Wed, 9 Jun 2021 03:23:42 -0700 (PDT) X-Received: by 2002:a19:24d4:: with SMTP id k203mr17974030lfk.271.1623234221933; 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=KOJI3Dv8Evc6rcLo+AfED6cxUcoGuh7mAk+lE7yiTff3Wp/ZYIuCriZhpKW2pWPMoN skAxlnHGedlHnnDN++hOXvN1O6TVqerAywbW6L9ygwVNEd1LPh57uUgVU0f+yenxIo0f 2bwisneFUBIuCHzUw++8K2ij2Bs2DDRDQNCRkO+CSz8QaqteVg4PuB/+MGYTnVke9r0M nPkno8Ocyysh2kPKNN46E6aurADRUQM7wCH/Zps8jgemaOG14qJ5PbkyPxfpsqu5rduH TaSWBW3VZZxUE+kwKRhGlljXHHvbSMOlNT1OsbNaLJsAkYS0Rcc8dD0mlKtpBJ2bG6Ik ZV2w== 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=rSIr/zgD0QKUjYJIhEJ6XI1VLo+32XT0J4ID1IoyWD4=; b=d6TzOWHrHUfnmsqsgaN13zoWV5u+lXgcDH4tPKyRDpBNp7Olz9mOTDlzoeAbNPxM/6 e01dlvsaQUAsJDVin8gRBrjfM5Mee+5VVlS+gYcrREkzrfNfKJJ+mc4SGMtNvoV5pidc E7V+tZ/A3SIt4GJjaIzdCAmacFgQ3PK/AWhjc9uEfRkTv7tcHnV0T+qM36QQpn68vOqk wSINzNPcw2DPPpSuDyb4jg0scNOqwaw2fz4ArEzwPc6TSK390WCXv/0byyprxUUIbwaJ L88oy2+luijychWlppxsxO+pHQ3IZ/IwCJoNVwLantBdjZxH9tn5T4wuHSbOX1g+QQxZ pUiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fqAD6isZ; 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 a16sor1112100lji.63.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=fqAD6isZ; 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=rSIr/zgD0QKUjYJIhEJ6XI1VLo+32XT0J4ID1IoyWD4=; b=fqAD6isZzOpdAF9uAsnzbY6yrKqxk+H25yKbeNb+ngubcNcT0kFOdS+WdP63PHHUxC HmbNlTSi/IukvVImU0SQ0hRYfsU7yaQJLtUvzSHrwZ0Y76HCXjKyn5yYlU2/MUumCPF9 9yi1u57wsD0zu6bpxQ8wDnxKEWL44I8LVjqcf1pBBa9ABKrCbo7Qhopx41SgKr/WdwkX gb/v8WSzmih9Gs954Py1V0YsjmVOH+nZR8Nc1tkBdN+y+JWwfsvBgCU6cWA/mBIrDt/p emaGFZFxeNq9knd/y1BAHZfbpwU+TH6k35FucKISH2vnlRbwQrIy4SpUNkrrzEFUSDo1 0L/Q== 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=rSIr/zgD0QKUjYJIhEJ6XI1VLo+32XT0J4ID1IoyWD4=; b=Qymvl8KTW02p7EcFE04vkodyCaFZRz0oD0soI5MSxHcMYfoxREXE3MGUcPblEkWpag cOBtxXMFLtnuYzh0KgZ/o/2th1srZdHrmE9yQ6Y1hM3WPUQ2+mA80XxZSnqC3DIcBlSp ZqbjWxM3FG05FIsPjs18nlybTX0saBgd1QOjEtSwf39r2VxUDD+DlJA0ekaFOjH5NT6e jJfTraP7Dkun3mBFqjyoonQbmyQxkqfGIjncneLbyZrGhtTdk78KJGN59OKfzy8M78U8 L8dXZCm/ycHOvjSnNAj+oR0EEuU5cpp+9v8voRABqs1TRyzide2cUaPJvozAdkgDdpTK gawg== X-Gm-Message-State: AOAM533n6b/g8rBEt/8NBFv/B5jr3pqCEskb67aYCCW+Kn4MGWLlt1Ue 9htomVYWyTTzlUdmnZphkGfUD1xUVaM3A9h+dzg= X-Google-Smtp-Source: ABdhPJxRpAglWaXtGp3R3fiw+lgOGV4wZw8PB/hRjO196/Gjs3ftPKT5ETRh0FArSEmyNuoX6BcBEg== X-Received: by 2002:a05:651c:1185:: with SMTP id w5mr21510897ljo.379.1623234221556; Wed, 09 Jun 2021 03:23:41 -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:41 -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 5/7] tpm_ftpm_tee: use tee_shm_alloc_kernel_buf() Date: Wed, 9 Jun 2021 12:23:22 +0200 Message-Id: <20210609102324.2222332-6-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/tpm/tpm_ftpm_tee.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.31.1 diff --git a/drivers/char/tpm/tpm_ftpm_tee.c b/drivers/char/tpm/tpm_ftpm_tee.c index 2ccdf8ac6994..6e3235565a4d 100644 --- a/drivers/char/tpm/tpm_ftpm_tee.c +++ b/drivers/char/tpm/tpm_ftpm_tee.c @@ -254,11 +254,11 @@ static int ftpm_tee_probe(struct device *dev) pvt_data->session = sess_arg.session; /* Allocate dynamic shared memory with fTPM TA */ - pvt_data->shm = tee_shm_alloc(pvt_data->ctx, - MAX_COMMAND_SIZE + MAX_RESPONSE_SIZE, - TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); + pvt_data->shm = tee_shm_alloc_kernel_buf(pvt_data->ctx, + MAX_COMMAND_SIZE + + MAX_RESPONSE_SIZE); if (IS_ERR(pvt_data->shm)) { - dev_err(dev, "%s: tee_shm_alloc failed\n", __func__); + dev_err(dev, "%s: tee_shm_alloc_kernel_buf failed\n", __func__); rc = -ENOMEM; goto out_shm_alloc; }