Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp192596lqs; Mon, 4 Mar 2024 21:37:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVhTG5lM4bMPcQwpKP+aQK/JkLVC/HoIXlTiLhOr9JxQ80B4ppwxzceKlD5PHP86Hm1fagOjc18EKSbBSc+YU3VAa2WhBVr7baCS2uLVQ== X-Google-Smtp-Source: AGHT+IG0T9Ajcem8mNMEN+pI0OuSrGJ5MEsC3KHD/Mlk5lvhmIEYyNLTeBsqQxRYkZpL+WeyguJl X-Received: by 2002:a0d:f307:0:b0:609:9fe1:a6ed with SMTP id c7-20020a0df307000000b006099fe1a6edmr6191078ywf.15.1709617034870; Mon, 04 Mar 2024 21:37:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709617034; cv=pass; d=google.com; s=arc-20160816; b=n4DXfGLpHhpn9DmaATuN6gr8C3ZS3/hcrrThSAm3x7qz0KKPpFlKQ7YWG8HWiIj1jq gYqlYW6fIK/lM6/7Q+3o5Hlj4rqgSfmPXcO7jTxjia1Oe+gd/988vET4oOX8fLB5APB8 Xt3k7+v+l2vczta1kGbmrOO/FiRC0he2awjQsXZ+hSvqmSbKbTXkL/pb7KJyqXZ6G47l CgwHYwlp9ufPQePDi7K6pKETtGIBSL7wHQxalJ3d/Cxr4Kx26mL/r8c32i6lld/3gkWU 0qkAGx1XlG7RjmlTN6bYWm1mblsR3FEgQ6mHVKd0FfWDP65yCBaXOEkY3FxNJQagwJes pR/w== 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=9WJdN6jIWjInavb3iZMUJn2P9ZES7C5MXZcfimAwNBo=; fh=Nd1L30G6y1WH1B0DmlYhaprXQJfpHZ3AChR6mZIjujc=; b=nrcWL3KZZBXj25raWLDHguA6LhpcsRQYb+EsIBLJutm8Z9jrqIncjjRISvOKChB0Zq IEIMpbHRUHYptWF6wLTlCRtLAByiKcs5t2ttmIhx4a8XM0pVEDRGIeMqf1kdANrGfVDw OaFwpGwVdQUtzu1xqo9UZCyBFxPtEN8tDtB7K2EW22Y3sgZ6d0mHaxs6gPhBuCuklgdF Qo3Y2CaLOf+lgYu0fqPmzeAYcx02S/G8C/U/z7WAAUQ0ZP60b11YKqpZX8FGOlEZQlY6 E9KCHhyNSR2vk53W3aLE9m7FdLQ7Zg3SabVfdSG5fgyQLKrdcldVvUNPPH0hpbr0Bgvs Q+ew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iKCcnjxP; 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-91695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91695-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t20-20020a05620a451400b0078806316be0si10593794qkp.339.2024.03.04.21.37.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 21:37:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iKCcnjxP; 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-91695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91695-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 419351C21A06 for ; Tue, 5 Mar 2024 05:37:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C336F48CD4; Tue, 5 Mar 2024 05:37:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="iKCcnjxP" 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 3286BAD5E for ; Tue, 5 Mar 2024 05:37:04 +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=1709617025; cv=none; b=j8JZ95uLxEauLs03AWGLvIDLcF/4PIe9VyEsOPsrkFmtXdN5Y5arbeqmEmvnoKWbEmxb03kYY/rQ9ChygZjUl5DC+ZHRpMhKjARvrBpuHSkMLZZHra3y6Z0Ns1VPp9KF+8YBPpMIup4zMTlYuM6JYQLbwpodepTvHwa7GdIckBY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709617025; c=relaxed/simple; bh=6ofdleIjmg4gSNbN7RMlFIqvhZj0cbxzZ1luEqJlDYE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=jOTHpgrkuIi6Q3lHe3vOSzb9IGZR2TGjUNoxEkqfpBv3UWWWKxCu/tyT+QGvjLNyHdhd2KXy9nD84yLn99swqBlryup7IAiLWpUizwBeHDil7DHMH5tc4vAnvYheEmRsSSXF9k3aIX40xy0fq4vKr8xUGIYtUU7A1YTBxWt2wCo= 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=iKCcnjxP; 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-7d5bbbe592dso2943904241.0 for ; Mon, 04 Mar 2024 21:37:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709617023; x=1710221823; 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=9WJdN6jIWjInavb3iZMUJn2P9ZES7C5MXZcfimAwNBo=; b=iKCcnjxPOlrYdmXXUah/wtOb5E5Df2M1VDsdRjJ16U43ik7A3A3RrPSj7T/Bi9TCkv fmPiL+sFUqoXlMklcrnQpJ3ngZIFe9Q83b4U/thr6PU6BoP4r/1i+LLcLVg/XY10mVE9 n/h3N/o5GTFMNmqIjTNcqmFOV+gmhYLf8KGXSBcJK8Ccx9hLm4F6Qexwg0V+ISlqcwDu LsNWQlqHwSg3ps5oT7JbF7kDQ2daDE6Wn+casN5CnxEcWrMIGIBCZ15cW6mUJwQzIDq2 yMQ3W7ETaMms3gmeEYarx2AIINZn4QXWQysydZN2qxb3fi6MpbZhiNsTqyatXYsXmewN XPAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709617023; x=1710221823; 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=9WJdN6jIWjInavb3iZMUJn2P9ZES7C5MXZcfimAwNBo=; b=QUGDQ0u6D7Rc3AVEuyREoyebQSQfVMbb5d6NE8tblO2q3M4FQMm7G4TX89n3Gurqm/ zzsVkpjg5XrF19SEI64WAmZ6IiuQuTnKR/rft/L1xV1il7AStIkkeewv5ZLs5kLOq7pm Vt12U54xyaBROTV4l9X7BMM8FGSP15bvW7LiJxKu3S52nA4HIGjh/JCjFC8ZH7Ys0nL8 qXPW4w/LeLHc8KIZKtXwsco95LNo9sxQRDb9KnmC+cx4DlmS1H4E+pWQBdyicE2uybea vk4jMwJzJ91JOO04fYXF/MQhyDZWQvrv51ltthxUuxtyJd0HFqYiz3eTA3TvfiP3zTMO fLxw== X-Forwarded-Encrypted: i=1; AJvYcCVnzBmaEKmXfY5xd81YDoqfBqqyNaxRrk+cSjoS64pEw3aMunutIlm6JKwZvA36WRy1VFqaKB0roedf7J0qqcj6yXqDg5Q3aT5GJwxE X-Gm-Message-State: AOJu0YzNKF19IsTlYJR43XxOVfgOOwFKvtzYd8rB/zZI37AJ5lTKsuUS KsX1KUGufxFTcuVRuzeFW1YZGMXJy0VZMVklexRRXmUFfPu8Z/r1Qzhas45ECS0ju9B0qq/E48+ S5O3U9y71eTsvn9Xqdj4mAnsfdDE11I75hBJ9yw== X-Received: by 2002:a67:f1d4:0:b0:470:397e:5329 with SMTP id v20-20020a67f1d4000000b00470397e5329mr806565vsm.10.1709617023225; Mon, 04 Mar 2024 21:37:03 -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> <1A75CF74-D486-4A3B-9004-250F870D7330@arm.com> In-Reply-To: <1A75CF74-D486-4A3B-9004-250F870D7330@arm.com> From: Sumit Garg Date: Tue, 5 Mar 2024 11:06:52 +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" On Mon, 4 Mar 2024 at 19:57, Balint Dobszay wrote: > > 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 *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 > > You're right, I'll rebase my patches on this. > > By incorporating your patch in my series, do you mean that I should just > 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. -Sumit > Or keep my > series as is (do the rebase of course) and just mention that it's using > your patch as base? > > Regards, > Balint > > >> > >>>> struct tee_shm *tee_shm_register_kernel_buf(struct tee_context *ctx, > >>>> void *addr, size_t length); > >>>> > >>>> -- > >>>> 2.34.1 > >>>>