aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2016-12-08 15:08:27 -0800
committerDmitry Shmidt <dimitrysh@google.com>2016-12-08 15:08:27 -0800
commit97b84c96505aa2b9c8772bbae68a4fa93da8c0f4 (patch)
treedcd917c2b3821b5ec0fdf537f3df9e31cdc779e8 /include
parent25cfd071169c6481405f5c2c4d91bc6dcd051800 (diff)
parente5f84c1444ae59c85bd25ba05393c6bc87067ddb (diff)
Merge tag 'v4.4.37' into android-4.4.y
This is the 4.4.37 stable release Change-Id: Ic6753a5a223abc02c4fe5205642d4f904de2e5b8
Diffstat (limited to 'include')
-rw-r--r--include/linux/compiler-gcc.h4
-rw-r--r--include/linux/pci.h14
2 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index eeae401a2412..287e698c28de 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -251,7 +251,9 @@
#endif
#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
-#if GCC_VERSION >= 50000
+#if GCC_VERSION >= 70000
+#define KASAN_ABI_VERSION 5
+#elif GCC_VERSION >= 50000
#define KASAN_ABI_VERSION 4
#elif GCC_VERSION >= 40902
#define KASAN_ABI_VERSION 3
diff --git a/include/linux/pci.h b/include/linux/pci.h
index e89c7ee7e803..5f37614f2451 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1802,6 +1802,20 @@ static inline int pci_pcie_type(const struct pci_dev *dev)
return (pcie_caps_reg(dev) & PCI_EXP_FLAGS_TYPE) >> 4;
}
+static inline struct pci_dev *pcie_find_root_port(struct pci_dev *dev)
+{
+ while (1) {
+ if (!pci_is_pcie(dev))
+ break;
+ if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT)
+ return dev;
+ if (!dev->bus->self)
+ break;
+ dev = dev->bus->self;
+ }
+ return NULL;
+}
+
void pci_request_acs(void);
bool pci_acs_enabled(struct pci_dev *pdev, u16 acs_flags);
bool pci_acs_path_enabled(struct pci_dev *start,