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 80A59C433F5 for ; Tue, 11 Oct 2022 19:02:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230134AbiJKTCF (ORCPT ); Tue, 11 Oct 2022 15:02:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229942AbiJKTB0 (ORCPT ); Tue, 11 Oct 2022 15:01:26 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8E0389826; Tue, 11 Oct 2022 12:01:15 -0700 (PDT) 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 B9571CE17E9; Tue, 11 Oct 2022 19:01:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81992C433D7; Tue, 11 Oct 2022 19:01:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1665514870; bh=+alAofN7M62G6kKsH4kJ9xjNMHw9HoKNNk4jSYu6pg8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jPiQ4OMo78Xp1XH3B2CwGl5IzZEDUNPlkNOgGsdeDNGLtJSEMElxxWD84R84VykPT UAPM1hq/BM9CFhAhb1zH4f4rNphx8lj0iZ+f0sR0yruGgdqWc3c5xj5XLOuZeK3keO r1SdbJHxwDNxHbuttB7Gxwz2YNY731xIm3UZl1Y0= Date: Tue, 11 Oct 2022 21:01:54 +0200 From: Greg Kroah-Hartman To: Trilok Soni Cc: Elliot Berman , Bjorn Andersson , Arnd Bergmann , Murali Nalajala , Srivatsa Vaddagiri , Carl van Schaik , Prakruthi Deepak Heragu , 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 , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 03/13] gunyah: Common types and error codes for Gunyah hypercalls Message-ID: References: <20221011000840.289033-1-quic_eberman@quicinc.com> <20221011000840.289033-4-quic_eberman@quicinc.com> <52b07662-666a-2fc7-cb18-a9d294f7ae9b@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Tue, Oct 11, 2022 at 11:50:04AM -0700, Trilok Soni wrote: > On 10/11/2022 11:48 AM, Greg Kroah-Hartman wrote: > > On Tue, Oct 11, 2022 at 11:21:36AM -0700, Elliot Berman wrote: > > > > > > > > > On 10/11/2022 12:21 AM, Greg Kroah-Hartman wrote: > > > > On Mon, Oct 10, 2022 at 05:08:30PM -0700, Elliot Berman wrote: > > > > > Add architecture-independent standard error codes, types, and macros for > > > > > Gunyah hypercalls. > > > > > > > > > > Signed-off-by: Elliot Berman > > > > > --- > > > > > MAINTAINERS | 1 + > > > > > include/asm-generic/gunyah.h | 74 ++++++++++++++++++++++++++++++++++++ > > > > > 2 files changed, 75 insertions(+) > > > > > create mode 100644 include/asm-generic/gunyah.h > > > > > > > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > > > > index ef6de7599d98..4fe8cec61551 100644 > > > > > --- a/MAINTAINERS > > > > > +++ b/MAINTAINERS > > > > > @@ -8886,6 +8886,7 @@ L: linux-arm-msm@vger.kernel.org > > > > > S: Supported > > > > > F: Documentation/devicetree/bindings/firmware/gunyah-hypervisor.yaml > > > > > F: Documentation/virt/gunyah/ > > > > > +F: include/asm-generic/gunyah.h > > > > > HABANALABS PCI DRIVER > > > > > M: Oded Gabbay > > > > > diff --git a/include/asm-generic/gunyah.h b/include/asm-generic/gunyah.h > > > > > new file mode 100644 > > > > > index 000000000000..64a02dd3b5ad > > > > > --- /dev/null > > > > > +++ b/include/asm-generic/gunyah.h > > > > > > > > Why not include/linux/gunyah.h? Why asm-generic? This is not an > > > > architecture. > > > > > > > > > > My idea here is to differentiate between code that interacts with hypercalls > > > and code that uses the abstractions provided on top of those hypercalls. > > > include/asm-generic/gunyah.h contains architecture-independent definitions > > > for hypercalls. Hypercalls are architecture-specific. > > > > > > For instance, I wanted to avoid a header file that mixes the definitions for > > > the message-queue mailbox with the hypercall definitions that the > > > message-queue mailbox driver itself uses. > > > > > > I can put it all in include/linux/gunyah.h and delineate with some clear > > > comments, but I initially felt it would be better to have separate header > > > file. > > > > Please put it all in one place, this is just one tiny driver and should > > not abuse the asm-generic location at all, no one is only going to want > > just this one file, they are going to need the whole thing or nothing. > > > > Let's say when we do the RISC-V port for Gunyah, we may need to move it back > to asm-generic then? If that really happens and the things are arch-specific, yes, we can worry about that then. You know better than this, we only do what is needed now. We do not add code, or make splits like this, when it is not needed today. Keep it simple first, you want to get this merged first, and then you can iterate on it to make it complex and messy :) 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 24ED0C433F5 for ; Tue, 11 Oct 2022 19:02:30 +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=p3AiEPi8Lf5HWZJhpULvPkIuS8mBkIjGvN9YmdhZtBc=; b=YDru9YS+Noz5Zh pYQwK2ePTT32mI93E2UPxH0MzlLg98MRJtLXedBm3ccxUDioK//HW4vRTUeas+MJVZQGT+TdfuBD5 zAQKLd+MsjM1QARuv2p5ZR8JwY3AR3u7z4UU/jFwj+P5tTvP5n7fU/inDXrj4ZD1HxJ9mOuOjx0Kf PCfMtYvQ/Kp8+16kNa1l/hDqx3BaqPGbSadRaiUtt/owVHqn9XDstkSpRUcA9QDuQAs4wpr3Mr3ld PJfErErTP9JkwVIA8uVZwDaTN2dPSk+AqK0ZCZ2T964OChKbLuKjG7sI1S3I0lxcyDaR2xbpfuGEi uiH4tmfIpqri+Eef3qPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oiKVB-005Z2A-TR; Tue, 11 Oct 2022 19:01:18 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oiKV6-005Yzs-JC for linux-arm-kernel@lists.infradead.org; Tue, 11 Oct 2022 19:01:15 +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 39C5BB81668; Tue, 11 Oct 2022 19:01:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81992C433D7; Tue, 11 Oct 2022 19:01:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1665514870; bh=+alAofN7M62G6kKsH4kJ9xjNMHw9HoKNNk4jSYu6pg8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jPiQ4OMo78Xp1XH3B2CwGl5IzZEDUNPlkNOgGsdeDNGLtJSEMElxxWD84R84VykPT UAPM1hq/BM9CFhAhb1zH4f4rNphx8lj0iZ+f0sR0yruGgdqWc3c5xj5XLOuZeK3keO r1SdbJHxwDNxHbuttB7Gxwz2YNY731xIm3UZl1Y0= Date: Tue, 11 Oct 2022 21:01:54 +0200 From: Greg Kroah-Hartman To: Trilok Soni Cc: Elliot Berman , Bjorn Andersson , Arnd Bergmann , Murali Nalajala , Srivatsa Vaddagiri , Carl van Schaik , Prakruthi Deepak Heragu , 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 , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 03/13] gunyah: Common types and error codes for Gunyah hypercalls Message-ID: References: <20221011000840.289033-1-quic_eberman@quicinc.com> <20221011000840.289033-4-quic_eberman@quicinc.com> <52b07662-666a-2fc7-cb18-a9d294f7ae9b@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221011_120113_000746_4C5AF862 X-CRM114-Status: GOOD ( 35.11 ) 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 11, 2022 at 11:50:04AM -0700, Trilok Soni wrote: > On 10/11/2022 11:48 AM, Greg Kroah-Hartman wrote: > > On Tue, Oct 11, 2022 at 11:21:36AM -0700, Elliot Berman wrote: > > > > > > > > > On 10/11/2022 12:21 AM, Greg Kroah-Hartman wrote: > > > > On Mon, Oct 10, 2022 at 05:08:30PM -0700, Elliot Berman wrote: > > > > > Add architecture-independent standard error codes, types, and macros for > > > > > Gunyah hypercalls. > > > > > > > > > > Signed-off-by: Elliot Berman > > > > > --- > > > > > MAINTAINERS | 1 + > > > > > include/asm-generic/gunyah.h | 74 ++++++++++++++++++++++++++++++++++++ > > > > > 2 files changed, 75 insertions(+) > > > > > create mode 100644 include/asm-generic/gunyah.h > > > > > > > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > > > > index ef6de7599d98..4fe8cec61551 100644 > > > > > --- a/MAINTAINERS > > > > > +++ b/MAINTAINERS > > > > > @@ -8886,6 +8886,7 @@ L: linux-arm-msm@vger.kernel.org > > > > > S: Supported > > > > > F: Documentation/devicetree/bindings/firmware/gunyah-hypervisor.yaml > > > > > F: Documentation/virt/gunyah/ > > > > > +F: include/asm-generic/gunyah.h > > > > > HABANALABS PCI DRIVER > > > > > M: Oded Gabbay > > > > > diff --git a/include/asm-generic/gunyah.h b/include/asm-generic/gunyah.h > > > > > new file mode 100644 > > > > > index 000000000000..64a02dd3b5ad > > > > > --- /dev/null > > > > > +++ b/include/asm-generic/gunyah.h > > > > > > > > Why not include/linux/gunyah.h? Why asm-generic? This is not an > > > > architecture. > > > > > > > > > > My idea here is to differentiate between code that interacts with hypercalls > > > and code that uses the abstractions provided on top of those hypercalls. > > > include/asm-generic/gunyah.h contains architecture-independent definitions > > > for hypercalls. Hypercalls are architecture-specific. > > > > > > For instance, I wanted to avoid a header file that mixes the definitions for > > > the message-queue mailbox with the hypercall definitions that the > > > message-queue mailbox driver itself uses. > > > > > > I can put it all in include/linux/gunyah.h and delineate with some clear > > > comments, but I initially felt it would be better to have separate header > > > file. > > > > Please put it all in one place, this is just one tiny driver and should > > not abuse the asm-generic location at all, no one is only going to want > > just this one file, they are going to need the whole thing or nothing. > > > > Let's say when we do the RISC-V port for Gunyah, we may need to move it back > to asm-generic then? If that really happens and the things are arch-specific, yes, we can worry about that then. You know better than this, we only do what is needed now. We do not add code, or make splits like this, when it is not needed today. Keep it simple first, you want to get this merged first, and then you can iterate on it to make it complex and messy :) thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel