[PATCH] pci/msi: remove obsolete definitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch does:
- remove msi/msix_enable/disable macros since they should have been
  replaced by msi/msix_set_enable() functions
- remove unused multi_msi_enable
- remove shifts from multi_msi_capable
- msix_mask/unmask/pending macros are useless because they are not
  based on the PCI Local Bus Specification properly.  It seems that
  they were written based on the MSI-X ECN that underwent membership
  review in September 2002.  Remove them and PCI_MSIX_FLAGS_BITMASK.
  (note: PCI_MSIX_FLAGS_PENDMASK is never defined!)

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@xxxxxxxxxxxxxx>
---
 drivers/pci/msi.h        |   15 ++-------------
 include/linux/pci_regs.h |    1 -
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/drivers/pci/msi.h b/drivers/pci/msi.h
index 3898f52..6a67980 100644
--- a/drivers/pci/msi.h
+++ b/drivers/pci/msi.h
@@ -19,24 +19,13 @@
 	( (is64bit == 1) ? base+PCI_MSI_DATA_64 : base+PCI_MSI_DATA_32 )
 #define msi_mask_bits_reg(base, is64bit) \
 	( (is64bit == 1) ? base+PCI_MSI_MASK_BIT : base+PCI_MSI_MASK_BIT-4)
-#define msi_disable(control)		control &= ~PCI_MSI_FLAGS_ENABLE
-#define multi_msi_capable(control) \
-	(1 << ((control & PCI_MSI_FLAGS_QMASK) >> 1))
-#define multi_msi_enable(control, num) \
-	control |= (((num >> 1) << 4) & PCI_MSI_FLAGS_QSIZE);
+#define multi_msi_capable(control)	(control & PCI_MSI_FLAGS_QMASK)
 #define is_64bit_address(control)	(!!(control & PCI_MSI_FLAGS_64BIT))
 #define is_mask_bit_support(control)	(!!(control & PCI_MSI_FLAGS_MASKBIT))
-#define msi_enable(control, num) multi_msi_enable(control, num); \
-	control |= PCI_MSI_FLAGS_ENABLE
 
 #define msix_table_offset_reg(base)	(base + 0x04)
 #define msix_pba_offset_reg(base)	(base + 0x08)
-#define msix_enable(control)	 	control |= PCI_MSIX_FLAGS_ENABLE
-#define msix_disable(control)	 	control &= ~PCI_MSIX_FLAGS_ENABLE
 #define msix_table_size(control) 	((control & PCI_MSIX_FLAGS_QSIZE)+1)
-#define multi_msix_capable		msix_table_size
-#define msix_unmask(address)	 	(address & ~PCI_MSIX_FLAGS_BITMASK)
-#define msix_mask(address)		(address | PCI_MSIX_FLAGS_BITMASK)
-#define msix_is_pending(address) 	(address & PCI_MSIX_FLAGS_PENDMASK)
+#define multi_msix_capable(control)	msix_table_size((control))
 
 #endif /* MSI_H */
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h
index c0c1223..e74fc8a 100644
--- a/include/linux/pci_regs.h
+++ b/include/linux/pci_regs.h
@@ -302,7 +302,6 @@
 #define  PCI_MSIX_FLAGS_ENABLE	(1 << 15)
 #define  PCI_MSIX_FLAGS_MASKALL	(1 << 14)
 #define PCI_MSIX_FLAGS_BIRMASK	(7 << 0)
-#define PCI_MSIX_FLAGS_BITMASK	(1 << 0)
 
 /* CompactPCI Hotswap Register */
 
-- 
1.5.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux