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(-)

--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -132,10 +132,10 @@ static inline void cpu_hotplug_enable(vo
 #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);
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -2074,3 +2074,11 @@ void __init boot_cpu_hotplug_init(void)
 	this_cpu_write(cpuhp_state.booted_once, true);
 	this_cpu_write(cpuhp_state.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);