Linux 3.15-rc1
[linux/fpc-iii.git] / arch / arm64 / include / asm / smp.h
bloba498f2cd2c2ad606d612a2192d09c93475bb1ded
1 /*
2 * Copyright (C) 2012 ARM Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #ifndef __ASM_SMP_H
17 #define __ASM_SMP_H
19 #include <linux/threads.h>
20 #include <linux/cpumask.h>
21 #include <linux/thread_info.h>
23 #ifndef CONFIG_SMP
24 # error "<asm/smp.h> included in non-SMP build"
25 #endif
27 #define raw_smp_processor_id() (current_thread_info()->cpu)
29 struct seq_file;
32 * generate IPI list text
34 extern void show_ipi_list(struct seq_file *p, int prec);
37 * Called from C code, this handles an IPI.
39 extern void handle_IPI(int ipinr, struct pt_regs *regs);
42 * Setup the set of possible CPUs (via set_cpu_possible)
44 extern void smp_init_cpus(void);
47 * Provide a function to raise an IPI cross call on CPUs in callmap.
49 extern void set_smp_cross_call(void (*)(const struct cpumask *, unsigned int));
52 * Called from the secondary holding pen, this is the secondary CPU entry point.
54 asmlinkage void secondary_start_kernel(void);
57 * Initial data for bringing up a secondary CPU.
59 struct secondary_data {
60 void *stack;
62 extern struct secondary_data secondary_data;
63 extern void secondary_entry(void);
65 extern void arch_send_call_function_single_ipi(int cpu);
66 extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
68 extern int __cpu_disable(void);
70 extern void __cpu_die(unsigned int cpu);
71 extern void cpu_die(void);
73 #endif /* ifndef __ASM_SMP_H */