1 #ifndef _ASMARM_SMP_H_ 2 #define _ASMARM_SMP_H_ 3 /* 4 * Copyright (C) 2015, Red Hat Inc, Andrew Jones <drjones@redhat.com> 5 * 6 * This work is licensed under the terms of the GNU LGPL, version 2. 7 */ 8 #include <cpumask.h> 9 #include <asm/thread_info.h> 10 11 #define smp_processor_id() (current_thread_info()->cpu) 12 13 typedef void (*secondary_entry_fn)(void); 14 15 struct secondary_data { 16 void *stack; /* must be first member of struct */ 17 secondary_entry_fn entry; 18 }; 19 extern struct secondary_data secondary_data; 20 21 extern bool cpu0_calls_idle; 22 23 extern void halt(void); 24 extern void do_idle(void); 25 26 extern void smp_boot_secondary(int cpu, secondary_entry_fn entry); 27 extern void on_cpu_async(int cpu, void (*func)(void *data), void *data); 28 extern void on_cpu(int cpu, void (*func)(void *data), void *data); 29 extern void on_cpus(void (*func)(void *data), void *data); 30 31 #endif /* _ASMARM_SMP_H_ */ 32