From 2f529f9b558ca1c1bd74be7437a84e4711743404 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Fri, 01 Nov 2024 02:11:33 +0000 Subject: [PATCH] add xenomai --- kernel/include/linux/smp.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/kernel/include/linux/smp.h b/kernel/include/linux/smp.h index 7ce15c3..44888c0 100644 --- a/kernel/include/linux/smp.h +++ b/kernel/include/linux/smp.h @@ -241,6 +241,21 @@ #define get_cpu() ({ preempt_disable(); __smp_processor_id(); }) #define put_cpu() preempt_enable() +#ifdef CONFIG_IRQ_PIPELINE +#define hard_get_cpu(flags) ({ \ + (flags) = hard_preempt_disable(); \ + raw_smp_processor_id(); \ + }) +#define hard_put_cpu(flags) hard_preempt_enable(flags) +#else +#define hard_get_cpu(flags) ({ (void)(flags); get_cpu(); }) +#define hard_put_cpu(flags) \ + do { \ + (void)(flags); \ + put_cpu(); \ + } while (0) +#endif + /* * Callback to arch code if there's nosmp or maxcpus=0 on the * boot command line: -- Gitblit v1.6.2