From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 320FFC433F5 for ; Tue, 12 Oct 2021 18:05:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E434C6109E for ; Tue, 12 Oct 2021 18:05:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E434C6109E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JXqJcLUk9yavY3cBmH3IkQZ8n36E2XtRgpB3v1aoTuk=; b=gl8ZlUavQ0aZNY OK27JszVXKE9oZNRChrLnmrjY44vGrsMnO0UynxOr8zusy0w+eCugTbibIkF7+oJ4xj6HZzGy0h/z r9muKxrJpiicK/KUmULwwJ0OsITFyGGlwAzuT1wPvp9iEdrgZq3StKnepXHRS4+RUm+AZ/xs5YWIC oMaVTVS16dv+3Jd11iP3ILVxIhUB5ClK/v1/R3OgFUSThPuMRviOV1vNncmhC6ilqTfHwWgQfEzlj Ft6iTaiAqf5LOObnrhEnCnZThwE+ZD5I1FYGcxtWwEgDwMAZhB1kYRA32qbKGoPsGIGv4nxc05hWl nPrd3CmWH7gn8bmvuNuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1maM88-00DgB8-UT; Tue, 12 Oct 2021 18:04:01 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1maM85-00DgAK-Ge for linux-arm-kernel@lists.infradead.org; Tue, 12 Oct 2021 18:03:58 +0000 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 71A3C1FB; Tue, 12 Oct 2021 11:03:52 -0700 (PDT) Received: from bogus (unknown [10.57.21.181]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 14FD43F694; Tue, 12 Oct 2021 11:03:50 -0700 (PDT) Date: Tue, 12 Oct 2021 19:03:48 +0100 From: Sudeep Holla To: Sumit Garg Cc: op-tee@lists.trustedfirmware.org, jens.wiklander@linaro.org, jerome@forissier.org, daniel.thompson@linaro.org, maxim.uvarov@linaro.org, linux-arm-kernel@lists.infradead.org, Sudeep Holla , linux-kernel@vger.kernel.org Subject: Re: [PATCH] tee: optee: Fix missing devices unregister during optee_remove Message-ID: <20211012180348.zalanzdw3ykqg4db@bogus> References: <20211012073116.4156054-1-sumit.garg@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211012073116.4156054-1-sumit.garg@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211012_110357_639445_EDD4D25C X-CRM114-Status: GOOD ( 17.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Oct 12, 2021 at 01:01:16PM +0530, Sumit Garg wrote: > When OP-TEE driver is built as a module, OP-TEE client devices > registered on TEE bus during probe should be unregistered during > optee_remove. So implement optee_unregister_devices() accordingly. > > Fixes: c3fa24af9244 ("tee: optee: add TEE bus device enumeration support") > Reported-by: Sudeep Holla > Signed-off-by: Sumit Garg > --- > drivers/tee/optee/core.c | 3 +++ > drivers/tee/optee/device.c | 22 ++++++++++++++++++++++ > drivers/tee/optee/optee_private.h | 1 + > 3 files changed, 26 insertions(+) > > diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c > index ccad3c7c8f6d..3915dc574503 100644 > --- a/drivers/tee/optee/core.c > +++ b/drivers/tee/optee/core.c > @@ -586,6 +586,9 @@ static int optee_remove(struct platform_device *pdev) > { > struct optee *optee = platform_get_drvdata(pdev); > > + /* Unregister OP-TEE specific client devices on TEE bus */ > + optee_unregister_devices(); > + This is not based on FF-A support series by Jens I assume. I added optee_unregister_devices to optee_remove_common and that fixes the issue I reported. I haven't followed the comments by Jens on the approach yet. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel