diff options
| author | Jake Burkholder <jake@FreeBSD.org> | 2001-08-18 18:07:37 +0000 |
|---|---|---|
| committer | Jake Burkholder <jake@FreeBSD.org> | 2001-08-18 18:07:37 +0000 |
| commit | f70bfa97c0eccf16418115aaa9560a641c0b227f (patch) | |
| tree | ea298d2da8499c932ae908c70f442cdc011aba4e /sys | |
| parent | cae71da7651c4e5d1fd8e8ba204a145bf1f3eabf (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/sparc64/include/cpufunc.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/sparc64/include/cpufunc.h b/sys/sparc64/include/cpufunc.h index be9e1ebcc28f..5e1aecf50f1a 100644 --- a/sys/sparc64/include/cpufunc.h +++ b/sys/sparc64/include/cpufunc.h @@ -117,31 +117,28 @@ static __inline void breakpoint(void) { - __asm __volatile("ta 1"); + __asm __volatile("ta %%xcc, 1" : :); } -/* - * XXX use %pil for these. - */ static __inline critical_t critical_enter(void) { - critical_t ie; + critical_t pil; - ie = rdpr(pstate); - if (ie & PSTATE_IE) - wrpr(pstate, ie, PSTATE_IE); - return (ie); + pil = rdpr(pil); + wrpr(pil, 0, 14); + return (pil); } static __inline void -critical_exit(critical_t ie) +critical_exit(critical_t pil) { - - if (ie & PSTATE_IE) - wrpr(pstate, ie, 0); + wrpr(pil, pil, 0); } +/* + * Ultrasparc II doesn't implement popc in hardware. Suck. + */ #if 0 #define HAVE_INLINE_FFS /* |
