Deleted Added
full compact
cpufunc.h (132871) cpufunc.h (143063)
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 132871 2004-07-30 07:56:53Z marcel $
26 * $FreeBSD: head/sys/ia64/include/cpufunc.h 143063 2005-03-02 21:33:29Z joerg $
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#include <machine/vmparam.h>
37
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#include <machine/vmparam.h>
37
38#ifndef _SYS_CDEFS_H_
39#error this file needs sys/cdefs.h as a prerequisite
40#endif
41
38struct thread;
39
40#define IA64_FIXED_BREAK 0x84B5D
41
42struct thread;
43
44#define IA64_FIXED_BREAK 0x84B5D
45
42#ifdef __GNUC__
46#ifdef __GNUCLIKE_ASM
43
44static __inline void
45breakpoint(void)
46{
47 __asm __volatile("break.m %0" :: "i"(IA64_FIXED_BREAK));
48}
49
50#define HAVE_INLINE_FFS
51#define ffs(x) __builtin_ffs(x)
52
47
48static __inline void
49breakpoint(void)
50{
51 __asm __volatile("break.m %0" :: "i"(IA64_FIXED_BREAK));
52}
53
54#define HAVE_INLINE_FFS
55#define ffs(x) __builtin_ffs(x)
56
53#endif
54
55extern uint64_t ia64_port_base;
56#define __MEMIO_ADDR(x) (__volatile void*)(IA64_PHYS_TO_RR6(x))
57#define __PIO_ADDR(x) (__volatile void*)(ia64_port_base | \
58 (((x) & 0xFFFC) << 10) | ((x) & 0xFFF))
59
60/*
61 * I/O port reads with ia32 semantics.
62 */

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

203
204static __inline void
205intr_restore(register_t ie)
206{
207 if (ie)
208 enable_intr();
209}
210
57extern uint64_t ia64_port_base;
58#define __MEMIO_ADDR(x) (__volatile void*)(IA64_PHYS_TO_RR6(x))
59#define __PIO_ADDR(x) (__volatile void*)(ia64_port_base | \
60 (((x) & 0xFFFC) << 10) | ((x) & 0xFFF))
61
62/*
63 * I/O port reads with ia32 semantics.
64 */

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

205
206static __inline void
207intr_restore(register_t ie)
208{
209 if (ie)
210 enable_intr();
211}
212
213#endif /* __GNUCLIKE_ASM */
214
211#endif /* _KERNEL */
212
213#endif /* !_MACHINE_CPUFUNC_H_ */
215#endif /* _KERNEL */
216
217#endif /* !_MACHINE_CPUFUNC_H_ */