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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3A3CC636D7 for ; Thu, 16 Feb 2023 06:44:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229584AbjBPGoA (ORCPT ); Thu, 16 Feb 2023 01:44:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbjBPGn7 (ORCPT ); Thu, 16 Feb 2023 01:43:59 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 664AA273A; Wed, 15 Feb 2023 22:43:57 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 00D3161DAC; Thu, 16 Feb 2023 06:43:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D051EC433D2; Thu, 16 Feb 2023 06:43:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1676529836; bh=pCLGTlYBFyupZgL2IE9Tt2F0/qgXvoVlOCMrCJO6ur8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tnvWcYvdLAZPtMeghkOysW0Pk1JS8aUxANHeYPjwY2R/ljRuG280abpVEm8kHaTgM ar3+Glb4vEBrQbRMOGg6isgCPu/BlBE/JaaD6JzxvS3VzDtBkk3Lr+0sSCYa4+6C12 5sNDQGF8l3hsOUs6+XyxCHZOTcFiocWwoqp7UdsM= Date: Thu, 16 Feb 2023 07:43:53 +0100 From: Greg Kroah-Hartman To: Elliot Berman Cc: Alex Elder , Srinivas Kandagatla , Prakruthi Deepak Heragu , Murali Nalajala , Trilok Soni , Srivatsa Vaddagiri , Carl van Schaik , Dmitry Baryshkov , Bjorn Andersson , Konrad Dybcio , Arnd Bergmann , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet , Bagas Sanjaya , Catalin Marinas , Jassi Brar , 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 Subject: Re: [PATCH v10 08/26] gunyah: rsc_mgr: Add resource manager RPC core Message-ID: References: <20230214211229.3239350-1-quic_eberman@quicinc.com> <20230214212327.3310128-1-quic_eberman@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230214212327.3310128-1-quic_eberman@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Tue, Feb 14, 2023 at 01:23:25PM -0800, Elliot Berman wrote: > +struct gh_rm { > + struct device *dev; What device does this point to? > + 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 kmem_cache *cache; > + struct mutex send_lock; > + struct blocking_notifier_head nh; > +}; This obviously is the "device" that your system works on, so what are the lifetime rules of it? Why isn't is just a real 'struct device' in the system instead of a random memory blob with a pointer to a device? What controls the lifetime of this structure and where is the reference counting logic for it? And why no documentation for this core structure? thanks, greg k-h 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 8375CC61DA4 for ; Thu, 16 Feb 2023 06:44:59 +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=P7dG6GfcHFqEkuQnA0rSXED1C37rk0VT3KgtY6TiCec=; b=w3rL1U1tufhMaH XmarldQR0Foxd9GlkdP99Qjoi1sGU1pcxUbpV+N/TFGPiVSKBWxRhwUfHm91QBI/CF98gxblQcQVs gYf6Sz8HAhGsTp4wPsGCAner8k16pM4N5gmzFLakuRogLENfHjd1hldDXxh4gKXtffyNJ2lFaRXPt rpI4l+A/qA6R2B2IXe81IED3m7o2qpk8bWC5cg+OTtdCGFUtL1mfkjY9VJ31b25OA1mQYrDwLWkwr 12eBbnwe9Tmcy8SKqfjNQDegmFe3PdL8/9PPuLU9LJ+s7NdMov8iHKXder8296Dri2uwNJ6T8qMXD LcNcrfuQrhwcm+x6/T0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSXzs-008icD-Ph; Thu, 16 Feb 2023 06:44:00 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSXzp-008ibR-Ko for linux-arm-kernel@lists.infradead.org; Thu, 16 Feb 2023 06:43:58 +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 dfw.source.kernel.org (Postfix) with ESMTPS id 03C4761E7D; Thu, 16 Feb 2023 06:43:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D051EC433D2; Thu, 16 Feb 2023 06:43:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1676529836; bh=pCLGTlYBFyupZgL2IE9Tt2F0/qgXvoVlOCMrCJO6ur8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tnvWcYvdLAZPtMeghkOysW0Pk1JS8aUxANHeYPjwY2R/ljRuG280abpVEm8kHaTgM ar3+Glb4vEBrQbRMOGg6isgCPu/BlBE/JaaD6JzxvS3VzDtBkk3Lr+0sSCYa4+6C12 5sNDQGF8l3hsOUs6+XyxCHZOTcFiocWwoqp7UdsM= Date: Thu, 16 Feb 2023 07:43:53 +0100 From: Greg Kroah-Hartman To: Elliot Berman Cc: Alex Elder , Srinivas Kandagatla , Prakruthi Deepak Heragu , Murali Nalajala , Trilok Soni , Srivatsa Vaddagiri , Carl van Schaik , Dmitry Baryshkov , Bjorn Andersson , Konrad Dybcio , Arnd Bergmann , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet , Bagas Sanjaya , Catalin Marinas , Jassi Brar , 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 Subject: Re: [PATCH v10 08/26] gunyah: rsc_mgr: Add resource manager RPC core Message-ID: References: <20230214211229.3239350-1-quic_eberman@quicinc.com> <20230214212327.3310128-1-quic_eberman@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230214212327.3310128-1-quic_eberman@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230215_224357_735896_2ED228A8 X-CRM114-Status: GOOD ( 10.66 ) 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, Feb 14, 2023 at 01:23:25PM -0800, Elliot Berman wrote: > +struct gh_rm { > + struct device *dev; What device does this point to? > + 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 kmem_cache *cache; > + struct mutex send_lock; > + struct blocking_notifier_head nh; > +}; This obviously is the "device" that your system works on, so what are the lifetime rules of it? Why isn't is just a real 'struct device' in the system instead of a random memory blob with a pointer to a device? What controls the lifetime of this structure and where is the reference counting logic for it? And why no documentation for this core structure? thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel