19a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel/*
29a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel * This file is subject to the terms and conditions of the GNU General Public
39a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel * License.  See the file "COPYING" in the main directory of this archive
49a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel * for more details.
59a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel *
6f615136c06a791364f5afa8b8ba965315a6440f1Max Filippov * Copyright (C) 2001 - 2013 Tensilica Inc.
79a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel */
89a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel
99a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel#ifndef _XTENSA_SMP_H
109a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel#define _XTENSA_SMP_H
119a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel
12f615136c06a791364f5afa8b8ba965315a6440f1Max Filippov#ifdef CONFIG_SMP
139a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel
14f615136c06a791364f5afa8b8ba965315a6440f1Max Filippov#define raw_smp_processor_id()	(current_thread_info()->cpu)
15f615136c06a791364f5afa8b8ba965315a6440f1Max Filippov#define cpu_logical_map(cpu)	(cpu)
169a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel
17f615136c06a791364f5afa8b8ba965315a6440f1Max Filippovstruct start_info {
18f615136c06a791364f5afa8b8ba965315a6440f1Max Filippov	unsigned long stack;
199a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel};
20f615136c06a791364f5afa8b8ba965315a6440f1Max Filippovextern struct start_info start_info;
219a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel
22f615136c06a791364f5afa8b8ba965315a6440f1Max Filippovstruct cpumask;
23f615136c06a791364f5afa8b8ba965315a6440f1Max Filippovvoid arch_send_call_function_ipi_mask(const struct cpumask *mask);
24f615136c06a791364f5afa8b8ba965315a6440f1Max Filippovvoid arch_send_call_function_single_ipi(int cpu);
25f615136c06a791364f5afa8b8ba965315a6440f1Max Filippov
26f615136c06a791364f5afa8b8ba965315a6440f1Max Filippovvoid smp_init_cpus(void);
27f615136c06a791364f5afa8b8ba965315a6440f1Max Filippovvoid secondary_init_irq(void);
28f615136c06a791364f5afa8b8ba965315a6440f1Max Filippovvoid ipi_init(void);
29f615136c06a791364f5afa8b8ba965315a6440f1Max Filippovstruct seq_file;
30f615136c06a791364f5afa8b8ba965315a6440f1Max Filippovvoid show_ipi_list(struct seq_file *p, int prec);
31f615136c06a791364f5afa8b8ba965315a6440f1Max Filippov
3249b424fedaf88d0fa9913082b8c1ccd012a8a972Max Filippov#ifdef CONFIG_HOTPLUG_CPU
3349b424fedaf88d0fa9913082b8c1ccd012a8a972Max Filippov
3449b424fedaf88d0fa9913082b8c1ccd012a8a972Max Filippovvoid __cpu_die(unsigned int cpu);
3549b424fedaf88d0fa9913082b8c1ccd012a8a972Max Filippovint __cpu_disable(void);
3649b424fedaf88d0fa9913082b8c1ccd012a8a972Max Filippovvoid cpu_die(void);
3749b424fedaf88d0fa9913082b8c1ccd012a8a972Max Filippovvoid cpu_restart(void);
3849b424fedaf88d0fa9913082b8c1ccd012a8a972Max Filippov
3949b424fedaf88d0fa9913082b8c1ccd012a8a972Max Filippov#endif /* CONFIG_HOTPLUG_CPU */
4049b424fedaf88d0fa9913082b8c1ccd012a8a972Max Filippov
41f615136c06a791364f5afa8b8ba965315a6440f1Max Filippov#endif /* CONFIG_SMP */
429a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel
439a8fd5589902153a134111ed7a40f9cca1f83254Chris Zankel#endif	/* _XTENSA_SMP_H */
44