|
@@ -14,13 +14,9 @@
|
|
#ifndef _ASM_RISCV_SMP_H
|
|
#ifndef _ASM_RISCV_SMP_H
|
|
#define _ASM_RISCV_SMP_H
|
|
#define _ASM_RISCV_SMP_H
|
|
|
|
|
|
-/* This both needs asm-offsets.h and is used when generating it. */
|
|
|
|
-#ifndef GENERATING_ASM_OFFSETS
|
|
|
|
-#include <asm/asm-offsets.h>
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
#include <linux/cpumask.h>
|
|
#include <linux/cpumask.h>
|
|
#include <linux/irqreturn.h>
|
|
#include <linux/irqreturn.h>
|
|
|
|
+#include <linux/thread_info.h>
|
|
|
|
|
|
#ifdef CONFIG_SMP
|
|
#ifdef CONFIG_SMP
|
|
|
|
|
|
@@ -34,12 +30,10 @@ void arch_send_call_function_ipi_mask(struct cpumask *mask);
|
|
void arch_send_call_function_single_ipi(int cpu);
|
|
void arch_send_call_function_single_ipi(int cpu);
|
|
|
|
|
|
/*
|
|
/*
|
|
- * This is particularly ugly: it appears we can't actually get the definition
|
|
|
|
- * of task_struct here, but we need access to the CPU this task is running on.
|
|
|
|
- * Instead of using C we're using asm-offsets.h to get the current processor
|
|
|
|
- * ID.
|
|
|
|
|
|
+ * Obtains the hart ID of the currently executing task. This relies on
|
|
|
|
+ * THREAD_INFO_IN_TASK, but we define that unconditionally.
|
|
*/
|
|
*/
|
|
-#define raw_smp_processor_id() (*((int*)((char*)get_current() + TASK_TI_CPU)))
|
|
|
|
|
|
+#define raw_smp_processor_id() (current_thread_info()->cpu)
|
|
|
|
|
|
#endif /* CONFIG_SMP */
|
|
#endif /* CONFIG_SMP */
|
|
|
|
|