VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Sebastian Andrzej Siewior <bigeasy@linutronix.de> 2017-05-27 19:02:06 +0200 committer: Minda Chen <minda.chen@starfivetech.com> 2023-11-06 19:24:45 +0800 commit: 6d328be681d9c9413fe99b5e78b9b8939ee506f7 parent: bbaf2446f8e02f16a23049f1f60ce0f272e72816
Commit Summary:
kernel/sched: add {put|get}_cpu_light()
Diffstat:
1 file changed, 3 insertions, 0 deletions
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 510519e8a1eb..7ac9fdb5ad09 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -268,6 +268,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: