ARM: 7060/1: smp: populate logical CPU mapping during boot
[linux-block.git] / arch / arm / include / asm / smp.h
CommitLineData
1da177e4 1/*
4baa9922 2 * arch/arm/include/asm/smp.h
1da177e4
LT
3 *
4 * Copyright (C) 2004-2005 ARM Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_ARM_SMP_H
11#define __ASM_ARM_SMP_H
12
1da177e4
LT
13#include <linux/threads.h>
14#include <linux/cpumask.h>
15#include <linux/thread_info.h>
16
1da177e4 17#ifndef CONFIG_SMP
4baa9922 18# error "<asm/smp.h> included in non-SMP build"
1da177e4
LT
19#endif
20
39c715b7 21#define raw_smp_processor_id() (current_thread_info()->cpu)
1da177e4 22
1da177e4
LT
23struct seq_file;
24
25/*
26 * generate IPI list text
27 */
f13cd417 28extern void show_ipi_list(struct seq_file *, int);
1da177e4 29
3b6353fa
RK
30/*
31 * Called from assembly code, this handles an IPI.
32 */
ad3b6993 33asmlinkage void do_IPI(int ipinr, struct pt_regs *regs);
3b6353fa 34
7bbb7940 35/*
e03cdade 36 * Setup the set of possible CPUs (via set_cpu_possible)
7bbb7940
RK
37 */
38extern void smp_init_cpus(void);
39
1da177e4
LT
40
41/*
0f7b332f 42 * Provide a function to raise an IPI cross call on CPUs in callmap.
1da177e4 43 */
0f7b332f 44extern void set_smp_cross_call(void (*)(const struct cpumask *, unsigned int));
dbebb4cb 45
1da177e4
LT
46/*
47 * Boot a secondary CPU, and assign it the specified idle task.
48 * This also gives us the initial stack to use for this CPU.
49 */
50extern int boot_secondary(unsigned int cpu, struct task_struct *);
51
3b6353fa
RK
52/*
53 * Called from platform specific assembly code, this is the
54 * secondary CPU entry point.
55 */
56asmlinkage void secondary_start_kernel(void);
57
e65f38ed
RK
58/*
59 * Perform platform specific initialisation of the specified CPU.
60 */
61extern void platform_secondary_init(unsigned int cpu);
62
05c74a6c
RK
63/*
64 * Initialize cpu_possible map, and enable coherency
65 */
66extern void platform_smp_prepare_cpus(unsigned int);
67
d6257288
WD
68/*
69 * Logical CPU mapping.
70 */
71extern int __cpu_logical_map[NR_CPUS];
72#define cpu_logical_map(cpu) __cpu_logical_map[cpu]
73
e65f38ed
RK
74/*
75 * Initial data for bringing up a secondary CPU.
76 */
77struct secondary_data {
78 unsigned long pgdir;
d427958a 79 unsigned long swapper_pg_dir;
e65f38ed
RK
80 void *stack;
81};
82extern struct secondary_data secondary_data;
83
a054a811 84extern int __cpu_disable(void);
8e2a43f5 85extern int platform_cpu_disable(unsigned int cpu);
a054a811
RK
86
87extern void __cpu_die(unsigned int cpu);
88extern void cpu_die(void);
89
90extern void platform_cpu_die(unsigned int cpu);
91extern int platform_cpu_kill(unsigned int cpu);
92extern void platform_cpu_enable(unsigned int cpu);
93
f6dd9fa5 94extern void arch_send_call_function_single_ipi(int cpu);
82668104 95extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
f6dd9fa5 96
37ee16ae
RK
97/*
98 * show local interrupt info
99 */
f13cd417 100extern void show_local_irqs(struct seq_file *, int);
37ee16ae 101
1da177e4 102#endif /* ifndef __ASM_ARM_SMP_H */