Deleted Added
full compact
cpufunc.h (84581) cpufunc.h (88088)
1/*-
2 * Copyright (c) 1998 Doug Rabson
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) 1998 Doug Rabson
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/ia64/include/cpufunc.h 84581 2001-10-06 09:31:43Z marcel $
26 * $FreeBSD: head/sys/ia64/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#ifdef _KERNEL
33
34#include <sys/types.h>
35#include <machine/ia64_cpu.h>
36
27 */
28
29#ifndef _MACHINE_CPUFUNC_H_
30#define _MACHINE_CPUFUNC_H_
31
32#ifdef _KERNEL
33
34#include <sys/types.h>
35#include <machine/ia64_cpu.h>
36
37#define CRITICAL_FORK (ia64_get_psr() |= IA64_PSR_I)
38
37#ifdef __GNUC__
38
39static __inline void
40breakpoint(void)
41{
42 __asm __volatile("break 0x80100"); /* XXX use linux value */
43}
44

--- 233 unchanged lines hidden (view full) ---

278
279static __inline void
280enable_intr(void)
281{
282 __asm __volatile (";; ssm psr.i;; srlz.d");
283}
284
285static __inline critical_t
39#ifdef __GNUC__
40
41static __inline void
42breakpoint(void)
43{
44 __asm __volatile("break 0x80100"); /* XXX use linux value */
45}
46

--- 233 unchanged lines hidden (view full) ---

280
281static __inline void
282enable_intr(void)
283{
284 __asm __volatile (";; ssm psr.i;; srlz.d");
285}
286
287static __inline critical_t
286critical_enter(void)
288cpu_critical_enter(void)
287{
288 critical_t psr;
289
290 __asm __volatile ("mov %0=psr;;" : "=r" (psr));
291 disable_intr();
292 return (psr);
293}
294
295static __inline void
289{
290 critical_t psr;
291
292 __asm __volatile ("mov %0=psr;;" : "=r" (psr));
293 disable_intr();
294 return (psr);
295}
296
297static __inline void
296critical_exit(critical_t psr)
298cpu_critical_exit(critical_t psr)
297{
298 __asm __volatile ("mov psr.l=%0;; srlz.d" :: "r" (psr));
299}
300
301#endif /* _KERNEL */
302
303#endif /* !_MACHINE_CPUFUNC_H_ */
299{
300 __asm __volatile ("mov psr.l=%0;; srlz.d" :: "r" (psr));
301}
302
303#endif /* _KERNEL */
304
305#endif /* !_MACHINE_CPUFUNC_H_ */