blob: 8eab351cbe902e44172f3a1ab4aed6884b3edecb (
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
|
From 0effec3f5dac0e6d4484e41f8f7ea4071bffa2f2 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Sat, 27 May 2017 19:02:06 +0200
Subject: [PATCH 225/323] kernel/sched: add {put|get}_cpu_light()
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.215-rt107.tar.xz
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/smp.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 04f44e0aa2e0b..cae66815f9e20 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -239,6 +239,9 @@ static inline int get_boot_cpu_id(void)
#define get_cpu() ({ preempt_disable(); __smp_processor_id(); })
#define put_cpu() preempt_enable()
+#define get_cpu_light() ({ migrate_disable(); __smp_processor_id(); })
+#define put_cpu_light() migrate_enable()
+
/*
* Callback to arch code if there's nosmp or maxcpus=0 on the
* boot command line:
--
2.44.0
|