Deleted Added
full compact
cpufunc.h (114208) cpufunc.h (115295)
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 114208 2003-04-29 09:50:03Z marcel $
26 * $FreeBSD: head/sys/ia64/include/cpufunc.h 115295 2003-05-24 21:44:24Z marcel $
27 */
28
29#ifndef _MACHINE_CPUFUNC_H_
30#define _MACHINE_CPUFUNC_H_
31
32#ifdef _KERNEL
33
34#include <sys/types.h>

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

188}
189
190static __inline register_t
191intr_disable(void)
192{
193 register_t psr;
194 __asm __volatile ("mov %0=psr;;" : "=r"(psr));
195 disable_intr();
27 */
28
29#ifndef _MACHINE_CPUFUNC_H_
30#define _MACHINE_CPUFUNC_H_
31
32#ifdef _KERNEL
33
34#include <sys/types.h>

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

188}
189
190static __inline register_t
191intr_disable(void)
192{
193 register_t psr;
194 __asm __volatile ("mov %0=psr;;" : "=r"(psr));
195 disable_intr();
196 return (psr);
196 return ((psr & IA64_PSR_I) ? 1 : 0);
197}
198
199static __inline void
197}
198
199static __inline void
200intr_restore(critical_t psr)
200intr_restore(register_t ie)
201{
201{
202 __asm __volatile ("mov psr.l=%0;; srlz.d" :: "r"(psr));
202 if (ie)
203 enable_intr();
203}
204
205#endif /* _KERNEL */
206
207#endif /* !_MACHINE_CPUFUNC_H_ */
204}
205
206#endif /* _KERNEL */
207
208#endif /* !_MACHINE_CPUFUNC_H_ */