From 54539dfef4ef5061eb5e63414877a9c9c17b092f Mon Sep 17 00:00:00 2001 From: Saravana Kannan Date: Wed, 24 Mar 2021 09:22:59 -0700 Subject: [PATCH] ANDROID: GKI: add some padding to some driver core structures These structures are fundamental to implementing fw_devlink and sync_state(). Since they are still evolving, add some padding in case we need to backport any important bug fixes. struct device_link struct class struct fwnode_handle struct fwnode_link Bug: 183615740 Signed-off-by: Saravana Kannan Change-Id: Id9daf7cf9ae5d94fb0134144f8220a241ccbaef8 --- include/linux/device.h | 2 ++ include/linux/device/class.h | 2 ++ include/linux/fwnode.h | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/include/linux/device.h b/include/linux/device.h index 7619a84f8ce4..e19600c73fca 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -582,6 +582,8 @@ struct device_link { struct rcu_head rcu_head; #endif bool supplier_preactivated; /* Owned by consumer probe. */ + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); }; static inline struct device *kobj_to_dev(struct kobject *kobj) diff --git a/include/linux/device/class.h b/include/linux/device/class.h index e8d470c457d1..04e983415c3d 100644 --- a/include/linux/device/class.h +++ b/include/linux/device/class.h @@ -18,6 +18,7 @@ #include #include #include +#include struct device; struct fwnode_handle; @@ -75,6 +76,7 @@ struct class { const struct dev_pm_ops *pm; struct subsys_private *p; + ANDROID_KABI_RESERVE(1); }; struct class_dev_iter { diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index dfefd43a737c..8392b8ce70dd 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -12,6 +12,7 @@ #include #include #include +#include struct fwnode_operations; struct device; @@ -34,6 +35,7 @@ struct fwnode_handle { struct list_head suppliers; struct list_head consumers; u8 flags; + ANDROID_KABI_RESERVE(1); }; struct fwnode_link { @@ -41,6 +43,9 @@ struct fwnode_link { struct list_head s_hook; struct fwnode_handle *consumer; struct list_head c_hook; + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); + ANDROID_KABI_RESERVE(3); }; /**