[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH 07/26] pci/p2pbr: generic pci p2p bridge
From: |
Isaku Yamahata |
Subject: |
Re: [Qemu-devel] Re: [PATCH 07/26] pci/p2pbr: generic pci p2p bridge |
Date: |
Thu, 17 Mar 2011 11:08:51 +0900 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Wed, Mar 16, 2011 at 11:34:42PM +0200, Michael S. Tsirkin wrote:
> On Wed, Mar 16, 2011 at 06:29:18PM +0900, Isaku Yamahata wrote:
> > Create generic pci p2p bridge device which can be customized
> > via properties like vendor id/device id and so on.
> > With this, we can avoid to create many pci p2p bridge which only
> > differs in those ids.
> >
> > Cc: Michael S. Tsirkin <address@hidden>
> > Signed-off-by: Isaku Yamahata <address@hidden>
>
> So we added 213 lines and we saved all of 20 in other places?
> Maybe I miss the point ...
What are missing is,
- The patch eliminates logic duplication rather than simple
line insertion/deletion.
- It also simplifies q35 code which is 26/26. Its code saving isn't counted.
- The lines of newly added copyright notice are counted.
- If line saving is so important, the numbers of lines can be
reduced dramatically by accepting 14 arguments functions instead
of using struct. struct initialization bloated line insertion.
But I think it doesn't increase code complexity.
Anyway this patch isn't very critical. I think the available choice is
- this patch
- modify the patch to use 14 arguments function.
Thus we can save much more lines.
- Add one more p2p bridge code which q35 uses, accepting same code which
differs only in IDs.
- any other ideas?
Which option do you prefer?
>
>
> > ---
> > Makefile.objs | 2 +-
> > hw/pci_p2pbr.c | 151
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > hw/pci_p2pbr.h | 61 +++++++++++++++++++++++
> > 3 files changed, 213 insertions(+), 1 deletions(-)
> > create mode 100644 hw/pci_p2pbr.c
> > create mode 100644 hw/pci_p2pbr.h
>
--
yamahata
[Qemu-devel] [PATCH 19/26] pc/piix_pci: factor out smram/pam logic, Isaku Yamahata, 2011/03/16
[Qemu-devel] [PATCH 12/26] usb/uhci: generalize initialization, Isaku Yamahata, 2011/03/16
[Qemu-devel] [PATCH 26/26] pc q35 based chipset emulator, Isaku Yamahata, 2011/03/16
[Qemu-devel] [PATCH 05/26] piix_pci: eliminate PIIX3State::pci_irq_levels, Isaku Yamahata, 2011/03/16
[Qemu-devel] ACPI table loading [was: q35 chipset support for native pci express support], Michael Tokarev, 2011/03/16