Commit 2c21fd4b authored by Hidetoshi Seto's avatar Hidetoshi Seto Committed by Jesse Barnes

PCI MSI: shorten PCI_MSIX_ENTRY_* symbol names

These names are too long!  Drop _OFFSET to save some bytes/lines.
Reviewed-by: default avatarMatthew Wilcox <willy@linux.intel.com>
Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 2fc90f61
...@@ -151,7 +151,7 @@ static void msix_mask_irq(struct msi_desc *desc, u32 flag) ...@@ -151,7 +151,7 @@ static void msix_mask_irq(struct msi_desc *desc, u32 flag)
{ {
u32 mask_bits = desc->masked; u32 mask_bits = desc->masked;
unsigned offset = desc->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE + unsigned offset = desc->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE +
PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET; PCI_MSIX_ENTRY_VECTOR_CTRL;
mask_bits &= ~1; mask_bits &= ~1;
mask_bits |= flag; mask_bits |= flag;
writel(mask_bits, desc->mask_base + offset); writel(mask_bits, desc->mask_base + offset);
...@@ -188,9 +188,9 @@ void read_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg) ...@@ -188,9 +188,9 @@ void read_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg)
void __iomem *base = entry->mask_base + void __iomem *base = entry->mask_base +
entry->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE; entry->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE;
msg->address_lo = readl(base + PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET); msg->address_lo = readl(base + PCI_MSIX_ENTRY_LOWER_ADDR);
msg->address_hi = readl(base + PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET); msg->address_hi = readl(base + PCI_MSIX_ENTRY_UPPER_ADDR);
msg->data = readl(base + PCI_MSIX_ENTRY_DATA_OFFSET); msg->data = readl(base + PCI_MSIX_ENTRY_DATA);
} else { } else {
struct pci_dev *dev = entry->dev; struct pci_dev *dev = entry->dev;
int pos = entry->msi_attrib.pos; int pos = entry->msi_attrib.pos;
...@@ -225,11 +225,9 @@ void write_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg) ...@@ -225,11 +225,9 @@ void write_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg)
base = entry->mask_base + base = entry->mask_base +
entry->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE; entry->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE;
writel(msg->address_lo, writel(msg->address_lo, base + PCI_MSIX_ENTRY_LOWER_ADDR);
base + PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET); writel(msg->address_hi, base + PCI_MSIX_ENTRY_UPPER_ADDR);
writel(msg->address_hi, writel(msg->data, base + PCI_MSIX_ENTRY_DATA);
base + PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET);
writel(msg->data, base + PCI_MSIX_ENTRY_DATA_OFFSET);
} else { } else {
struct pci_dev *dev = entry->dev; struct pci_dev *dev = entry->dev;
int pos = entry->msi_attrib.pos; int pos = entry->msi_attrib.pos;
...@@ -493,7 +491,7 @@ static int msix_capability_init(struct pci_dev *dev, ...@@ -493,7 +491,7 @@ static int msix_capability_init(struct pci_dev *dev,
set_irq_msi(entry->irq, entry); set_irq_msi(entry->irq, entry);
j = entries[i].entry; j = entries[i].entry;
entry->masked = readl(base + j * PCI_MSIX_ENTRY_SIZE + entry->masked = readl(base + j * PCI_MSIX_ENTRY_SIZE +
PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET); PCI_MSIX_ENTRY_VECTOR_CTRL);
msix_mask_irq(entry, 1); msix_mask_irq(entry, 1);
i++; i++;
} }
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
#define MSI_H #define MSI_H
#define PCI_MSIX_ENTRY_SIZE 16 #define PCI_MSIX_ENTRY_SIZE 16
#define PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET 0 #define PCI_MSIX_ENTRY_LOWER_ADDR 0
#define PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET 4 #define PCI_MSIX_ENTRY_UPPER_ADDR 4
#define PCI_MSIX_ENTRY_DATA_OFFSET 8 #define PCI_MSIX_ENTRY_DATA 8
#define PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET 12 #define PCI_MSIX_ENTRY_VECTOR_CTRL 12
#define msi_control_reg(base) (base + PCI_MSI_FLAGS) #define msi_control_reg(base) (base + PCI_MSI_FLAGS)
#define msi_lower_address_reg(base) (base + PCI_MSI_ADDRESS_LO) #define msi_lower_address_reg(base) (base + PCI_MSI_ADDRESS_LO)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment