Commit 4679258d52f6d4aeeafd5c77203d97ddf48e2db0
Committed by
Ralf Baechle
1 parent
9797cae3bf
Exists in
master
and in
7 other branches
[MIPS] Remove unused cpu_callout_map and num_booting_cpus()
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Showing 1 changed file with 0 additions and 7 deletions Inline Diff
include/asm-mips/smp.h
1 | /* | 1 | /* |
2 | * This file is subject to the terms and conditions of the GNU General | 2 | * This file is subject to the terms and conditions of the GNU General |
3 | * Public License. See the file "COPYING" in the main directory of this | 3 | * Public License. See the file "COPYING" in the main directory of this |
4 | * archive for more details. | 4 | * archive for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2000 - 2001 by Kanoj Sarcar (kanoj@sgi.com) | 6 | * Copyright (C) 2000 - 2001 by Kanoj Sarcar (kanoj@sgi.com) |
7 | * Copyright (C) 2000 - 2001 by Silicon Graphics, Inc. | 7 | * Copyright (C) 2000 - 2001 by Silicon Graphics, Inc. |
8 | * Copyright (C) 2000, 2001, 2002 Ralf Baechle | 8 | * Copyright (C) 2000, 2001, 2002 Ralf Baechle |
9 | * Copyright (C) 2000, 2001 Broadcom Corporation | 9 | * Copyright (C) 2000, 2001 Broadcom Corporation |
10 | */ | 10 | */ |
11 | #ifndef __ASM_SMP_H | 11 | #ifndef __ASM_SMP_H |
12 | #define __ASM_SMP_H | 12 | #define __ASM_SMP_H |
13 | 13 | ||
14 | 14 | ||
15 | #ifdef CONFIG_SMP | 15 | #ifdef CONFIG_SMP |
16 | 16 | ||
17 | #include <linux/bitops.h> | 17 | #include <linux/bitops.h> |
18 | #include <linux/linkage.h> | 18 | #include <linux/linkage.h> |
19 | #include <linux/threads.h> | 19 | #include <linux/threads.h> |
20 | #include <linux/cpumask.h> | 20 | #include <linux/cpumask.h> |
21 | #include <asm/atomic.h> | 21 | #include <asm/atomic.h> |
22 | 22 | ||
23 | #define raw_smp_processor_id() (current_thread_info()->cpu) | 23 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
24 | 24 | ||
25 | /* Map from cpu id to sequential logical cpu number. This will only | 25 | /* Map from cpu id to sequential logical cpu number. This will only |
26 | not be idempotent when cpus failed to come on-line. */ | 26 | not be idempotent when cpus failed to come on-line. */ |
27 | extern int __cpu_number_map[NR_CPUS]; | 27 | extern int __cpu_number_map[NR_CPUS]; |
28 | #define cpu_number_map(cpu) __cpu_number_map[cpu] | 28 | #define cpu_number_map(cpu) __cpu_number_map[cpu] |
29 | 29 | ||
30 | /* The reverse map from sequential logical cpu number to cpu id. */ | 30 | /* The reverse map from sequential logical cpu number to cpu id. */ |
31 | extern int __cpu_logical_map[NR_CPUS]; | 31 | extern int __cpu_logical_map[NR_CPUS]; |
32 | #define cpu_logical_map(cpu) __cpu_logical_map[cpu] | 32 | #define cpu_logical_map(cpu) __cpu_logical_map[cpu] |
33 | 33 | ||
34 | #define NO_PROC_ID (-1) | 34 | #define NO_PROC_ID (-1) |
35 | 35 | ||
36 | struct call_data_struct { | 36 | struct call_data_struct { |
37 | void (*func)(void *); | 37 | void (*func)(void *); |
38 | void *info; | 38 | void *info; |
39 | atomic_t started; | 39 | atomic_t started; |
40 | atomic_t finished; | 40 | atomic_t finished; |
41 | int wait; | 41 | int wait; |
42 | }; | 42 | }; |
43 | 43 | ||
44 | extern struct call_data_struct *call_data; | 44 | extern struct call_data_struct *call_data; |
45 | 45 | ||
46 | #define SMP_RESCHEDULE_YOURSELF 0x1 /* XXX braindead */ | 46 | #define SMP_RESCHEDULE_YOURSELF 0x1 /* XXX braindead */ |
47 | #define SMP_CALL_FUNCTION 0x2 | 47 | #define SMP_CALL_FUNCTION 0x2 |
48 | 48 | ||
49 | extern cpumask_t phys_cpu_present_map; | 49 | extern cpumask_t phys_cpu_present_map; |
50 | #define cpu_possible_map phys_cpu_present_map | 50 | #define cpu_possible_map phys_cpu_present_map |
51 | 51 | ||
52 | extern cpumask_t cpu_callout_map; | ||
53 | /* We don't mark CPUs online until __cpu_up(), so we need another measure */ | ||
54 | static inline int num_booting_cpus(void) | ||
55 | { | ||
56 | return cpus_weight(cpu_callout_map); | ||
57 | } | ||
58 | |||
59 | /* | 52 | /* |
60 | * These are defined by the board-specific code. | 53 | * These are defined by the board-specific code. |
61 | */ | 54 | */ |
62 | 55 | ||
63 | /* | 56 | /* |
64 | * Cause the function described by call_data to be executed on the passed | 57 | * Cause the function described by call_data to be executed on the passed |
65 | * cpu. When the function has finished, increment the finished field of | 58 | * cpu. When the function has finished, increment the finished field of |
66 | * call_data. | 59 | * call_data. |
67 | */ | 60 | */ |
68 | extern void core_send_ipi(int cpu, unsigned int action); | 61 | extern void core_send_ipi(int cpu, unsigned int action); |
69 | 62 | ||
70 | /* | 63 | /* |
71 | * Firmware CPU startup hook | 64 | * Firmware CPU startup hook |
72 | */ | 65 | */ |
73 | extern void prom_boot_secondary(int cpu, struct task_struct *idle); | 66 | extern void prom_boot_secondary(int cpu, struct task_struct *idle); |
74 | 67 | ||
75 | /* | 68 | /* |
76 | * After we've done initial boot, this function is called to allow the | 69 | * After we've done initial boot, this function is called to allow the |
77 | * board code to clean up state, if needed | 70 | * board code to clean up state, if needed |
78 | */ | 71 | */ |
79 | extern void prom_init_secondary(void); | 72 | extern void prom_init_secondary(void); |
80 | 73 | ||
81 | /* | 74 | /* |
82 | * Populate cpu_possible_map before smp_init, called from setup_arch. | 75 | * Populate cpu_possible_map before smp_init, called from setup_arch. |
83 | */ | 76 | */ |
84 | extern void plat_smp_setup(void); | 77 | extern void plat_smp_setup(void); |
85 | 78 | ||
86 | /* | 79 | /* |
87 | * Called in smp_prepare_cpus. | 80 | * Called in smp_prepare_cpus. |
88 | */ | 81 | */ |
89 | extern void plat_prepare_cpus(unsigned int max_cpus); | 82 | extern void plat_prepare_cpus(unsigned int max_cpus); |
90 | 83 | ||
91 | /* | 84 | /* |
92 | * Last chance for the board code to finish SMP initialization before | 85 | * Last chance for the board code to finish SMP initialization before |
93 | * the CPU is "online". | 86 | * the CPU is "online". |
94 | */ | 87 | */ |
95 | extern void prom_smp_finish(void); | 88 | extern void prom_smp_finish(void); |
96 | 89 | ||
97 | /* Hook for after all CPUs are online */ | 90 | /* Hook for after all CPUs are online */ |
98 | extern void prom_cpus_done(void); | 91 | extern void prom_cpus_done(void); |
99 | 92 | ||
100 | extern void asmlinkage smp_bootstrap(void); | 93 | extern void asmlinkage smp_bootstrap(void); |
101 | 94 | ||
102 | /* | 95 | /* |
103 | * this function sends a 'reschedule' IPI to another CPU. | 96 | * this function sends a 'reschedule' IPI to another CPU. |
104 | * it goes straight through and wastes no time serializing | 97 | * it goes straight through and wastes no time serializing |
105 | * anything. Worst case is that we lose a reschedule ... | 98 | * anything. Worst case is that we lose a reschedule ... |
106 | */ | 99 | */ |
107 | static inline void smp_send_reschedule(int cpu) | 100 | static inline void smp_send_reschedule(int cpu) |
108 | { | 101 | { |
109 | core_send_ipi(cpu, SMP_RESCHEDULE_YOURSELF); | 102 | core_send_ipi(cpu, SMP_RESCHEDULE_YOURSELF); |
110 | } | 103 | } |
111 | 104 | ||
112 | extern asmlinkage void smp_call_function_interrupt(void); | 105 | extern asmlinkage void smp_call_function_interrupt(void); |
113 | 106 | ||
114 | #endif /* CONFIG_SMP */ | 107 | #endif /* CONFIG_SMP */ |
115 | 108 | ||
116 | #endif /* __ASM_SMP_H */ | 109 | #endif /* __ASM_SMP_H */ |
117 | 110 |