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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B36B8C4332F for ; Tue, 13 Dec 2022 06:27:38 +0000 (UTC) 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=cd397ti4/Rj4wtltHJlyxUpqlyaecFqBC1cOpUeKaOM=; b=tYDfPMClTf8fp5 w5vxWAGHt2/26E1jpA42PwE7KECMS7M+ulwEcknl3QhgPs++jzWpX96aaY0QUCMzc1ev1XZmsGccn TUfB3soIBKRT13Rl3DYgKqf/eEAi+3Yo0g/tt/K5yIXc7M7uJl8dkZl0O+MGcQYStEQaHj2qJVrIX 3IL8f95inIiFkt/N5r26Wg8kaP9tYeQRxD6XanjZPh5hT0Iv8pVpA+2qCDYBXmQhx1pRn2m4pGumu fTIosTuJThn56SJnGU58n0w7kK/NUsBFh0ZwkyIHrqmxDQ6DPn+2Zl5rXDqtXRktC0mOJ50fjaLBt bvfKibIw53j7RLmQo1rg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p4ykR-00BSk3-Qq; Tue, 13 Dec 2022 06:26:39 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p4ykP-00BSg5-Ay for linux-arm-kernel@lists.infradead.org; Tue, 13 Dec 2022 06:26:38 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 7D189CE129A; Tue, 13 Dec 2022 06:26:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32054C433EF; Tue, 13 Dec 2022 06:26:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1670912793; bh=ScIS6FleJhQOBgS5pmaN3XxScy/r9zsYFW//Fv9sO7Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=1YmFeEPYg2d8bSEnHi4tvfWvFBtGi9yxTezJ9VMw+LFT+00h8ewJjAPNU2xabz2Z2 Qj+K0dCQ5MFn+F6o4513CxxGWERgGc8oIxdabPsuf0trRh+D889Xd2sTznk9IRo+1b HYlHDug38huJ10h5I6isichYqQX33UAJQQ8hdkwY= Date: Tue, 13 Dec 2022 07:26:30 +0100 From: Greg Kroah-Hartman To: Elliot Berman Cc: Bjorn Andersson , Murali Nalajala , Trilok Soni , Srivatsa Vaddagiri , Carl van Schaik , Prakruthi Deepak Heragu , Arnd Bergmann , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet , Catalin Marinas , Will Deacon , Jassi Brar , Sudeep Holla , Mark Rutland , Lorenzo Pieralisi , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH v7 10/20] gunyah: rsc_mgr: Add resource manager RPC core Message-ID: References: <20221121140009.2353512-1-quic_eberman@quicinc.com> <20221121140009.2353512-11-quic_eberman@quicinc.com> <425a8fe9-24b6-26c7-9150-0d3fb76430be@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <425a8fe9-24b6-26c7-9150-0d3fb76430be@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221212_222637_566997_5A1D569D X-CRM114-Status: GOOD ( 15.68 ) 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 Mon, Dec 12, 2022 at 03:46:53PM -0800, Elliot Berman wrote: > > > On 11/21/2022 7:24 AM, Greg Kroah-Hartman wrote: > > On Mon, Nov 21, 2022 at 05:59:59AM -0800, Elliot Berman wrote: > > > +struct gh_rm_rpc { > > > + struct device *dev; > > > + struct gunyah_resource tx_ghrsc, rx_ghrsc; > > > + struct gh_msgq msgq; > > > + struct mbox_client msgq_client; > > > + struct gh_rm_connection *active_rx_connection; > > > + int last_tx_ret; > > > + > > > + struct idr call_idr; > > > + struct mutex call_idr_lock; > > > + > > > + struct mutex send_lock; > > > + > > > + struct work_struct recv_work; > > > +}; > > > > What handles the reference counting for this object? Shouldn't this be > > a real 'struct device' and just have a pointer to the parent? Otherwise > > how do you know when to free this? > > > > Reference counting is not needed on the gh_rm_rpc object because its only > client (the VM manager) is torn down before the gh_rm_rpc. So again, who controls the lifecycle of it? Where is the reference count for the structure as it is pointing to reference counted memory? thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel