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 <on-cpus.h> 10 #include <asm/barrier.h> 11 #include <asm/thread_info.h> 12 13 #define smp_processor_id() (current_thread_info()->cpu) 14 15 typedef void (*secondary_entry_fn)(void); 16 17 struct secondary_data { 18 void *stack; /* must be first member of struct */ 19 secondary_entry_fn entry; 20 }; 21 extern struct secondary_data secondary_data; 22 23 #define smp_wait_for_event() wfe() 24 #define smp_send_event() sev() 25 26 extern void halt(void); 27 28 extern void smp_boot_secondary(int cpu, secondary_entry_fn entry); 29 extern void smp_boot_secondary_nofail(int cpu, secondary_entry_fn entry); 30 31 #endif /* _ASMARM_SMP_H_ */ 32