From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47F455C61B; Tue, 5 Mar 2024 10:21:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709634106; cv=none; b=tqyoebWnzLgmfkK3rQTk7DHik24Vfo4DkaSMSZUj1LT8TlRojAlIIV1zQzwDYstmO0juwdaPOL0uagmFMnZ2EvY87eTAsvva7tPNEgVlmtsa1vFhfZvYgiqKIuf8/8n0lMvVT0kqaz0UIE/WGGrlV1+9NPxwA5XFBuGwRlr2X6s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709634106; c=relaxed/simple; bh=8S16sXtwAgHSHRMb86X0XL9T++tc3lWptZlKqW0nI1c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ksEHbaapA/S0v60a8524VLSmHcBMdkC4L1AzCUg74ifY0ADfJX6A12sMGWzEV2aw/jRXTo+feL+7xoi12Dp+4ZqCrFiUjKiY190s9ZCWPiSouw2lUV52OEskmM7P2szCxkxRcAIlB2mwet1V8XDXh3xj79QXFe7NPq1aryRjffQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 10EF51FB; Tue, 5 Mar 2024 02:22:21 -0800 (PST) Received: from [10.57.11.67] (unknown [10.57.11.67]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7A2743F762; Tue, 5 Mar 2024 02:21:42 -0800 (PST) From: Balint Dobszay To: Sumit Garg 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 Subject: Re: [PATCH v2 1/3] tee: optee: Move pool_op helper functions Date: Tue, 05 Mar 2024 11:21:40 +0100 X-Mailer: MailMate (1.14r5937) Message-ID: In-Reply-To: References: <20240223095133.109046-1-balint.dobszay@arm.com> <20240223095133.109046-2-balint.dobszay@arm.com> <4E68610D-8F2B-4E27-AE5C-45CB59D7FEC0@arm.com> <1A75CF74-D486-4A3B-9004-250F870D7330@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 5 Mar 2024, at 6:36, Sumit Garg wrote: > On Mon, 4 Mar 2024 at 19:57, Balint Dobszay wr= ote: >> >> On 4 Mar 2024, at 10:17, Sumit Garg wrote: >> >>> 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 *teed= ev); >>>>>> struct tee_shm *tee_shm_alloc_priv_buf(struct tee_context *ctx, s= ize_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, struc= t tee_shm *shm, >>>>>> + size_t size, size_t align, >>>>>> + int (*shm_register)(struct tee_co= ntext *ctx, >>>>>> + struct tee_sh= m *shm, >>>>>> + struct page *= *pages, >>>>>> + size_t num_pa= ges, >>>>>> + unsigned long= start)); >>>>>> +void tee_shm_pool_op_free_helper(struct tee_shm_pool *pool, struc= t 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 functio= n >>> declarations should be include/linux/tee_core.h. >>> >>> [1] https://www.spinics.net/lists/kernel/msg5122983.html >> >> You're right, I'll rebase my patches on this. >> >> By incorporating your patch in my series, do you mean that I should ju= st >> add it as the first patch in the series for the next version? > > If you are happy to carry it then I would be in favour of this to take > care of dependency. Sure, I've added it to v3. Regards, Balint >> Or keep my >> series as is (do the rebase of course) and just mention that it's usin= g >> your patch as base? >> >> Regards, >> Balint >> >>>> >>>>>> struct tee_shm *tee_shm_register_kernel_buf(struct tee_context *c= tx, >>>>>> void *addr, size_t len= gth); >>>>>> >>>>>> -- >>>>>> 2.34.1 >>>>>>