From 342a2f101ce5b685974c13d920485b2c300add33 Mon Sep 17 00:00:00 2001
From: Lin Ma <lma@suse.com>
Date: Mon, 19 Jul 2021 14:55:04 +0800
Subject: [PATCH] cpuidle: cpuidle_state kABI fix
Patch-mainline: Never, kABI workaround
References: bsc#1175543
The patch bsc1175543-cpuidle-Drop-disabled-field-from-struct-cpuidle_stat.patch
breaks kABI.
Now no drivers use the "disabled" field in struct cpuidle_state, They use the
state flag instead of the "disabled" to describe the idle states.
Signed-off-by: Lin Ma <lma@suse.com>
---
include/linux/cpuidle.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index c9410559aef5..7c1d6d110cd5 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -52,6 +52,11 @@ struct cpuidle_state {
unsigned int exit_latency; /* in US */
int power_usage; /* in mW */
unsigned int target_residency; /* in US */
+#ifdef __GENKSYMS__
+ bool disabled; /* disabled on all CPUs */
+#else
+ bool __unused_disabled; /* exists to preserve kABI */
+#endif
int (*enter) (struct cpuidle_device *dev,
struct cpuidle_driver *drv,
--
2.26.2