cpufunc.h (86520) | cpufunc.h (88088) |
---|---|
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/cpufunc.h 86520 2001-11-18 02:47:26Z jake $ | 26 * $FreeBSD: head/sys/sparc64/include/cpufunc.h 88088 2001-12-18 00:27:18Z jhb $ |
27 */ 28 29#ifndef _MACHINE_CPUFUNC_H_ 30#define _MACHINE_CPUFUNC_H_ 31 32#include <machine/asi.h> 33#include <machine/pstate.h> 34 --- 116 unchanged lines hidden (view full) --- 151 __pr; \ 152}) 153 154#define wrpr(name, val, xor) do { \ 155 __asm __volatile("wrpr %0, %1, %%" #name \ 156 : : "r" (val), "rI" (xor)); \ 157} while (0) 158 | 27 */ 28 29#ifndef _MACHINE_CPUFUNC_H_ 30#define _MACHINE_CPUFUNC_H_ 31 32#include <machine/asi.h> 33#include <machine/pstate.h> 34 --- 116 unchanged lines hidden (view full) --- 151 __pr; \ 152}) 153 154#define wrpr(name, val, xor) do { \ 155 __asm __volatile("wrpr %0, %1, %%" #name \ 156 : : "r" (val), "rI" (xor)); \ 157} while (0) 158 |
159#define CRITICAL_FORK (0) 160 |
|
159static __inline void 160breakpoint(void) 161{ 162 __asm __volatile("ta %%xcc, 1" : :); 163} 164 165static __inline critical_t | 161static __inline void 162breakpoint(void) 163{ 164 __asm __volatile("ta %%xcc, 1" : :); 165} 166 167static __inline critical_t |
166critical_enter(void) | 168cpu_critical_enter(void) |
167{ 168 critical_t pil; 169 170 pil = rdpr(pil); 171 wrpr(pil, 0, 14); 172 return (pil); 173} 174 175static __inline void | 169{ 170 critical_t pil; 171 172 pil = rdpr(pil); 173 wrpr(pil, 0, 14); 174 return (pil); 175} 176 177static __inline void |
176critical_exit(critical_t pil) | 178cpu_critical_exit(critical_t pil) |
177{ 178 wrpr(pil, pil, 0); 179} 180 181void ascopy(u_long asi, vm_offset_t src, vm_offset_t dst, size_t len); 182void ascopyfrom(u_long sasi, vm_offset_t src, caddr_t dst, size_t len); 183void ascopyto(caddr_t src, u_long dasi, vm_offset_t dst, size_t len); 184void aszero(u_long asi, vm_offset_t dst, size_t len); --- 30 unchanged lines hidden --- | 179{ 180 wrpr(pil, pil, 0); 181} 182 183void ascopy(u_long asi, vm_offset_t src, vm_offset_t dst, size_t len); 184void ascopyfrom(u_long sasi, vm_offset_t src, caddr_t dst, size_t len); 185void ascopyto(caddr_t src, u_long dasi, vm_offset_t dst, size_t len); 186void aszero(u_long asi, vm_offset_t dst, size_t len); --- 30 unchanged lines hidden --- |