From a1af787189c7f2379f8fd0ddf0039a5d96f0d47c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 1 May 2020 16:37:30 +0200 Subject: [PATCH] ANDROID: GKI: pci: add Android ABI padding to some structures Try to mitigate potential future driver core api changes by adding a padding to struct pci_sriov, struct pci_dev, struct pci_bus, and struct pci_driver. Based on a change made to the RHEL/CENTOS 8 kernel. Bug: 151154716 Signed-off-by: Greg Kroah-Hartman Change-Id: I236df60165b25a33b06fc81f76014162401ba742 --- drivers/pci/pci.h | 7 +++++++ include/linux/pci.h | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index e9ede82ee2c2..6109afcdc549 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -2,6 +2,8 @@ #ifndef DRIVERS_PCI_H #define DRIVERS_PCI_H +#include + #define PCI_FIND_CAP_TTL 48 #define PCI_VSEC_ID_INTEL_TBT 0x1234 /* Thunderbolt */ @@ -293,6 +295,11 @@ struct pci_sriov { u16 subsystem_device; /* VF subsystem device */ resource_size_t barsz[PCI_SRIOV_NUM_BARS]; /* VF BAR size */ bool drivers_autoprobe; /* Auto probing of VFs by driver */ + + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); + ANDROID_KABI_RESERVE(3); + ANDROID_KABI_RESERVE(4); }; /* pci_dev priv_flags */ diff --git a/include/linux/pci.h b/include/linux/pci.h index f00ce74f3d54..01dff69a3a21 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -35,6 +35,7 @@ #include #include +#include /* * The PCI interface treats multi-function devices as independent @@ -447,6 +448,11 @@ struct pci_dev { char *driver_override; /* Driver name to force a match */ unsigned long priv_flags; /* Private flags for the PCI driver */ + + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); + ANDROID_KABI_RESERVE(3); + ANDROID_KABI_RESERVE(4); }; static inline struct pci_dev *pci_physfn(struct pci_dev *dev) @@ -577,6 +583,11 @@ struct pci_bus { struct bin_attribute *legacy_io; /* Legacy I/O for this bus */ struct bin_attribute *legacy_mem; /* Legacy mem */ unsigned int is_added:1; + + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); + ANDROID_KABI_RESERVE(3); + ANDROID_KABI_RESERVE(4); }; #define to_pci_bus(n) container_of(n, struct pci_bus, dev) @@ -768,6 +779,11 @@ struct pci_driver { const struct attribute_group **groups; struct device_driver driver; struct pci_dynids dynids; + + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); + ANDROID_KABI_RESERVE(3); + ANDROID_KABI_RESERVE(4); }; #define to_pci_driver(drv) container_of(drv, struct pci_driver, driver)