diff options
author | 2025-03-08 22:04:20 +0800 | |
---|---|---|
committer | 2025-03-08 22:04:20 +0800 | |
commit | a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a (patch) | |
tree | 84f21bd0bf7071bc5fc7dd989e77d7ceb5476682 /arch/mips/kernel/smp-up.c | |
download | ohosKernel-a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a.tar.gz ohosKernel-a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a.zip |
Initial commit: OpenHarmony-v4.0-ReleaseOpenHarmony-v4.0-Release
Diffstat (limited to 'arch/mips/kernel/smp-up.c')
-rw-r--r-- | arch/mips/kernel/smp-up.c | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/arch/mips/kernel/smp-up.c b/arch/mips/kernel/smp-up.c new file mode 100644 index 000000000..525d3196f --- /dev/null +++ b/arch/mips/kernel/smp-up.c | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2006, 07 by Ralf Baechle (ralf@linux-mips.org) | ||
7 | * | ||
8 | * Symmetric Uniprocessor (TM) Support | ||
9 | */ | ||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/sched.h> | ||
12 | |||
13 | /* | ||
14 | * Send inter-processor interrupt | ||
15 | */ | ||
16 | static void up_send_ipi_single(int cpu, unsigned int action) | ||
17 | { | ||
18 | panic(KERN_ERR "%s called", __func__); | ||
19 | } | ||
20 | |||
21 | static inline void up_send_ipi_mask(const struct cpumask *mask, | ||
22 | unsigned int action) | ||
23 | { | ||
24 | panic(KERN_ERR "%s called", __func__); | ||
25 | } | ||
26 | |||
27 | /* | ||
28 | * After we've done initial boot, this function is called to allow the | ||
29 | * board code to clean up state, if needed | ||
30 | */ | ||
31 | static void up_init_secondary(void) | ||
32 | { | ||
33 | } | ||
34 | |||
35 | static void up_smp_finish(void) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | /* | ||
40 | * Firmware CPU startup hook | ||
41 | */ | ||
42 | static int up_boot_secondary(int cpu, struct task_struct *idle) | ||
43 | { | ||
44 | return 0; | ||
45 | } | ||
46 | |||
47 | static void __init up_smp_setup(void) | ||
48 | { | ||
49 | } | ||
50 | |||
51 | static void __init up_prepare_cpus(unsigned int max_cpus) | ||
52 | { | ||
53 | } | ||
54 | |||
55 | #ifdef CONFIG_HOTPLUG_CPU | ||
56 | static int up_cpu_disable(void) | ||
57 | { | ||
58 | return -ENOSYS; | ||
59 | } | ||
60 | |||
61 | static void up_cpu_die(unsigned int cpu) | ||
62 | { | ||
63 | BUG(); | ||
64 | } | ||
65 | #endif | ||
66 | |||
67 | const struct plat_smp_ops up_smp_ops = { | ||
68 | .send_ipi_single = up_send_ipi_single, | ||
69 | .send_ipi_mask = up_send_ipi_mask, | ||
70 | .init_secondary = up_init_secondary, | ||
71 | .smp_finish = up_smp_finish, | ||
72 | .boot_secondary = up_boot_secondary, | ||
73 | .smp_setup = up_smp_setup, | ||
74 | .prepare_cpus = up_prepare_cpus, | ||
75 | #ifdef CONFIG_HOTPLUG_CPU | ||
76 | .cpu_disable = up_cpu_disable, | ||
77 | .cpu_die = up_cpu_die, | ||
78 | #endif | ||
79 | }; | ||