~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/mips/include/asm/smp-ops.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  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
  4  * archive for more details.
  5  *
  6  * Copyright (C) 2000 - 2001 by Kanoj Sarcar (kanoj@sgi.com)
  7  * Copyright (C) 2000 - 2001 by Silicon Graphics, Inc.
  8  * Copyright (C) 2000, 2001, 2002 Ralf Baechle
  9  * Copyright (C) 2000, 2001 Broadcom Corporation
 10  */
 11 #ifndef __ASM_SMP_OPS_H
 12 #define __ASM_SMP_OPS_H
 13 
 14 #include <linux/errno.h>
 15 
 16 #ifdef CONFIG_SMP
 17 
 18 #include <linux/cpumask.h>
 19 
 20 struct task_struct;
 21 
 22 struct plat_smp_ops {
 23         void (*send_ipi_single)(int cpu, unsigned int action);
 24         void (*send_ipi_mask)(const struct cpumask *mask, unsigned int action);
 25         void (*init_secondary)(void);
 26         void (*smp_finish)(void);
 27         int (*boot_secondary)(int cpu, struct task_struct *idle);
 28         void (*smp_setup)(void);
 29         void (*prepare_cpus)(unsigned int max_cpus);
 30         void (*prepare_boot_cpu)(void);
 31 #ifdef CONFIG_HOTPLUG_CPU
 32         int (*cpu_disable)(void);
 33         void (*cpu_die)(unsigned int cpu);
 34         void (*cleanup_dead_cpu)(unsigned cpu);
 35 #endif
 36 #ifdef CONFIG_KEXEC_CORE
 37         void (*kexec_nonboot_cpu)(void);
 38 #endif
 39 };
 40 
 41 extern void register_smp_ops(const struct plat_smp_ops *ops);
 42 
 43 static inline void plat_smp_setup(void)
 44 {
 45         extern const struct plat_smp_ops *mp_ops;       /* private */
 46 
 47         mp_ops->smp_setup();
 48 }
 49 
 50 extern void mips_smp_send_ipi_single(int cpu, unsigned int action);
 51 extern void mips_smp_send_ipi_mask(const struct cpumask *mask,
 52                                       unsigned int action);
 53 
 54 #else /* !CONFIG_SMP */
 55 
 56 struct plat_smp_ops;
 57 
 58 static inline void plat_smp_setup(void)
 59 {
 60         /* UP, nothing to do ...  */
 61 }
 62 
 63 static inline void register_smp_ops(const struct plat_smp_ops *ops)
 64 {
 65 }
 66 
 67 #endif /* !CONFIG_SMP */
 68 
 69 static inline int register_up_smp_ops(void)
 70 {
 71 #ifdef CONFIG_SMP_UP
 72         extern const struct plat_smp_ops up_smp_ops;
 73 
 74         register_smp_ops(&up_smp_ops);
 75 
 76         return 0;
 77 #else
 78         return -ENODEV;
 79 #endif
 80 }
 81 
 82 static inline int register_vsmp_smp_ops(void)
 83 {
 84 #ifdef CONFIG_MIPS_MT_SMP
 85         extern const struct plat_smp_ops vsmp_smp_ops;
 86 
 87         if (!cpu_has_mipsmt)
 88                 return -ENODEV;
 89 
 90         register_smp_ops(&vsmp_smp_ops);
 91 
 92         return 0;
 93 #else
 94         return -ENODEV;
 95 #endif
 96 }
 97 
 98 #ifdef CONFIG_MIPS_CPS
 99 extern int register_cps_smp_ops(void);
100 #else
101 static inline int register_cps_smp_ops(void)
102 {
103         return -ENODEV;
104 }
105 #endif
106 
107 #endif /* __ASM_SMP_OPS_H */
108 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php