qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 4/7] pci/config: convert pci configuration space


From: Michael S. Tsirkin
Subject: [Qemu-devel] Re: [PATCH 4/7] pci/config: convert pci configuration space handler to use callback.
Date: Wed, 10 Jun 2009 18:16:19 +0300
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Jun 02, 2009 at 03:42:47PM +0900, Isaku Yamahata wrote:
> convert pci configuration space handler into callbacks.
> 
> Signed-off-by: Isaku Yamahata <address@hidden>
> ---
> changes v5
> - typo
> - don't change cirrus_vga.c behaviour.
> ---
>  hw/acpi.c         |   11 ++++-----
>  hw/cirrus_vga.c   |   15 ++++++++++-
>  hw/gt64xxx.c      |   13 +---------
>  hw/piix_pci.c     |   18 +++++++++-----
>  hw/vga.c          |   10 +++++---
>  hw/wdt_i6300esb.c |   66 +++++++++++++++++++++-------------------------------
>  6 files changed, 63 insertions(+), 70 deletions(-)

It might be a good idea to split this up, and handle each device
in a separate patch.

> diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c
> index ce3ffe2..0790ef1 100644
> --- a/hw/gt64xxx.c
> +++ b/hw/gt64xxx.c
> @@ -1083,17 +1083,6 @@ static void gt64120_reset(void *opaque)
>      gt64120_pci_mapping(s);
>  }
>  
> -static uint32_t gt64120_read_config(PCIDevice *d, uint32_t address, int len)
> -{
> -    return pci_default_read_config(d, address, len);
> -}
> -
> -static void gt64120_write_config(PCIDevice *d, uint32_t address, uint32_t 
> val,
> -                                 int len)
> -{
> -    pci_default_write_config(d, address, val, len);
> -}
> -
>  static void gt64120_save(QEMUFile* f, void *opaque)
>  {
>      PCIDevice *d = opaque;
> @@ -1133,7 +1122,7 @@ PCIBus *pci_gt64120_init(qemu_irq *pic)
>                                     pic, 144, 4);
>      s->ISD_handle = cpu_register_io_memory(0, gt64120_read, gt64120_write, 
> s);
>      d = pci_register_device(s->pci->bus, "GT64120 PCI Bus", 
> sizeof(PCIDevice),
> -                            0, gt64120_read_config, gt64120_write_config);
> +                            0, NULL, NULL);
>  
>      /* FIXME: Malta specific hw assumptions ahead */
>  

This seems a trivially correct cleanup that can be done independently of
the rest of the series.

-- 
MST




reply via email to

[Prev in Thread] Current Thread [Next in Thread]