diff options
author | Paul Mackerras <paulus@samba.org> | 2005-11-04 18:33:55 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-04 18:33:55 -0500 |
commit | 5ad570786158e327a1c5d32dd3d66f26d8de6340 (patch) | |
tree | 0b4aafe469c72e5887ed0379d62a0ee390db3160 /include/asm-ppc64 | |
parent | c3df69cd854551cf70e9c63aa509c26621084f60 (diff) |
powerpc: Merge smp.c and smp.h
This also moves setup_cpu_maps to setup-common.c (calling it
smp_setup_cpu_maps) and uses it on both 32-bit and 64-bit.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-ppc64')
-rw-r--r-- | include/asm-ppc64/smp.h | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/include/asm-ppc64/smp.h b/include/asm-ppc64/smp.h deleted file mode 100644 index ba0f5c8bbb22..000000000000 --- a/include/asm-ppc64/smp.h +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | /* | ||
2 | * smp.h: PPC64 specific SMP code. | ||
3 | * | ||
4 | * Original was a copy of sparc smp.h. Now heavily modified | ||
5 | * for PPC. | ||
6 | * | ||
7 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | ||
8 | * Copyright (C) 1996-2001 Cort Dougan <cort@fsmlabs.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public License | ||
12 | * as published by the Free Software Foundation; either version | ||
13 | * 2 of the License, or (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifdef __KERNEL__ | ||
17 | #ifndef _PPC64_SMP_H | ||
18 | #define _PPC64_SMP_H | ||
19 | |||
20 | #include <linux/config.h> | ||
21 | #include <linux/threads.h> | ||
22 | #include <linux/cpumask.h> | ||
23 | #include <linux/kernel.h> | ||
24 | |||
25 | #ifndef __ASSEMBLY__ | ||
26 | |||
27 | #include <asm/paca.h> | ||
28 | |||
29 | extern int boot_cpuid; | ||
30 | extern int boot_cpuid_phys; | ||
31 | |||
32 | extern void cpu_die(void); | ||
33 | |||
34 | #ifdef CONFIG_SMP | ||
35 | |||
36 | extern void smp_send_debugger_break(int cpu); | ||
37 | struct pt_regs; | ||
38 | extern void smp_message_recv(int, struct pt_regs *); | ||
39 | |||
40 | #ifdef CONFIG_HOTPLUG_CPU | ||
41 | extern void fixup_irqs(cpumask_t map); | ||
42 | int generic_cpu_disable(void); | ||
43 | int generic_cpu_enable(unsigned int cpu); | ||
44 | void generic_cpu_die(unsigned int cpu); | ||
45 | void generic_mach_cpu_die(void); | ||
46 | #endif | ||
47 | |||
48 | #define raw_smp_processor_id() (get_paca()->paca_index) | ||
49 | #define hard_smp_processor_id() (get_paca()->hw_cpu_id) | ||
50 | |||
51 | extern cpumask_t cpu_sibling_map[NR_CPUS]; | ||
52 | |||
53 | /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers. | ||
54 | * | ||
55 | * Make sure this matches openpic_request_IPIs in open_pic.c, or what shows up | ||
56 | * in /proc/interrupts will be wrong!!! --Troy */ | ||
57 | #define PPC_MSG_CALL_FUNCTION 0 | ||
58 | #define PPC_MSG_RESCHEDULE 1 | ||
59 | /* This is unused now */ | ||
60 | #if 0 | ||
61 | #define PPC_MSG_MIGRATE_TASK 2 | ||
62 | #endif | ||
63 | #define PPC_MSG_DEBUGGER_BREAK 3 | ||
64 | |||
65 | void smp_init_iSeries(void); | ||
66 | void smp_init_pSeries(void); | ||
67 | void smp_init_cell(void); | ||
68 | |||
69 | extern int __cpu_disable(void); | ||
70 | extern void __cpu_die(unsigned int cpu); | ||
71 | #endif /* CONFIG_SMP */ | ||
72 | |||
73 | #define get_hard_smp_processor_id(CPU) (paca[(CPU)].hw_cpu_id) | ||
74 | #define set_hard_smp_processor_id(CPU, VAL) \ | ||
75 | do { (paca[(CPU)].hw_cpu_id = (VAL)); } while (0) | ||
76 | |||
77 | extern int smt_enabled_at_boot; | ||
78 | |||
79 | extern int smp_mpic_probe(void); | ||
80 | extern void smp_mpic_setup_cpu(int cpu); | ||
81 | extern void smp_generic_kick_cpu(int nr); | ||
82 | extern void smp_release_cpus(void); | ||
83 | |||
84 | extern void smp_generic_give_timebase(void); | ||
85 | extern void smp_generic_take_timebase(void); | ||
86 | |||
87 | extern struct smp_ops_t *smp_ops; | ||
88 | |||
89 | #endif /* __ASSEMBLY__ */ | ||
90 | |||
91 | #endif /* !(_PPC64_SMP_H) */ | ||
92 | #endif /* __KERNEL__ */ | ||