hc
2024-11-01 2f529f9b558ca1c1bd74be7437a84e4711743404
kernel/include/linux/smp.h
....@@ -241,6 +241,21 @@
241241 #define get_cpu() ({ preempt_disable(); __smp_processor_id(); })
242242 #define put_cpu() preempt_enable()
243243
244
+#ifdef CONFIG_IRQ_PIPELINE
245
+#define hard_get_cpu(flags) ({ \
246
+ (flags) = hard_preempt_disable(); \
247
+ raw_smp_processor_id(); \
248
+ })
249
+#define hard_put_cpu(flags) hard_preempt_enable(flags)
250
+#else
251
+#define hard_get_cpu(flags) ({ (void)(flags); get_cpu(); })
252
+#define hard_put_cpu(flags) \
253
+ do { \
254
+ (void)(flags); \
255
+ put_cpu(); \
256
+ } while (0)
257
+#endif
258
+
244259 /*
245260 * Callback to arch code if there's nosmp or maxcpus=0 on the
246261 * boot command line: