Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1872418lqg; Mon, 4 Mar 2024 06:29:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVWa6tuYcccTpgjgBpv/c+P/ros2X/NawLGam4ZRBGpQvfDMzUZLfq/dzxT7JDR8mnsXKX5euRkGX2HkmAf2HbU8TFOQSJTNaWWrkdlsQ== X-Google-Smtp-Source: AGHT+IHy1As6/DGAOhWdVbqYgQiYxAnvgXfh5L9QktW2R8AQ3ZCGgUxqZyCIhaEkYuW7SiIdsELA X-Received: by 2002:a05:6871:511:b0:220:13b5:3e9e with SMTP id s17-20020a056871051100b0022013b53e9emr10427988oal.4.1709562574056; Mon, 04 Mar 2024 06:29:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709562574; cv=pass; d=google.com; s=arc-20160816; b=TRaTnxsWcFt/kLjAxBkhM6pzE6elEWRBXk/JPVgp083o1CTqJYsg6Ik64hZpRGp8ps cY2Gg9lAGsfWe5ljdPCC8HFlPRdB/yc0+InckR8laeWKL+D1/7Fmf40uibihW2PJCS/k QAG8H43UgNlIWYM254ak+3BAVyAemGeGEz8IloMwObjYrYlEou7VteQODnu64lmxOnPe U0kmpnVUtekLTChogFQhTCFqAh6xaVThhLVVM8TIgAQVzlrHS4FTXvkKC+aD0T4gv9PJ YiS2IT0TDuwN4nHg0jmXzCiduJ7vbdZC39uLHBfKp4yzbXC1aBh3I6I3WB+OceBMm8GR G12w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from; bh=jCeTraKkKQdJohiUvnKRFBkCGe4yDnhgdDhoZuRJ9ws=; fh=NQ+Sk9w7j4hAL//gXxn2kQGS/bglMGy3P/9cYV6RJMQ=; b=MB93g8Yr1dSA6nOKpmGxQS/WAq7nSWRFmRxw33Cv2cH9mpX9bm3AJ1Kziuod3ZMFfS TAEBNTPubSKvAKF8QdmoMXyKT4BAFCUAUT50ImEDYTwaBPuA7JOHNt4wpEe8zbPp3Jfv FB7jq4n7lKZCieEg+OVxjIuIMX+ieTilgtnD11uzP58KsDBtdNFQCrk4x6580qvjlFE5 uSrJYF0LOpbtYPACC+ObUDDFTeobUpc4WORcyqt/SmcjCTQeEPOBMOnkmJdmjpKcyR/t sIqAuDMh8ItaGxQeKHK4Svaws+WnuxT6XBg6Lz9npsqLKjwan9N7goIZSsiPFRqAUncA /8Yw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-90730-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90730-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k2-20020a05620a414200b00785c2a638e3si10859258qko.49.2024.03.04.06.29.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 06:29:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90730-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-90730-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90730-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 210C21C23773 for ; Mon, 4 Mar 2024 14:28:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4993B45BFD; Mon, 4 Mar 2024 14:27:06 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9129E45BF0; Mon, 4 Mar 2024 14:27:03 +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=1709562425; cv=none; b=HPxxkPQn4LNg3eeAbrLche8HB3su3ZUjgUp37EdLcZqJeuHae52gOv2eJ22fZWUTal/YZhoMqC6wdpH9IshoWa3PLVggBaTBdyZ7HWFH3gUjeuWYvirymydONtOePQOjArv/eaT/I647+K945vcz2Yw6uXWFZnVYKS8Xr7j9MMs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709562425; c=relaxed/simple; bh=8oTA6o+beFUam63h39H+nP7j7L+MEdytbx/GsplFdO8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HGrI+oaTWTY1O+KhMCz6/GX37G5ky5hMvb80ViKXcATLZTQUPFy4wuNFhYVvTJtnJZCefbfC1Hvq9IyhZ1uJel4n6TxdjZFpXZZrRCeWrISrp56UTFJDTxneuQVT3yFEp7UFEsr1Jrm6UTqe/qHphI1smV2RhlPxVGUtYAKunaA= 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 3F7941FB; Mon, 4 Mar 2024 06:27:39 -0800 (PST) Received: from [10.57.12.135] (unknown [10.57.12.135]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B62A03F762; Mon, 4 Mar 2024 06:27:00 -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: Mon, 04 Mar 2024 15:26:58 +0100 X-Mailer: MailMate (1.14r5937) Message-ID: <1A75CF74-D486-4A3B-9004-250F870D7330@arm.com> 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain 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? 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 >>>>