qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] [STABLE] Clean some PCI defines


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] [STABLE] Clean some PCI defines
Date: Sun, 22 Mar 2009 16:30:28 +0100
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)

Andreas Färber schrieb:
>
> Am 22.03.2009 um 15:20 schrieb Stefan Weil:
>
>> Andreas Färber schrieb:
>>> Am 22.03.2009 um 12:46 schrieb Stefan Weil:
>>>
>>>> Some defines from linux/pci_regs.h had similar, but not
>>>> the same defines in hw/pci.h (PCI_REVISION_ID / PCI_REVISION,
>>>> PCI_SUBSYSTEM_VENDOR_ID / PCI_SUBVENDOR_ID,
>>>> PCI_SUBSYSTEM_ID / PCI_SUBDEVICE_ID).
>>>>
>>>> I suggest to use the "standard" from linux/pci_regs.h and
>>>> replace the "old" Qemu ones. [...]
>>>> After a migration to the "standard" defines,
>>>> pci.h could use linux/pci_regs.h which is far more complete.
>>>
>>> Please keep in mind that linux/pci_regs.h is most likely not suitable
>>> for cross-platform use.
>>>
>>> You could of course do
>>>
>>> #ifdef __linux__
>>> #include <linux/pci_regs.h>
>>> #else
>>> #define PCI_... 0x1234
>>> ...
>>> #endif
>>>
>>> but then you would still need to sync the two sections.
>>
>> There is nothing platform-specific in linux/pci_regs.h, only
>> general PCI stuff. No need for conditional compilation.
>
> The *linux*/pci_regs.h file doesn't seem present on Mac OS X, Solaris,
> Haiku, not to mention Windows. So either you need to #include it
> conditionally where available, as outlined above, or ship a copy from
> Linux/NetBSD with QEMU, as suggested by Warner, and #include that
> local file only.
>
> Andreas
>

Oh, sorry, this was a misunderstanding.

Of course I meant to include a copy (linux/pci_regs.h -> hw/pci_regs.h),
in Qemu, like it was done with linux/pci_ids.h.

Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]