History

PCI: Clean up MSI/MSI-X capability #defines

This doesn't change any existing symbols, but it puts them in logical order and uses explicit masks instead of shifts, like the rest of the file. It also adds new symbols for PCI_MSIX_TABLE_BIR, PCI_MSIX_TABLE_OFFSET, PCI_MSIX_PBA_BIR, and PCI_MSIX_PBA_OFFSET to replace the mis-named PCI_MSIX_FLAGS_BIRMASK (the BAR index fields are part of the Table and PBA registers, not the flags register).

Bjorn Helgaas committed 13 years ago

Commit 24bc69d1 parent 520fe9d1 file · +17 −13Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/pci_regs.h+17−13
@@ -292,12 +292,12 @@ · 291 unmodified lines
292292
293293 /* Message Signalled Interrupts registers */
294294
295−#define PCI_MSI_FLAGS 2 /* Various flags */
296−#define PCI_MSI_FLAGS_64BIT 0x80 /* 64-bit addresses allowed */
297−#define PCI_MSI_FLAGS_QSIZE 0x70 /* Message queue size configured */
298−#define PCI_MSI_FLAGS_QMASK 0x0e /* Maximum queue size available */
299−#define PCI_MSI_FLAGS_ENABLE 0x01 /* MSI feature enabled */
300−#define PCI_MSI_FLAGS_MASKBIT 0x100 /* 64-bit mask bits allowed */
295+#define PCI_MSI_FLAGS 2 /* Message Control */
296+#define PCI_MSI_FLAGS_ENABLE 0x0001 /* MSI feature enabled */
297+#define PCI_MSI_FLAGS_QMASK 0x000e /* Maximum queue size available */
298+#define PCI_MSI_FLAGS_QSIZE 0x0070 /* Message queue size configured */
299+#define PCI_MSI_FLAGS_64BIT 0x0080 /* 64-bit addresses allowed */
300+#define PCI_MSI_FLAGS_MASKBIT 0x0100 /* Per-vector masking capable */
301301 #define PCI_MSI_RFU 3 /* Rest of capability flags */
302302 #define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */
303303 #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */
@@ -309,13 +309,17 @@ · 5 unmodified lines
309309 #define PCI_MSI_PENDING_64 20 /* Pending intrs for 64-bit devices */
310310
311311 /* MSI-X registers */
312−#define PCI_MSIX_FLAGS 2
313−#define PCI_MSIX_FLAGS_QSIZE 0x7FF
314−#define PCI_MSIX_FLAGS_ENABLE (1 << 15)
315−#define PCI_MSIX_FLAGS_MASKALL (1 << 14)
316−#define PCI_MSIX_TABLE 4
317−#define PCI_MSIX_PBA 8
318−#define PCI_MSIX_FLAGS_BIRMASK (7 << 0)
312+#define PCI_MSIX_FLAGS 2 /* Message Control */
313+#define PCI_MSIX_FLAGS_QSIZE 0x07FF /* Table size */
314+#define PCI_MSIX_FLAGS_MASKALL 0x4000 /* Mask all vectors for this function */
315+#define PCI_MSIX_FLAGS_ENABLE 0x8000 /* MSI-X enable */
316+#define PCI_MSIX_TABLE 4 /* Table offset */
317+#define PCI_MSIX_TABLE_BIR 0x00000007 /* BAR index */
318+#define PCI_MSIX_TABLE_OFFSET 0xfffffff8 /* Offset into specified BAR */
319+#define PCI_MSIX_PBA 8 /* Pending Bit Array offset */
320+#define PCI_MSIX_PBA_BIR 0x00000007 /* BAR index */
321+#define PCI_MSIX_PBA_OFFSET 0xfffffff8 /* Offset into specified BAR */
322+#define PCI_MSIX_FLAGS_BIRMASK (7 << 0) /* deprecated */
319323 #define PCI_CAP_MSIX_SIZEOF 12 /* size of MSIX registers */
320324
321325 /* MSI-X entry's format */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t