[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 6/6] pci host: make pci_data_{write, read}() get
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] Re: [PATCH 6/6] pci host: make pci_data_{write, read}() get PCIConfigAddress. |
Date: |
Tue, 12 Jan 2010 19:43:57 +0900 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Tue, Jan 12, 2010 at 12:12:36PM +0200, Michael S. Tsirkin wrote:
> On Tue, Jan 12, 2010 at 05:52:58PM +0900, Isaku Yamahata wrote:
> > diff --git a/hw/versatile_pci.c b/hw/versatile_pci.c
> > index d99b7fa..14a728a 100644
> > --- a/hw/versatile_pci.c
> > +++ b/hw/versatile_pci.c
> > @@ -23,11 +23,29 @@ static inline uint32_t
> > vpb_pci_config_addr(target_phys_addr_t addr)
> > return addr & 0xffffff;
> > }
> >
> > +static void vpb_pci_data_write(PCIHostState *s, target_phys_addr_t addr,
> > + uint32_t val, int len)
> > +{
> > + PCIConfigAddress conf_addr;
> > + pci_host_decode_config_addr_valid(s, vpb_pci_config_addr(addr),
> > + &conf_addr);
> > + pci_data_write(&conf_addr, 0, val, len);
> > +}
> > +
> > +static uint32_t vpb_pci_data_read(PCIHostState *s, target_phys_addr_t addr,
> > + int len)
> > +{
> > + PCIConfigAddress conf_addr;
> > + pci_host_decode_config_addr_valid(s, vpb_pci_config_addr(addr),
> > + &conf_addr);
> > + return pci_data_read(&conf_addr, 0, len);
> > +}
> > +
>
>
> I thought we will get rid of vpb_pci_config_addr, and fill in
> fields in PCIConfigAddress directly. If we don't, and still
> recode into PC format, this is not making code any prettier
> so I don't really see what this buys us.
I should have explain my plan.
After introducing decode callback by Alexander patch,
I'd like to remove them.
I was waiting for his respin, but he seems to be busy.
So I created this patch series to make his respin easier (hopefully).
For that sake, I kept the original structures.
I'm fine with either ways. Waiting for his patch merged or
make this patch series into shape.
--
yamahata
[Qemu-devel] [PATCH 4/6] pci_host: remove code duplication in pci_host_template.h, Isaku Yamahata, 2010/01/12
[Qemu-devel] [PATCH 2/6] sh_pci: s/sh_pci_data_write/sh_pci_mem_write/g for consistency., Isaku Yamahata, 2010/01/12
[Qemu-devel] [PATCH 1/6] sh_pci: use PCIHostState instead of PCIBus., Isaku Yamahata, 2010/01/12
[Qemu-devel] [PATCH 3/6] versatile_pci: user PCIHostState instead of PCIBus, Isaku Yamahata, 2010/01/12