From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LlOXW-0002i9-Ge for qemu-devel@nongnu.org; Sun, 22 Mar 2009 10:20:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LlOXS-0002hk-Ty for qemu-devel@nongnu.org; Sun, 22 Mar 2009 10:20:38 -0400 Received: from [199.232.76.173] (port=54889 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LlOXS-0002hh-QU for qemu-devel@nongnu.org; Sun, 22 Mar 2009 10:20:34 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:63648) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LlOXS-0008DZ-7z for qemu-devel@nongnu.org; Sun, 22 Mar 2009 10:20:34 -0400 Received: from localhost ([127.0.0.1] ident=stefan) by flocke.weilnetz.de with esmtp (Exim 4.69) (envelope-from ) id 1LlOXQ-00049w-GI for qemu-devel@nongnu.org; Sun, 22 Mar 2009 15:20:32 +0100 Message-ID: <49C64930.1070509@mail.berlios.de> Date: Sun, 22 Mar 2009 15:20:32 +0100 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] [STABLE] Clean some PCI defines References: <49C62504.8070208@mail.berlios.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Andreas Färber schrieb: > Hello, > > 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 > #else > #define PCI_... 0x1234 > ... > #endif > > but then you would still need to sync the two sections. > > Andreas > > > There is nothing platform-specific in linux/pci_regs.h, only general PCI stuff. No need for conditional compilation. Stefan