smp.h (182730) | smp.h (183142) |
---|---|
1/*- 2 * Copyright (c) 2001 Jake Burkholder. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2001 Jake Burkholder. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/sparc64/include/smp.h 182730 2008-09-03 17:39:19Z marius $ | 26 * $FreeBSD: head/sys/sparc64/include/smp.h 183142 2008-09-18 13:56:30Z marius $ |
27 */ 28 29#ifndef _MACHINE_SMP_H_ 30#define _MACHINE_SMP_H_ 31 | 27 */ 28 29#ifndef _MACHINE_SMP_H_ 30#define _MACHINE_SMP_H_ 31 |
32#ifdef SMP 33 |
|
32#define CPU_TICKSYNC 1 33#define CPU_STICKSYNC 2 34#define CPU_INIT 3 35#define CPU_BOOTSTRAP 4 36 37#ifndef LOCORE 38 39#include <machine/intr_machdep.h> --- 46 unchanged lines hidden (view full) --- 86extern struct pcb stoppcbs[]; 87 88void cpu_mp_bootstrap(struct pcpu *pc); 89void cpu_mp_shutdown(void); 90 91typedef void cpu_ipi_selected_t(u_int, u_long, u_long, u_long); 92extern cpu_ipi_selected_t *cpu_ipi_selected; 93 | 34#define CPU_TICKSYNC 1 35#define CPU_STICKSYNC 2 36#define CPU_INIT 3 37#define CPU_BOOTSTRAP 4 38 39#ifndef LOCORE 40 41#include <machine/intr_machdep.h> --- 46 unchanged lines hidden (view full) --- 88extern struct pcb stoppcbs[]; 89 90void cpu_mp_bootstrap(struct pcpu *pc); 91void cpu_mp_shutdown(void); 92 93typedef void cpu_ipi_selected_t(u_int, u_long, u_long, u_long); 94extern cpu_ipi_selected_t *cpu_ipi_selected; 95 |
94void ipi_selected(u_int cpus, u_int ipi); 95void ipi_all(u_int ipi); 96void ipi_all_but_self(u_int ipi); 97 | |
98void mp_init(void); 99 100extern struct mtx ipi_mtx; 101extern struct ipi_cache_args ipi_cache_args; 102extern struct ipi_tlb_args ipi_tlb_args; 103 104extern char *mp_tramp_code; 105extern u_long mp_tramp_code_len; --- 6 unchanged lines hidden (view full) --- 112extern char tl_ipi_spitfire_dcache_page_inval[]; 113extern char tl_ipi_spitfire_icache_page_inval[]; 114 115extern char tl_ipi_level[]; 116extern char tl_ipi_tlb_context_demap[]; 117extern char tl_ipi_tlb_page_demap[]; 118extern char tl_ipi_tlb_range_demap[]; 119 | 96void mp_init(void); 97 98extern struct mtx ipi_mtx; 99extern struct ipi_cache_args ipi_cache_args; 100extern struct ipi_tlb_args ipi_tlb_args; 101 102extern char *mp_tramp_code; 103extern u_long mp_tramp_code_len; --- 6 unchanged lines hidden (view full) --- 110extern char tl_ipi_spitfire_dcache_page_inval[]; 111extern char tl_ipi_spitfire_icache_page_inval[]; 112 113extern char tl_ipi_level[]; 114extern char tl_ipi_tlb_context_demap[]; 115extern char tl_ipi_tlb_page_demap[]; 116extern char tl_ipi_tlb_range_demap[]; 117 |
120#ifdef SMP | 118static __inline void 119ipi_all_but_self(u_int ipi) 120{ |
121 | 121 |
122 cpu_ipi_selected(PCPU_GET(other_cpus), 0, (u_long)tl_ipi_level, ipi); 123} 124 125static __inline void 126ipi_selected(u_int cpus, u_int ipi) 127{ 128 129 cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_level, ipi); 130} 131 |
|
122#if defined(_MACHINE_PMAP_H_) && defined(_SYS_MUTEX_H_) 123 124static __inline void * 125ipi_dcache_page_inval(void *func, vm_paddr_t pa) 126{ 127 struct ipi_cache_args *ica; 128 129 if (smp_cpus == 1) --- 89 unchanged lines hidden (view full) --- 219 while (*mask != 0) 220 ; 221 mtx_unlock_spin(&ipi_mtx); 222 } 223} 224 225#endif /* _MACHINE_PMAP_H_ && _SYS_MUTEX_H_ */ 226 | 132#if defined(_MACHINE_PMAP_H_) && defined(_SYS_MUTEX_H_) 133 134static __inline void * 135ipi_dcache_page_inval(void *func, vm_paddr_t pa) 136{ 137 struct ipi_cache_args *ica; 138 139 if (smp_cpus == 1) --- 89 unchanged lines hidden (view full) --- 229 while (*mask != 0) 230 ; 231 mtx_unlock_spin(&ipi_mtx); 232 } 233} 234 235#endif /* _MACHINE_PMAP_H_ && _SYS_MUTEX_H_ */ 236 |
237#endif /* !LOCORE */ 238 |
|
227#else 228 | 239#else 240 |
241#ifndef LOCORE 242 |
|
229static __inline void * 230ipi_dcache_page_inval(void *func, vm_paddr_t pa) 231{ 232 233 return (NULL); 234} 235 236static __inline void * --- 25 unchanged lines hidden (view full) --- 262} 263 264static __inline void 265ipi_wait(void *cookie) 266{ 267 268} 269 | 243static __inline void * 244ipi_dcache_page_inval(void *func, vm_paddr_t pa) 245{ 246 247 return (NULL); 248} 249 250static __inline void * --- 25 unchanged lines hidden (view full) --- 276} 277 278static __inline void 279ipi_wait(void *cookie) 280{ 281 282} 283 |
270#endif /* SMP */ | 284static __inline void 285tl_ipi_cheetah_dcache_page_inval(void) 286{ |
271 | 287 |
288} 289 290static __inline void 291tl_ipi_spitfire_dcache_page_inval(void) 292{ 293 294} 295 296static __inline void 297tl_ipi_spitfire_icache_page_inval(void) 298{ 299 300} 301 |
|
272#endif /* !LOCORE */ 273 | 302#endif /* !LOCORE */ 303 |
304#endif /* SMP */ 305 |
|
274#endif /* !_MACHINE_SMP_H_ */ | 306#endif /* !_MACHINE_SMP_H_ */ |