From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH/RFC 7/9] Virtual network guest device driver Date: Mon, 21 May 2007 15:53:25 +0200 Message-ID: <200705211553.26552.arnd@arndb.de> References: <200705211328.04565.arnd@arndb.de> <20070521135628.17a4f9cc@gondolin.boeblingen.de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: Jimi Xenidis , "jmk-zzFmDc4TPjtKvsKVC3L/VUEOCMrvLtNR@public.gmane.org" , kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, mschwid2-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org, Christian Borntraeger , Suzanne McIntosh To: Cornelia Huck Return-path: In-Reply-To: <20070521135628.17a4f9cc-XQvu0L+U/CiXI4yAdoq52KN5r0PSdgG1zG2AekJRRhI@public.gmane.org> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org On Monday 21 May 2007, Cornelia Huck wrote: > IRQ numbers are evil :) yes, but getting rid of them is an entirely different discussion. I really think that in the first step, you should be able to use its "external interrupts" with the same request_irq interface as the other architectures. Fundamentally, the s390 architecture has external interrupt numbers as well, you're just using a different interface for registering them. The ccw devices obviously have a better interface already, but that doesn't help you here. = > It should be more like a > =A0=A0=A0=A0=A0=A0=A0=A0void *vmchannel_device_handle; > which could be different things depending on what we want the > vmchannel_device to be a child of (it could be an IRQ number for > PCI devices, or something like subchannel_id if we wanted to > support channel devices). No, the driver needs to know how to get at the interrupt without caring about the bus implementation, that's why you either need to have a callback function set by the driver (like s390 CCW or USB have it), or visible interrupt number (like everyone does). There is no need for a pointer back to a vmchannel_device_handle, all information needed by the bus layer can simply be in a subclass derived from the vmchannel_device, e.g. struct vmchannel_pci { struct pci_device *parent; /* shortcut, same as to_pci_dev(&this.vmdev.dev.parent) */ unsigned long signal_ioport; /* for interrupt generation */ struct vmchannel_device vmdev; }; You would allocate this structure in the pci_driver that registers the vmchannel_device. Arnd <>< ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/