]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
KABI Padding to allow future extensions
authorManjunath Govindashetty <manjunath.govindashetty@oracle.com>
Sat, 14 Nov 2015 05:54:30 +0000 (21:54 -0800)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Wed, 18 Nov 2015 18:59:15 +0000 (10:59 -0800)
Padding for struct Scsi_Host , pci_dev , pci_driver for future extension while preserving ABI

Orabug: 22227652

Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
include/linux/blk_types.h
include/linux/pci.h
include/scsi/scsi_host.h

index d92357eeed07a2d54fbe5155760dd3c46deb39ee..e277382494e4114b2ea9b71711cb847394234d6f 100644 (file)
@@ -6,7 +6,6 @@
 #define __LINUX_BLK_TYPES_H
 
 #include <linux/types.h>
-#include <linux/uek_kabi.h>
 
 struct bio_set;
 struct bio;
index 353db8dc4c6e0eca74751d4aabc8b0cb28fc4c7a..90a6ffe468c8e38afea8944c205f7f5ff06e8fb8 100644 (file)
@@ -33,6 +33,7 @@
 #include <uapi/linux/pci.h>
 
 #include <linux/pci_ids.h>
+#include <linux/uek_kabi.h>
 
 /*
  * The PCI interface treats multi-function devices as independent
@@ -379,6 +380,14 @@ struct pci_dev {
        phys_addr_t rom; /* Physical address of ROM if it's not from the BAR */
        size_t romlen; /* Length of ROM if it's not from the BAR */
        char *driver_override; /* Driver name to force a match */
+/*
+ *     Oracle Specific Extension to accomodate future upstream changes to this structure
+ *     yet maintain KABI.  For Oracle internal use only!
+ */
+        UEK_KABI_EXTEND(u8   uek_reserved1) 
+        UEK_KABI_EXTEND(u16   uek_reserved2) 
+        UEK_KABI_EXTEND(unsigned int   uek_reserved3) 
+        UEK_KABI_EXTEND(u64   uek_reserved4) 
 };
 
 static inline struct pci_dev *pci_physfn(struct pci_dev *dev)
@@ -389,7 +398,6 @@ static inline struct pci_dev *pci_physfn(struct pci_dev *dev)
 #endif
        return dev;
 }
-
 struct pci_dev *pci_alloc_dev(struct pci_bus *bus);
 
 #define        to_pci_dev(n) container_of(n, struct pci_dev, dev)
@@ -656,6 +664,10 @@ struct pci_driver {
        const struct pci_error_handlers *err_handler;
        struct device_driver    driver;
        struct pci_dynids dynids;
+/* Extension to accomodate future upstream changes to this structure
+ * yet maintain KABI.  For Oracle internal use only!
+ */
+        int (*uek_reserved)(struct pci_dev *dev);
 };
 
 #define        to_pci_driver(drv) container_of(drv, struct pci_driver, driver)
index e113c757d555ef097954a4b41137f4d4b5a8f4e1..910aa0279395aa05e155174ce2f6a54675f7d7ea 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/mutex.h>
 #include <linux/seq_file.h>
 #include <linux/blk-mq.h>
+#include <linux/uek_kabi.h>
 #include <scsi/scsi.h>
 
 struct request_queue;
@@ -735,7 +736,24 @@ struct Scsi_Host {
         * Needed just in case we have virtual hosts.
         */
        struct device *dma_dev;
-
+/* FOR Oracle USE ONLY
+ *          
+ *         The following padding has been inserted before ABI freeze to
+ *         allow extending the structure while preserve ABI.
+ *         
+ */
+        UEK_KABI_RESERVED_P(1)
+        UEK_KABI_RESERVED_P(2)
+        UEK_KABI_RESERVED_P(3)
+        UEK_KABI_RESERVED_P(4)
+        UEK_KABI_RESERVED_P(5)
+        UEK_KABI_RESERVED_P(6)
+        unsigned int scsi_mq_reserved1;
+        unsigned int scsi_mq_reserved2;
+        void *scsi_mq_reserved3;
+        void *scsi_mq_reserved4;
+        atomic_t scsi_mq_reserved5;
+        atomic_t scsi_mq_reserved6;
        /*
         * We should ensure that this is aligned, both for better performance
         * and also because some compilers (m68k) don't automatically force