xref: /linux/arch/openrisc/include/asm/smp.h (revision 570f7e331f5febb30f1384817463c7e42b65ca7d)
1 /*
2  * Copyright (C) 2014 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
3  *
4  * This file is licensed under the terms of the GNU General Public License
5  * version 2.  This program is licensed "as is" without any warranty of any
6  * kind, whether express or implied.
7  */
8 
9 #ifndef __ASM_OPENRISC_SMP_H
10 #define __ASM_OPENRISC_SMP_H
11 
12 #include <linux/cpumask.h>
13 
14 #include <asm/spr.h>
15 #include <asm/spr_defs.h>
16 
17 #define raw_smp_processor_id()	(current_thread_info()->cpu)
18 #define hard_smp_processor_id()	mfspr(SPR_COREID)
19 
20 extern void smp_init_cpus(void);
21 
22 extern void arch_send_call_function_single_ipi(int cpu);
23 extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
24 
25 extern void set_smp_cross_call(void (*)(const struct cpumask *, unsigned int),
26 			       unsigned int irq);
27 extern void handle_IPI(unsigned int ipi_msg);
28 
29 #endif /* __ASM_OPENRISC_SMP_H */
30