[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 07/15] ac97: convert to new PCI API
From: |
malc |
Subject: |
Re: [Qemu-devel] [PATCH 07/15] ac97: convert to new PCI API |
Date: |
Wed, 10 Feb 2010 02:36:33 +0300 (MSK) |
User-agent: |
Alpine 2.00 (LNX 1167 2008-08-23) |
On Tue, 9 Feb 2010, Anthony Liguori wrote:
> On 02/09/2010 05:06 PM, malc wrote:
> >
> > > We already have this problem with the current interface.
> > >
> > Uh, i've meant the registration of one function to rule them all, instead
> > of how it's done currently - separate accessors for b/w/l/whatever.
> >
>
> How does that make any difference? Both the ioport and memory registrations
> interface take the same function pointer regardless of access size.
>
> If you wanted to introduce a quad-word specific accessor, you would need to
> introduce a different registration mechanism or you would have to change the
> signature for all of the functions.
Let's see:
Currently we have this
readb(...):
dostuff
return stuff
readw(...):
dostuff
return stuff
You are replacing it with
read(size...):
if (size == 1): do1
elif (size == 2): do2
else: # and here your code assumes that everything is handy dandy
# and size is 4
do4
The interface being implicit rather than explicit about the sizes
makes this possible, so i'm against it. The code was written the
way it was written for a purpose.
--
mailto:address@hidden
- [Qemu-devel] [PATCH 01/15] pci: add new bus functions, (continued)
- [Qemu-devel] [PATCH 01/15] pci: add new bus functions, Anthony Liguori, 2010/02/09
- [Qemu-devel] [PATCH 02/15] rtl8139: convert to new PCI interfaces, Anthony Liguori, 2010/02/09
- [Qemu-devel] [PATCH 05/15] wdt_i6300esb: fix io type leakage, Anthony Liguori, 2010/02/09
- [Qemu-devel] [PATCH 07/15] ac97: convert to new PCI API, Anthony Liguori, 2010/02/09
- Re: [Qemu-devel] [PATCH 07/15] ac97: convert to new PCI API, malc, 2010/02/09
- Re: [Qemu-devel] [PATCH 07/15] ac97: convert to new PCI API, Anthony Liguori, 2010/02/09
- Re: [Qemu-devel] [PATCH 07/15] ac97: convert to new PCI API, malc, 2010/02/09
- Re: [Qemu-devel] [PATCH 07/15] ac97: convert to new PCI API, Anthony Liguori, 2010/02/09
- Re: [Qemu-devel] [PATCH 07/15] ac97: convert to new PCI API,
malc <=
- Re: [Qemu-devel] [PATCH 07/15] ac97: convert to new PCI API, Anthony Liguori, 2010/02/09
- Re: [Qemu-devel] [PATCH 07/15] ac97: convert to new PCI API, malc, 2010/02/09
- Re: [Qemu-devel] [PATCH 07/15] ac97: convert to new PCI API, Anthony Liguori, 2010/02/11
[Qemu-devel] [PATCH 06/15] wdt_i6300esb: convert to new pci inteface, Anthony Liguori, 2010/02/09
[Qemu-devel] [PATCH 04/15] e1000: convert to new pci interface, Anthony Liguori, 2010/02/09
[Qemu-devel] [PATCH 09/15] eepro100: convert to new pci interface, Anthony Liguori, 2010/02/09