summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux/linux-toradex-rt-4.9-2.3.x/002k.patch
blob: 09c65274aabc8648dd968a612d0534cb0cc2f956 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- b/kernel/cpu.c
+++ a/kernel/cpu.c
@@ -955,19 +955,20 @@
 	return ret;
 }
 
-static int cpu_down_maps_locked(unsigned int cpu, enum cpuhp_state target)
-{
-	if (cpu_hotplug_disabled)
-		return -EBUSY;
-	return _cpu_down(cpu, 0, target);
-}
-
 static int do_cpu_down(unsigned int cpu, enum cpuhp_state target)
 {
 	int err;
 
 	cpu_maps_update_begin();
+
+	if (cpu_hotplug_disabled) {
+		err = -EBUSY;
+		goto out;
+	}
+
+	err = _cpu_down(cpu, 0, target);
+
+out:
-	err = cpu_down_maps_locked(cpu, target);
 	cpu_maps_update_done();
 	return err;
 }