On Tue, Nov 03, 2009 at 03:35:12PM +0200, Michael S. Tsirkin wrote: > On Tue, Nov 03, 2009 at 03:31:51PM +0200, Michael S. Tsirkin wrote: > > On Fri, Oct 30, 2009 at 09:21:06PM +0900, Isaku Yamahata wrote: > > > split static functions in pci_host.h into pci_host.c and > > > pci_host_template.h. > > > Later a structures declared in pci_host.h, PCIHostState, will be used. > > > However pci_host.h doesn't allow to include itself easily. This patches > > > addresses it. > > > > > > pci_host.h includes functions which are instantiated in .c by including > > > pci_host.h with typedefing pci_addr_t. > > > pci_addr_t is per pci host bridge and is typedef'ed to uint32_t for ioio > > > or target_phys_addr_t for mmio in .c file. > > > That prevents from including pci_host.h to use PCIHostState because of > > > requiring type, pci_addr_t. > > > > > > Its purpose to include is to instantiate io function for mmio or ioio > > > depending on which pci host bridge requires ioio or mmio. > > > To avoid including code, we always instantiate both version. > > > > > > Signed-off-by: Isaku Yamahata <yamah...@valinux.co.jp> > > > > I think this is good cleanup. Maybe names can be shorter: > > pci_host_data_register_io_memory -> pci_host_register_io_memory > > pci_host_data_register_ioport -> pci_host_register_ioport > > > > What do you think? > > Or maybe not - we have to avoid confusing this with config...
How about the followings? pci_host_{conf, data}_register_{mmio, mmio_noswap, ioport}() -- yamahata