[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/6] PCI config space access overhaul
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH 1/6] PCI config space access overhaul |
Date: |
Tue, 5 Jan 2010 15:11:24 +0200 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Tue, Jan 05, 2010 at 09:46:38PM +0900, Isaku Yamahata wrote:
> > diff --git a/hw/pci_host_template_all.h b/hw/pci_host_template_all.h
> > new file mode 100644
> > index 0000000..74b3e84
> > --- /dev/null
> > +++ b/hw/pci_host_template_all.h
> > @@ -0,0 +1,23 @@
> > +#define PCI_HOST_BWL b
> > +#define PCI_HOST_BITS 8
> > +
> > +#include "pci_host_template.h"
> > +
> > +#undef PCI_HOST_BWL
> > +#undef PCI_HOST_BITS
> > +
> > +#define PCI_HOST_BWL w
> > +#define PCI_HOST_BITS 16
> > +
> > +#include "pci_host_template.h"
> > +
> > +#undef PCI_HOST_BWL
> > +#undef PCI_HOST_BITS
> > +
> > +#define PCI_HOST_BWL l
> > +#define PCI_HOST_BITS 32
> > +
> > +#include "pci_host_template.h"
> > +
> > +#undef PCI_HOST_BWL
> > +#undef PCI_HOST_BITS
>
> Oh, another new cpp tricks.
> I'm ok with this trick. However Michael may have his own idea.
I'm ok, yes. Though long term, we should think about switching to an
API that does not result in all this horrible boilerplate code that we
are then forced to work around with macros. And it need not be hard: we
just want
1. bswap(addr, len)
2. wrapper around cpu_register_io_memory that gets
length and passes it on.
> This trick would be split out into independent patch.
Yes.
- [Qemu-devel] [PATCH 0/6] PPC NewWorld fixery v2, Alexander Graf, 2010/01/04
- [Qemu-devel] [PATCH 4/6] Include dump of lspci -nn on real G5, Alexander Graf, 2010/01/04
- [Qemu-devel] [PATCH 6/6] Enable secondary cmd64x, Alexander Graf, 2010/01/04
- [Qemu-devel] [PATCH 3/6] Use Mac99_U3 type on ppc64, Alexander Graf, 2010/01/04
- [Qemu-devel] [PATCH 2/6] Add config space conversion function for uni_north, Alexander Graf, 2010/01/04
- [Qemu-devel] [PATCH 5/6] Make interrupts work, Alexander Graf, 2010/01/04
- [Qemu-devel] [PATCH 1/6] PCI config space access overhaul, Alexander Graf, 2010/01/04
- [Qemu-devel] Re: [PATCH 1/6] PCI config space access overhaul, Michael S. Tsirkin, 2010/01/05