提交 14f70b7a 编写于 作者: Z Zheng Zengkai

KABI: add KABI padding to cpuidle structures

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4JBL0
CVE: NA

------------------------------

Add KABI padding to the following cpuidle structures:
struct cpuidle_state_usage
struct cpuidle_state
struct cpuidle_device
struct cpuidle_driver

Changes in these structures will influence KABI compatibility
of following interfaces:
sched_setscheduler
set_cpus_allowed_ptr
set_user_nice
wake_up_process
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: NCheng Jian <cj.chengjian@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 fe427a87
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/percpu.h> #include <linux/percpu.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/hrtimer.h> #include <linux/hrtimer.h>
#include <linux/kabi.h>
#define CPUIDLE_STATE_MAX 10 #define CPUIDLE_STATE_MAX 10
#define CPUIDLE_NAME_LEN 16 #define CPUIDLE_NAME_LEN 16
...@@ -43,6 +44,10 @@ struct cpuidle_state_usage { ...@@ -43,6 +44,10 @@ struct cpuidle_state_usage {
unsigned long long s2idle_usage; unsigned long long s2idle_usage;
unsigned long long s2idle_time; /* in US */ unsigned long long s2idle_time; /* in US */
#endif #endif
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
}; };
struct cpuidle_state { struct cpuidle_state {
...@@ -73,6 +78,10 @@ struct cpuidle_state { ...@@ -73,6 +78,10 @@ struct cpuidle_state {
int (*enter_s2idle)(struct cpuidle_device *dev, int (*enter_s2idle)(struct cpuidle_device *dev,
struct cpuidle_driver *drv, struct cpuidle_driver *drv,
int index); int index);
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
}; };
/* Idle State Flags */ /* Idle State Flags */
...@@ -110,6 +119,10 @@ struct cpuidle_device { ...@@ -110,6 +119,10 @@ struct cpuidle_device {
cpumask_t coupled_cpus; cpumask_t coupled_cpus;
struct cpuidle_coupled *coupled; struct cpuidle_coupled *coupled;
#endif #endif
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
}; };
DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices); DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices);
...@@ -135,6 +148,8 @@ struct cpuidle_driver { ...@@ -135,6 +148,8 @@ struct cpuidle_driver {
/* preferred governor to switch at register time */ /* preferred governor to switch at register time */
const char *governor; const char *governor;
KABI_RESERVE(1)
KABI_RESERVE(2)
}; };
#ifdef CONFIG_CPU_IDLE #ifdef CONFIG_CPU_IDLE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册