Commit 2f221349 authored by Bjorn Helgaas's avatar Bjorn Helgaas

PCI: Drop msi_data_reg() macro

msi_data_reg() doesn't provide any useful abstraction, so drop it.
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 9925ad0c
...@@ -249,10 +249,10 @@ void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg) ...@@ -249,10 +249,10 @@ void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
if (entry->msi_attrib.is_64) { if (entry->msi_attrib.is_64) {
pci_read_config_dword(dev, pos + PCI_MSI_ADDRESS_HI, pci_read_config_dword(dev, pos + PCI_MSI_ADDRESS_HI,
&msg->address_hi); &msg->address_hi);
pci_read_config_word(dev, msi_data_reg(pos, 1), &data); pci_read_config_word(dev, pos + PCI_MSI_DATA_64, &data);
} else { } else {
msg->address_hi = 0; msg->address_hi = 0;
pci_read_config_word(dev, msi_data_reg(pos, 0), &data); pci_read_config_word(dev, pos + PCI_MSI_DATA_32, &data);
} }
msg->data = data; msg->data = data;
} }
...@@ -309,10 +309,10 @@ void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg) ...@@ -309,10 +309,10 @@ void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
if (entry->msi_attrib.is_64) { if (entry->msi_attrib.is_64) {
pci_write_config_dword(dev, pos + PCI_MSI_ADDRESS_HI, pci_write_config_dword(dev, pos + PCI_MSI_ADDRESS_HI,
msg->address_hi); msg->address_hi);
pci_write_config_word(dev, msi_data_reg(pos, 1), pci_write_config_word(dev, pos + PCI_MSI_DATA_64,
msg->data); msg->data);
} else { } else {
pci_write_config_word(dev, msi_data_reg(pos, 0), pci_write_config_word(dev, pos + PCI_MSI_DATA_32,
msg->data); msg->data);
} }
} }
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
#ifndef MSI_H #ifndef MSI_H
#define MSI_H #define MSI_H
#define msi_data_reg(base, is64bit) \
(base + ((is64bit == 1) ? PCI_MSI_DATA_64 : PCI_MSI_DATA_32))
#define msi_mask_reg(base, is64bit) \ #define msi_mask_reg(base, is64bit) \
(base + ((is64bit == 1) ? PCI_MSI_MASK_64 : PCI_MSI_MASK_32)) (base + ((is64bit == 1) ? PCI_MSI_MASK_64 : PCI_MSI_MASK_32))
#define is_64bit_address(control) (!!(control & PCI_MSI_FLAGS_64BIT)) #define is_64bit_address(control) (!!(control & PCI_MSI_FLAGS_64BIT))
......
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