Commit 14f70b7a authored by Zheng Zengkai's avatar Zheng Zengkai
Browse files

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: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: default avatarCheng Jian <cj.chengjian@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent fe427a87
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#include <linux/percpu.h>
#include <linux/list.h>
#include <linux/hrtimer.h>
#include <linux/kabi.h>

#define CPUIDLE_STATE_MAX	10
#define CPUIDLE_NAME_LEN	16
@@ -43,6 +44,10 @@ struct cpuidle_state_usage {
	unsigned long long	s2idle_usage;
	unsigned long long	s2idle_time; /* in US */
#endif
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
};

struct cpuidle_state {
@@ -73,6 +78,10 @@ struct cpuidle_state {
	int (*enter_s2idle)(struct cpuidle_device *dev,
			    struct cpuidle_driver *drv,
			    int index);
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
};

/* Idle State Flags */
@@ -110,6 +119,10 @@ struct cpuidle_device {
	cpumask_t		coupled_cpus;
	struct cpuidle_coupled	*coupled;
#endif
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
};

DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices);
@@ -135,6 +148,8 @@ struct cpuidle_driver {

	/* preferred governor to switch at register time */
	const char		*governor;
	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

#ifdef CONFIG_CPU_IDLE