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

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

Version: ~ [ linux-5.12 ] ~ [ linux-5.11.16 ] ~ [ linux-5.10.32 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.114 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.188 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.231 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.267 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.267 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ 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.5 ] ~ [ 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 #include <asm/mips-cm.h>
 17 
 18 #ifdef CONFIG_SMP
 19 
 20 #include <linux/cpumask.h>
 21 
 22 struct task_struct;
 23 
 24 struct plat_smp_ops {
 25         void (*send_ipi_single)(int cpu, unsigned int action);
 26         void (*send_ipi_mask)(const struct cpumask *mask, unsigned int action);
 27         void (*init_secondary)(void);
 28         void (*smp_finish)(void);
 29         void (*boot_secondary)(int cpu, struct task_struct *idle);
 30         void (*smp_setup)(void);
 31         void (*prepare_cpus)(unsigned int max_cpus);
 32 #ifdef CONFIG_HOTPLUG_CPU
 33         int (*cpu_disable)(void);
 34         void (*cpu_die)(unsigned int cpu);
 35 #endif
 36 };
 37 
 38 extern void register_smp_ops(struct plat_smp_ops *ops);
 39 
 40 static inline void plat_smp_setup(void)
 41 {
 42         extern struct plat_smp_ops *mp_ops;     /* private */
 43 
 44         mp_ops->smp_setup();
 45 }
 46 
 47 extern void mips_smp_send_ipi_single(int cpu, unsigned int action);
 48 extern void mips_smp_send_ipi_mask(const struct cpumask *mask,
 49                                       unsigned int action);
 50 
 51 #else /* !CONFIG_SMP */
 52 
 53 struct plat_smp_ops;
 54 
 55 static inline void plat_smp_setup(void)
 56 {
 57         /* UP, nothing to do ...  */
 58 }
 59 
 60 static inline void register_smp_ops(struct plat_smp_ops *ops)
 61 {
 62 }
 63 
 64 #endif /* !CONFIG_SMP */
 65 
 66 static inline int register_up_smp_ops(void)
 67 {
 68 #ifdef CONFIG_SMP_UP
 69         extern struct plat_smp_ops up_smp_ops;
 70 
 71         register_smp_ops(&up_smp_ops);
 72 
 73         return 0;
 74 #else
 75         return -ENODEV;
 76 #endif
 77 }
 78 
 79 static inline int register_cmp_smp_ops(void)
 80 {
 81 #ifdef CONFIG_MIPS_CMP
 82         extern struct plat_smp_ops cmp_smp_ops;
 83 
 84         if (!mips_cm_present())
 85                 return -ENODEV;
 86 
 87         register_smp_ops(&cmp_smp_ops);
 88 
 89         return 0;
 90 #else
 91         return -ENODEV;
 92 #endif
 93 }
 94 
 95 static inline int register_vsmp_smp_ops(void)
 96 {
 97 #ifdef CONFIG_MIPS_MT_SMP
 98         extern struct plat_smp_ops vsmp_smp_ops;
 99 
100         register_smp_ops(&vsmp_smp_ops);
101 
102         return 0;
103 #else
104         return -ENODEV;
105 #endif
106 }
107 
108 #ifdef CONFIG_MIPS_CPS
109 extern int register_cps_smp_ops(void);
110 #else
111 static inline int register_cps_smp_ops(void)
112 {
113         return -ENODEV;
114 }
115 #endif
116 
117 #endif /* __ASM_SMP_OPS_H */
118 

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp