From: Tan Xiaojun tanxiaojun@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I90MT2
-------------------------------
Reserve space for the structure in pci subsystem.
Signed-off-by: Tan Xiaojun tanxiaojun@huawei.com Reviewed-by: Xie XiuQi xiexiuqi@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com
Conflicts: include/linux/pci.h include/linux/pci_hotplug.h
Signed-off-by: Jialin Zhang zhangjialin11@huawei.com --- drivers/pci/pci.h | 9 +++++++++ include/linux/pci.h | 34 ++++++++++++++++++++++++++++++++++ include/linux/pci_hotplug.h | 18 ++++++++++++++++++ 3 files changed, 61 insertions(+)
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 39a8932dc340..187bce35641c 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -310,6 +310,15 @@ 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 */ + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
#ifdef CONFIG_PCI_DOE diff --git a/include/linux/pci.h b/include/linux/pci.h index 131fa5ce64df..9aa545843712 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -26,6 +26,7 @@ #include <linux/args.h> #include <linux/mod_devicetable.h>
+#include <linux/kabi.h> #include <linux/types.h> #include <linux/init.h> #include <linux/ioport.h> @@ -536,6 +537,22 @@ struct pci_dev { */ unsigned long slot_being_removed_rescanned; struct pci_dev *rpdev; /* root port pci_dev */ + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) + KABI_RESERVE(9) + KABI_RESERVE(10) + KABI_RESERVE(11) + KABI_RESERVE(12) + KABI_RESERVE(13) + KABI_RESERVE(14) + KABI_RESERVE(15) };
static inline struct pci_dev *pci_physfn(struct pci_dev *dev) @@ -686,6 +703,14 @@ struct pci_bus { struct bin_attribute *legacy_mem; /* Legacy mem */ unsigned int is_added:1; unsigned int unsafe_warn:1; /* warned about RW1C config write */ + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) };
#define to_pci_bus(n) container_of(n, struct pci_bus, dev) @@ -941,6 +966,15 @@ struct pci_driver { struct device_driver driver; struct pci_dynids dynids; bool driver_managed_dma; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
static inline struct pci_driver *to_pci_driver(struct device_driver *drv) diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index 3a10d6ec3ee7..f5e5a5c05ad1 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h @@ -45,6 +45,15 @@ struct hotplug_slot_ops { int (*get_latch_status) (struct hotplug_slot *slot, u8 *value); int (*get_adapter_status) (struct hotplug_slot *slot, u8 *value); int (*reset_slot) (struct hotplug_slot *slot, bool probe); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
/** @@ -63,6 +72,15 @@ struct hotplug_slot { struct pci_slot *pci_slot; struct module *owner; const char *mod_name; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
static inline const char *hotplug_slot_name(const struct hotplug_slot *slot)