[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Name the default PCI bus "pci.0" on all archite
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [PATCH] Name the default PCI bus "pci.0" on all architectures |
Date: |
Fri, 11 Jun 2010 15:28:39 +0100 |
User-agent: |
KMail/1.13.3 (Linux/2.6.33-2-amd64; KDE/4.4.4; x86_64; ; ) |
> Note that I *only* object to case 2 (derive bus name from parent
> device's ID). Case 3 (derive bus name from bus type) is fine with me.
>
> > Using a single counter for all busses is also wrong. The order of bus
> > creation is a device implementation detail, under no circumstances
> > should it be part of the user visible API. Consider a device that has
> > both a PCI and I2C bus. It makes no sense to call there pci.0 and i2c.1.
>
> Yes, that's a bit ugly.
I'd accept deriving bus name from bus type (case 3) if we remove the
numbering.
If there are multiple busses of the same type then the parent device must
provide a name. In this case I don't believe generic code has enough knowledge
to make sensible or consistent choices. A user-visible interface defined by
internal implementation details (order of creation) makes me twitchy.
Take a graphics card as an example of something with multiple I2C busses.
IMO it would make much more sense to call them things like ".ddc" and
".sensors" than ".0" and ".1".
Paul