smp.h (112399) | smp.h (113238) |
---|---|
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 112399 2003-03-19 06:55:37Z jake $ | 26 * $FreeBSD: head/sys/sparc64/include/smp.h 113238 2003-04-08 06:35:09Z jake $ |
27 */ 28 29#ifndef _MACHINE_SMP_H_ 30#define _MACHINE_SMP_H_ 31 32#define CPU_CLKSYNC 1 33#define CPU_INIT 2 34#define CPU_BOOTSTRAP 3 --- 19 unchanged lines hidden (view full) --- 54 vm_offset_t csa_pcpu; 55 u_long csa_tick; 56 u_long csa_ver; 57 struct tte csa_ttes[PCPU_PAGES]; 58}; 59 60struct ipi_cache_args { 61 u_int ica_mask; | 27 */ 28 29#ifndef _MACHINE_SMP_H_ 30#define _MACHINE_SMP_H_ 31 32#define CPU_CLKSYNC 1 33#define CPU_INIT 2 34#define CPU_BOOTSTRAP 3 --- 19 unchanged lines hidden (view full) --- 54 vm_offset_t csa_pcpu; 55 u_long csa_tick; 56 u_long csa_ver; 57 struct tte csa_ttes[PCPU_PAGES]; 58}; 59 60struct ipi_cache_args { 61 u_int ica_mask; |
62 u_long ica_pa; | 62 vm_paddr_t ica_pa; |
63}; 64 65struct ipi_tlb_args { 66 u_int ita_mask; 67 struct pmap *ita_pmap; 68 u_long ita_start; 69 u_long ita_end; 70}; --- 34 unchanged lines hidden (view full) --- 105extern char tl_ipi_tlb_page_demap[]; 106extern char tl_ipi_tlb_range_demap[]; 107 108#ifdef SMP 109 110#if defined(_MACHINE_PMAP_H_) && defined(_SYS_MUTEX_H_) 111 112static __inline void * | 63}; 64 65struct ipi_tlb_args { 66 u_int ita_mask; 67 struct pmap *ita_pmap; 68 u_long ita_start; 69 u_long ita_end; 70}; --- 34 unchanged lines hidden (view full) --- 105extern char tl_ipi_tlb_page_demap[]; 106extern char tl_ipi_tlb_range_demap[]; 107 108#ifdef SMP 109 110#if defined(_MACHINE_PMAP_H_) && defined(_SYS_MUTEX_H_) 111 112static __inline void * |
113ipi_dcache_page_inval(void *func, vm_offset_t pa) | 113ipi_dcache_page_inval(void *func, vm_paddr_t pa) |
114{ 115 struct ipi_cache_args *ica; 116 117 if (smp_cpus == 1) 118 return (NULL); 119 ica = &ipi_cache_args; 120 mtx_lock_spin(&ipi_mtx); 121 ica->ica_mask = all_cpus; 122 ica->ica_pa = pa; 123 cpu_ipi_selected(PCPU_GET(other_cpus), 0, (u_long)func, (u_long)ica); 124 return (&ica->ica_mask); 125} 126 127static __inline void * | 114{ 115 struct ipi_cache_args *ica; 116 117 if (smp_cpus == 1) 118 return (NULL); 119 ica = &ipi_cache_args; 120 mtx_lock_spin(&ipi_mtx); 121 ica->ica_mask = all_cpus; 122 ica->ica_pa = pa; 123 cpu_ipi_selected(PCPU_GET(other_cpus), 0, (u_long)func, (u_long)ica); 124 return (&ica->ica_mask); 125} 126 127static __inline void * |
128ipi_icache_page_inval(void *func, vm_offset_t pa) | 128ipi_icache_page_inval(void *func, vm_paddr_t pa) |
129{ 130 struct ipi_cache_args *ica; 131 132 if (smp_cpus == 1) 133 return (NULL); 134 ica = &ipi_cache_args; 135 mtx_lock_spin(&ipi_mtx); 136 ica->ica_mask = all_cpus; --- 73 unchanged lines hidden (view full) --- 210 } 211} 212 213#endif /* _MACHINE_PMAP_H_ && _SYS_MUTEX_H_ */ 214 215#else 216 217static __inline void * | 129{ 130 struct ipi_cache_args *ica; 131 132 if (smp_cpus == 1) 133 return (NULL); 134 ica = &ipi_cache_args; 135 mtx_lock_spin(&ipi_mtx); 136 ica->ica_mask = all_cpus; --- 73 unchanged lines hidden (view full) --- 210 } 211} 212 213#endif /* _MACHINE_PMAP_H_ && _SYS_MUTEX_H_ */ 214 215#else 216 217static __inline void * |
218ipi_dcache_page_inval(void *func, vm_offset_t pa) | 218ipi_dcache_page_inval(void *func, vm_paddr_t pa) |
219{ 220 return (NULL); 221} 222 223static __inline void * | 219{ 220 return (NULL); 221} 222 223static __inline void * |
224ipi_icache_page_inval(void *func, vm_offset_t pa) | 224ipi_icache_page_inval(void *func, vm_paddr_t pa) |
225{ 226 return (NULL); 227} 228 229static __inline void * 230ipi_tlb_context_demap(struct pmap *pm) 231{ 232 return (NULL); --- 24 unchanged lines hidden --- | 225{ 226 return (NULL); 227} 228 229static __inline void * 230ipi_tlb_context_demap(struct pmap *pm) 231{ 232 return (NULL); --- 24 unchanged lines hidden --- |