1 /* 2 * Copyright (C) 2012 ARM Ltd. 3 * 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. 7 * 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. 12 * 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/>. 15 */ 16 #ifndef __ASM_SMP_H 17 #define __ASM_SMP_H 18 19 #include <linux/threads.h> 20 #include <linux/cpumask.h> 21 #include <linux/thread_info.h> 22 23 #define raw_smp_processor_id() (current_thread_info()->cpu) 24 25 struct seq_file; 26 27 /* 28 * generate IPI list text 29 */ 30 extern void show_ipi_list(struct seq_file *p, int prec); 31 32 /* 33 * Called from C code, this handles an IPI. 34 */ 35 extern void handle_IPI(int ipinr, struct pt_regs *regs); 36 37 /* 38 * Setup the set of possible CPUs (via set_cpu_possible) 39 */ 40 extern void smp_init_cpus(void); 41 42 /* 43 * Provide a function to raise an IPI cross call on CPUs in callmap. 44 */ 45 extern void set_smp_cross_call(void (*)(const struct cpumask *, unsigned int)); 46 47 extern void (*__smp_cross_call)(const struct cpumask *, unsigned int); 48 49 /* 50 * Called from the secondary holding pen, this is the secondary CPU entry point. 51 */ 52 asmlinkage void secondary_start_kernel(void); 53 54 /* 55 * Initial data for bringing up a secondary CPU. 56 */ 57 struct secondary_data { 58 void *stack; 59 }; 60 extern struct secondary_data secondary_data; 61 extern void secondary_entry(void); 62 63 extern void arch_send_call_function_single_ipi(int cpu); 64 extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); 65 66 extern int __cpu_disable(void); 67 68 extern void __cpu_die(unsigned int cpu); 69 extern void cpu_die(void); 70 71 #endif /* ifndef __ASM_SMP_H */ 72