From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Auger Subject: Re: [PATCH v2] sysbus: add irq_routing_notifier Date: Mon, 27 Apr 2015 14:20:15 +0200 Message-ID: <553E297F.4020706@linaro.org> References: <1429879153-23476-1-git-send-email-eric.auger@linaro.org> <553DF2AA.2070102@linaro.org> <553E11E7.7070704@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <553E11E7.7070704@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: Paolo Bonzini , Peter Crosthwaite Cc: "kvmarm@lists.cs.columbia.edu" , Alex Williamson , eric.auger@st.com, "qemu-devel@nongnu.org Developers" , Patch Tracking List-Id: kvmarm@lists.cs.columbia.edu On 04/27/2015 12:39 PM, Paolo Bonzini wrote: > > > On 27/04/2015 10:26, Eric Auger wrote: >>>> One of my long term goals is to try and get rid of sysbus IRQ >>>> abstraction completely in favor of just qdev gpios. This means >>>> features that apply to GPIOs automatically apply to IRQs and vice >>>> versa. Can your notifier hook be pushed up to the qdev GPIO level to >>>> make it more globally usable and avoid a new feature to sysbus IRQs? >> Yes sure, I am going to put the notifier in DeviceClass then. > > I've thought too about this, and I'm not sure about it. > > It would mean you have to pass the gpio name (e.g. > SYSBUS_DEVICE_GPIO_IRQ) to the hook, and in the case of sysbus IRQs this > would leak the SYSBUS_DEVICE_GPIO_IRQ abstraction to the implementors of > the hook. Hi Paolo, Currently my notifier has the following proto: void (*connect_gpio_out_notifier)(DeviceState *dev, qemu_irq irq); It is sufficient for my need. is it really mandated to pass other qdev_connect_gpio_out_named args, ie. name & n? Best Regards Eric > > Paolo > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ymi3w-0003Tl-5p for qemu-devel@nongnu.org; Mon, 27 Apr 2015 08:23:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ymi3r-0002Yr-5t for qemu-devel@nongnu.org; Mon, 27 Apr 2015 08:23:00 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:35884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ymi3q-0002Yf-WB for qemu-devel@nongnu.org; Mon, 27 Apr 2015 08:22:55 -0400 Received: by wizk4 with SMTP id k4so97098817wiz.1 for ; Mon, 27 Apr 2015 05:22:54 -0700 (PDT) Message-ID: <553E297F.4020706@linaro.org> Date: Mon, 27 Apr 2015 14:20:15 +0200 From: Eric Auger MIME-Version: 1.0 References: <1429879153-23476-1-git-send-email-eric.auger@linaro.org> <553DF2AA.2070102@linaro.org> <553E11E7.7070704@redhat.com> In-Reply-To: <553E11E7.7070704@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] sysbus: add irq_routing_notifier List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Peter Crosthwaite Cc: "kvmarm@lists.cs.columbia.edu" , Alex Williamson , eric.auger@st.com, "qemu-devel@nongnu.org Developers" , Patch Tracking On 04/27/2015 12:39 PM, Paolo Bonzini wrote: > > > On 27/04/2015 10:26, Eric Auger wrote: >>>> One of my long term goals is to try and get rid of sysbus IRQ >>>> abstraction completely in favor of just qdev gpios. This means >>>> features that apply to GPIOs automatically apply to IRQs and vice >>>> versa. Can your notifier hook be pushed up to the qdev GPIO level to >>>> make it more globally usable and avoid a new feature to sysbus IRQs? >> Yes sure, I am going to put the notifier in DeviceClass then. > > I've thought too about this, and I'm not sure about it. > > It would mean you have to pass the gpio name (e.g. > SYSBUS_DEVICE_GPIO_IRQ) to the hook, and in the case of sysbus IRQs this > would leak the SYSBUS_DEVICE_GPIO_IRQ abstraction to the implementors of > the hook. Hi Paolo, Currently my notifier has the following proto: void (*connect_gpio_out_notifier)(DeviceState *dev, qemu_irq irq); It is sufficient for my need. is it really mandated to pass other qdev_connect_gpio_out_named args, ie. name & n? Best Regards Eric > > Paolo >