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 756A9C433F5 for ; Fri, 30 Sep 2022 12:20:33 +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=ZHbjXaXhXRLOE+lbfTX0nNf41Nd9sONxu84g7BgopB8=; b=EdaFRUzYX47yvJ f862ZKrrvgszePbN8YtjBoNWaVBI+LzJkYsUN+KzbB1G33vDsyXl/NB8ZoXXaKO6LBql02CO0we3G ks5CUF1WHckbqn4A9jbLxWPUtzfKXAok914qFY1eiW1LlEvQjpFJySDYCxD1Gj5xDM+fCkScOUgvM d+XbIO5qzfozkrnk8uKPLyx/J3pg8iEgslONHcC/RJN//5H5bs9D5HK8/vOz2ne0dH+Qc+0/JoacZ IqkviWc1Y2DR7lfPlmcS/DvTNVoezaQFr6E4bbrtuUcqay6oX5xPhSefegcKrSMZO7JK0IR0LnODi yEDQYL/i4pqmegCIBMhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oeEzC-0096cj-3O; Fri, 30 Sep 2022 12:19:22 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oeEz7-0096bE-0H for linux-arm-kernel@lists.infradead.org; Fri, 30 Sep 2022 12:19:19 +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 ams.source.kernel.org (Postfix) with ESMTPS id 9E48FB8289E; Fri, 30 Sep 2022 12:19:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF9D8C433C1; Fri, 30 Sep 2022 12:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664540354; bh=nVR4dEDGuhHyPbGE1LbJ0tXE+TXxgnaQVIcG0EZELq0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PWQRzdEc5zZ6iirLoyIKxTSZZvRv0ziAVOPNDkX3YIJME1oW/kvMTpIe8Rez2giEg Z9D7LUrsDVmrpDGb9rHFtSCZO3e+wH+FmJcbeWktV1YKoclUx/VSt+88y+ZnJG59n4 XgMbE/gh34wl6yRYMdOmc3RqGvudZIEi6QVA1680= Date: Fri, 30 Sep 2022 14:19:11 +0200 From: Greg Kroah-Hartman To: Elliot Berman Cc: Bjorn Andersson , Murali Nalajala , Trilok Soni , Srivatsa Vaddagiri , Carl van Schaik , Andy Gross , Dmitry Baryshkov , Jassi Brar , linux-arm-kernel@lists.infradead.org, Mark Rutland , Lorenzo Pieralisi , Sudeep Holla , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet , Will Deacon , Catalin Marinas , Arnd Bergmann , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 13/14] gunyah: rsc_mgr: Add auxiliary devices for console Message-ID: References: <20220928195633.2348848-1-quic_eberman@quicinc.com> <20220928195633.2348848-14-quic_eberman@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220928195633.2348848-14-quic_eberman@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220930_051917_340885_12CB38DD X-CRM114-Status: GOOD ( 24.09 ) 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 Wed, Sep 28, 2022 at 12:56:32PM -0700, Elliot Berman wrote: > Gunyah resource manager exposes a concrete functionalities which > complicate a single resource manager driver. I am sorry, but I do not understand this sentance. What is so complicated about individual devices being created? Where are they created? What bus? Use auxiliary bus > to help split high level functions for the resource manager and keep the > primary resource manager driver focused on the RPC with RM itself. > Delegate Resource Manager's console functionality to the auxiliary bus. > > Signed-off-by: Elliot Berman > --- > drivers/virt/gunyah/Kconfig | 1 + > drivers/virt/gunyah/rsc_mgr.c | 21 +++++++++++++++++++++ > 2 files changed, 22 insertions(+) > > diff --git a/drivers/virt/gunyah/Kconfig b/drivers/virt/gunyah/Kconfig > index 78deed3c4562..610c8586005b 100644 > --- a/drivers/virt/gunyah/Kconfig > +++ b/drivers/virt/gunyah/Kconfig > @@ -17,6 +17,7 @@ config GUNYAH_RESORUCE_MANAGER > tristate "Gunyah Resource Manager" > select MAILBOX > select GUNYAH_MESSAGE_QUEUES > + select AUXILIARY_BUS > default y > help > The resource manager (RM) is a privileged application VM supporting > diff --git a/drivers/virt/gunyah/rsc_mgr.c b/drivers/virt/gunyah/rsc_mgr.c > index 7f7e89a6436b..435fe0149915 100644 > --- a/drivers/virt/gunyah/rsc_mgr.c > +++ b/drivers/virt/gunyah/rsc_mgr.c > @@ -16,6 +16,7 @@ > #include > #include > #include > +#include > #include > #include > > @@ -98,6 +99,8 @@ struct gh_rsc_mgr { > struct mutex send_lock; > > struct work_struct recv_work; > + > + struct auxiliary_device console_adev; > }; > > static struct gh_rsc_mgr *__rsc_mgr; > @@ -573,13 +576,31 @@ static int gh_rm_drv_probe(struct platform_device *pdev) > > __rsc_mgr = rsc_mgr; > > + rsc_mgr->console_adev.dev.parent = &pdev->dev; > + rsc_mgr->console_adev.name = "console"; > + ret = auxiliary_device_init(&rsc_mgr->console_adev); > + if (ret) > + goto err_msgq; > + ret = auxiliary_device_add(&rsc_mgr->console_adev); > + if (ret) > + goto err_console_adev_uninit; > + > return 0; > + > +err_console_adev_uninit: > + auxiliary_device_uninit(&rsc_mgr->console_adev); > +err_msgq: > + gunyah_msgq_remove(&rsc_mgr->msgq); > + return ret; > } Why can't you just have individual platform devices for the individual devices your hypervisor exposes? You control the platform devices, why force them to be shared like this? thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel