Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1720415lqg; Mon, 4 Mar 2024 01:23:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVcwtlS/UVpjvd4bs6UNmCTy7b5fXC2OD29h4g/y4ZsBChsFGFDTAeXZR0tbNZc6whzukdu3T3IGp9TtdNuAnDqm/2GhE5MdcM0frB8Nw== X-Google-Smtp-Source: AGHT+IG+8btCbouoRNeO7V2xfXX0RxPzd8uFrQkci4X0ZQedrRy5J6MXIbnVna2XeFD2FPcHiXPY X-Received: by 2002:a17:903:32cd:b0:1dc:fefe:8050 with SMTP id i13-20020a17090332cd00b001dcfefe8050mr6351686plr.29.1709544209473; Mon, 04 Mar 2024 01:23:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709544209; cv=pass; d=google.com; s=arc-20160816; b=vOqCWcqgHSPSZlhWY3FFGIqy5qBdeWg00BQ1udBZHDnVPTzkQGAp+4uXqH25mc3uRS yXgjbBqhZIbB8UavuggXejtu8bfh+JFdEwUMccp3yJirwcfmHUqh5/AGSbRF4QqoySKv kh6qbm55uTB0Ow1NdJfx4HUHwRkHmtpjrMwlJ8e+S1a2zF/RFT+PpByEOXNTYbvcsd3Q 9+j475bypiWVFbC/Xkh1GHxL3cbz5WszwS0usXTgWZZHKxRgWVt9JIQ4dmXweuKAQWb9 NKknVsk8WYTcwAsMaZ9gacTX3saif9rTRrB87nqa1Zb/w0vjjCktcE4AQpO+QJQfsJ4J GxHQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=0MwiZA1cBA+0PzvnzU74hfVNWNLRRcLuEqTA/3M/Bbo=; fh=Bi+cZGlcMePxXuzAJ4EAdc7vF3tSuc+i5Kztkug9BdM=; b=u2ZQrC2OCnKnIL1Aa/zESEHTlTdgf2OxRV0p8umzB/ijLgxjb1pdZAuHpL7pULuLl7 nrHcKJrihOA8Qp/p/ueL6Y8sxoZq+OBS4H4cocYnbwx7QwU+uda2PUPzhYj/ISQTLr5U ghJO/yKtv5JxtFpBu92GRNIhLRGfx9aCl+pmw70uWro1OWYCHXY4bXNbSozD0GGk07MH UUVrFeLpaxqadVVm1KeDUrv0qS4F1p/Tp9ENoiD0Aqmq9+INAjzcqbHXmBqHQ9W+llBs bDoYZvsJva5VedLMyz4GRccF5V7pKqFIw4QBrtArs5WkeMukukreTwRO9owKTGNggeSN Rmtg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ZmfpqWs/"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-90293-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90293-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l16-20020a170903121000b001dbd81089e6si8148209plh.515.2024.03.04.01.23.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:23:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90293-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ZmfpqWs/"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-90293-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90293-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 36C7FB22DD5 for ; Mon, 4 Mar 2024 09:18:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F1C082511E; Mon, 4 Mar 2024 09:17:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ZmfpqWs/" Received: from mail-ua1-f53.google.com (mail-ua1-f53.google.com [209.85.222.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7727C224D5 for ; Mon, 4 Mar 2024 09:17:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709543846; cv=none; b=mWMaeaMeNQIpzHRnU2iYPneLy6tuurwzhUU1RdKiDs6ydCIHE/gXbLNVcA0WlBax5Mr1Gnt3bKMTHE1UayS5ZRGCsAoKWpEasUC5wHxqpB/kHZ8ToK3bTZUOhC3qQi79MrgTzYTzY+Tqn3JGEGNwcw3aTeOc3RU2pCHaaBG/ric= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709543846; c=relaxed/simple; bh=0cH0sGgH29hlXLiK6gSK9NkKYoxG4zTANFmso2w03CI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=mw7KmQwygsmPj+qvJLUM4laD4uMBbkFFx/iT+uLS5HpdVwdmgDB4PQS/yb/6PAf/gRhtDpa7eiwXm7898RHHnOn0rZAzML7eYAWdLbr4fpc7lF6taVQN8PW88la8axV9icVQZ6dLv0eLtwXb0UmqL1dtKn7XJgbAJL36cpR6Aa8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ZmfpqWs/; arc=none smtp.client-ip=209.85.222.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ua1-f53.google.com with SMTP id a1e0cc1a2514c-7dade974b0bso1826677241.0 for ; Mon, 04 Mar 2024 01:17:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709543842; x=1710148642; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0MwiZA1cBA+0PzvnzU74hfVNWNLRRcLuEqTA/3M/Bbo=; b=ZmfpqWs/wwjbGUncTcbhtxuETIFupyYg06RvDahAqP7UkyvuXaLPLSC5SESVrG7vHR 5wcTFWS+L/WQvKCkCB3XMV0zqKC7dD0VJoDiVusF44s0/UQvBVSZvOHM57GIKmbOj5Ub tBvgj0Gd9Ny8iAL8rKBEOOr2+MdiE5PHOAyQZeo8OKtiNIUU1lGBHgCGYY6UKPLRJA49 G4EcrGbR05geMG0wiUFIAQgsivoTyKqHUGEQsRLTY86EsK3sg5xQyMcJucLcmOF/BI8l EZW+kHTCvhDeMoWNB7q8KOPOfxZylvg+0mhuLcT0b0Tx3q0K0+X34NuugjHpk7UDCGau GedQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709543842; x=1710148642; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0MwiZA1cBA+0PzvnzU74hfVNWNLRRcLuEqTA/3M/Bbo=; b=JqMYgifEpUYAabYQ7i45FG9iuUSZGmLl/vGr0aPu3pb7chOaF4x8C9+7gIPrOh1GcB 6qxvwqCYFkV9O4HwjY89VjbyLFBhROYCQ2LdWN7cTnJ88/8+nLtG0d68gP0J1gWHxGwM D72E/gyiijBvR+f+b/HykXY/3OvGrGnsCNHsm4Am3JfUlYyYSi9Mtc43/rukZJ5BGWm4 69QZN9i4VzbTH6+F1Uy7PaKYf8PTjmI52MdexHj4bhybfz6BsJxazdDHrbCk0KoxI9ID GxB+IzCgdsiX+tpf/1DlqMlgUvhOGTLtrgLq3b8RttCDO8xvgjXH7qS70LO+aDhrDDOP I7IA== X-Forwarded-Encrypted: i=1; AJvYcCWj+tTTb7A1hg5r0ycOM47ZLViL5LxZHoaaxu3fcfD0RJXI8MzXI9E8dTK5dmYvPOHZ4CxFvJKzFRV+N8gzs9sqBFp/51kG0kuZMaA5 X-Gm-Message-State: AOJu0YxhNMLbl+J+eT27um1pMjXPeGFybc0RZwk/E3AOLbFYwlR0NBIR sdFegL7hGvP/gdh2hyh79e8YKaQVK6GI4wlb6lMSo2/YcdZ8C0iVDWKWd7JK+CcSvbBQjKsftOp 4jqjpqV30KLkuuMkUy3Vv5+utEdEISKxzTtiK1A== X-Received: by 2002:a05:6102:1590:b0:472:9b30:567a with SMTP id g16-20020a056102159000b004729b30567amr6374784vsv.3.1709543842338; Mon, 04 Mar 2024 01:17:22 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240223095133.109046-1-balint.dobszay@arm.com> <20240223095133.109046-2-balint.dobszay@arm.com> <4E68610D-8F2B-4E27-AE5C-45CB59D7FEC0@arm.com> In-Reply-To: <4E68610D-8F2B-4E27-AE5C-45CB59D7FEC0@arm.com> From: Sumit Garg Date: Mon, 4 Mar 2024 14:47:11 +0530 Message-ID: Subject: Re: [PATCH v2 1/3] tee: optee: Move pool_op helper functions To: Balint Dobszay Cc: op-tee@lists.trustedfirmware.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jens.wiklander@linaro.org, corbet@lwn.net, sudeep.holla@arm.com, rdunlap@infradead.org, krzk@kernel.org, gyorgy.szing@arm.com Content-Type: text/plain; charset="UTF-8" Hi Balint, On Mon, 4 Mar 2024 at 14:33, Balint Dobszay wrote: > > Hi Sumit, > [snip] > >> diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h > >> index 911ddf92dcee..4cf402424e71 100644 > >> --- a/include/linux/tee_drv.h > >> +++ b/include/linux/tee_drv.h > >> @@ -275,6 +275,17 @@ void *tee_get_drvdata(struct tee_device *teedev); > >> struct tee_shm *tee_shm_alloc_priv_buf(struct tee_context *ctx, size_t size); > >> struct tee_shm *tee_shm_alloc_kernel_buf(struct tee_context *ctx, size_t size); > >> > >> +int tee_shm_pool_op_alloc_helper(struct tee_shm_pool *pool, struct tee_shm *shm, > >> + size_t size, size_t align, > >> + int (*shm_register)(struct tee_context *ctx, > >> + struct tee_shm *shm, > >> + struct page **pages, > >> + size_t num_pages, > >> + unsigned long start)); > >> +void tee_shm_pool_op_free_helper(struct tee_shm_pool *pool, struct tee_shm *shm, > >> + int (*shm_unregister)(struct tee_context *ctx, > >> + struct tee_shm *shm)); > >> + > > > > These rather belong to drivers/tee/tee_private.h as we shouldn't > > expose them to other kernel client drivers. > > As per the discussion in the other thread I'll ignore this. > Then it will have conflicts with this [1] patch. If you are fine to incorporate [1] in your series then the right place for these function declarations should be include/linux/tee_core.h. [1] https://www.spinics.net/lists/kernel/msg5122983.html -Sumit > Regards, > Balint > > >> struct tee_shm *tee_shm_register_kernel_buf(struct tee_context *ctx, > >> void *addr, size_t length); > >> > >> -- > >> 2.34.1 > >>