]> git.openfabrics.org - compat-rdma/compat.git/commitdiff
Add PCI atomic operations registers
authorRam Amrani <Ram.Amrani@qlogic.com>
Sun, 30 Apr 2017 13:00:00 +0000 (16:00 +0300)
committerVladimir Sokolovsky <vlad@mellanox.com>
Fri, 4 Aug 2017 20:47:46 +0000 (23:47 +0300)
Add PCI atomic operations registers:
 - PCI_EXP_DEVCAP2_ATOMIC_COMP64
 - PCI_EXP_DEVCAP2_ATOMIC_ROUTE
 - PCI_EXP_DEVCTL2_ATOMIC_REQ

include/linux/compat-2.6.h
include/linux/compat-4.9.h [new file with mode: 0644]

index 4c9714a20aac00edb439f5d592b35edb7ecec7f9..29527f0165373c951a6bcbe265de05a11794e0a2 100644 (file)
@@ -78,5 +78,6 @@ void backport_dependency_symbol(void);
 #include <linux/compat-4.0.h>
 #include <linux/compat-4.1.h>
 #include <linux/compat-4.5.h>
+#include <linux/compat-4.9.h>
 
 #endif /* LINUX_26_COMPAT_H */
diff --git a/include/linux/compat-4.9.h b/include/linux/compat-4.9.h
new file mode 100644 (file)
index 0000000..53f5653
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef LINUX_4_9_COMPAT_H
+#define LINUX_4_9_COMPAT_H
+
+#include <linux/version.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,9,0))
+
+#include <linux/pci_regs.h>
+
+#ifndef PCI_EXP_DEVCAP2_ATOMIC_COMP64
+#define PCI_EXP_DEVCAP2_ATOMIC_COMP64          (1 << 8)
+#endif
+
+#ifndef PCI_EXP_DEVCAP2_ATOMIC_ROUTE
+#define PCI_EXP_DEVCAP2_ATOMIC_ROUTE           (1 << 6)
+#endif
+
+#ifndef PCI_EXP_DEVCTL2_ATOMIC_REQ
+#define PCI_EXP_DEVCTL2_ATOMIC_REQ             (1 << 6)
+#endif
+
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(4,9,0)) */
+
+#endif /* LINUX_4_9_COMPAT_H */