Blob Blame History Raw
From cd8def94fa4deadaea7a4c5d5bc4601c5a4c42e1 Mon Sep 17 00:00:00 2001
From: Michal Suchanek <msuchanek@suse.de>
Date: Thu, 29 Mar 2018 17:49:59 +0200
Subject: [PATCH] KABI: cpu/hotplug: provide the old get|put_online_cpus()

Patch-mainline: no, kabi
References: bsc#1087405

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
 include/linux/cpu.h | 8 ++++----
 kernel/cpu.c        | 8 ++++++++
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 85f04d0fb18a..f9f91c4397d6 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -128,10 +128,10 @@ static inline void cpu_hotplug_enable(void) { }
 #endif	/* !CONFIG_HOTPLUG_CPU */
 
 /* Wrappers which go away once all code is converted */
-static inline void cpu_hotplug_begin(void) { cpus_write_lock(); }
-static inline void cpu_hotplug_done(void) { cpus_write_unlock(); }
-static inline void get_online_cpus(void) { cpus_read_lock(); }
-static inline void put_online_cpus(void) { cpus_read_unlock(); }
+#define cpu_hotplug_begin cpus_write_lock
+#define cpu_hotplug_done cpus_write_unlock
+#define get_online_cpus cpus_read_lock
+#define put_online_cpus cpus_read_unlock
 
 #ifdef CONFIG_PM_SLEEP_SMP
 extern int freeze_secondary_cpus(int primary);
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 9518e1519de2..9d54a57145dd 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1761,3 +1761,11 @@ void __init boot_cpu_state_init(void)
 {
 	per_cpu_ptr(&cpuhp_state, smp_processor_id())->state = CPUHP_ONLINE;
 }
+
+/* kabi */
+#undef get_online_cpus
+#undef put_online_cpus
+static void get_online_cpus(void) { cpus_read_lock(); }
+static void put_online_cpus(void) { cpus_read_unlock(); }
+EXPORT_SYMBOL_GPL(get_online_cpus);
+EXPORT_SYMBOL_GPL(put_online_cpus);
-- 
2.13.6