From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUOjv-0005Zo-Rf for qemu-devel@nongnu.org; Wed, 08 Jun 2011 15:48:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUOjt-0006hE-7I for qemu-devel@nongnu.org; Wed, 08 Jun 2011 15:48:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUOjs-0006h3-OR for qemu-devel@nongnu.org; Wed, 08 Jun 2011 15:48:29 -0400 Date: Wed, 8 Jun 2011 22:48:45 +0300 From: "Michael S. Tsirkin" Message-ID: <20110608194845.GC30805@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v2 9/9] msi: Move PCI_MSI_PENDING_32/64 into pci_regs.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel On Wed, Jun 08, 2011 at 06:21:52PM +0200, Jan Kiszka wrote: > Signed-off-by: Jan Kiszka pci_regs.h from linux does not have these this is why we keep them in msi.c [mst@tuck linux-2.6]$ grep PCI_MSI_ include/linux/pci_regs.h #define PCI_MSI_FLAGS 2 /* Various flags */ #define PCI_MSI_FLAGS_64BIT 0x80 /* 64-bit addresses allowed */ #define PCI_MSI_FLAGS_QSIZE 0x70 /* Message queue size configured */ #define PCI_MSI_FLAGS_QMASK 0x0e /* Maximum queue size available */ #define PCI_MSI_FLAGS_ENABLE 0x01 /* MSI feature enabled */ #define PCI_MSI_FLAGS_MASKBIT 0x100 /* 64-bit mask bits allowed */ #define PCI_MSI_RFU 3 /* Rest of capability flags */ #define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ #define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ #define PCI_MSI_MASK_32 12 /* Mask bits register for 32-bit devices */ #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ #define PCI_MSI_MASK_64 16 /* Mask bits register for 64-bit devices */ If you want to move them, please send them upstream we'll merge when they are there. > --- > hw/msi.c | 4 ---- > hw/pci_regs.h | 2 ++ > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/hw/msi.c b/hw/msi.c > index e23f5df..d548939 100644 > --- a/hw/msi.c > +++ b/hw/msi.c > @@ -21,10 +21,6 @@ > #include "msi.h" > #include "range.h" > > -/* Eventually those constants should go to Linux pci_regs.h */ > -#define PCI_MSI_PENDING_32 0x10 > -#define PCI_MSI_PENDING_64 0x14 > - > /* PCI_MSI_ADDRESS_LO */ > #define PCI_MSI_ADDRESS_LO_MASK (~0x3) > > diff --git a/hw/pci_regs.h b/hw/pci_regs.h > index c17c22f..002ed2e 100644 > --- a/hw/pci_regs.h > +++ b/hw/pci_regs.h > @@ -297,8 +297,10 @@ > #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ > #define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ > #define PCI_MSI_MASK_32 12 /* Mask bits register for 32-bit devices */ > +#define PCI_MSI_PENDING_32 16 /* Pending bits register for 32-bit devices */ > #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ > #define PCI_MSI_MASK_64 16 /* Mask bits register for 64-bit devices */ > +#define PCI_MSI_PENDING_64 20 /* Pending bits register for 64-bit devices */ > > /* MSI-X registers */ > #define PCI_MSIX_CTRL 2 /* Message control */ > -- > 1.7.1