cpufunc.h (127253) | cpufunc.h (132871) |
---|---|
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 127253 2004-03-21 01:41:29Z marcel $ | 26 * $FreeBSD: head/sys/ia64/include/cpufunc.h 132871 2004-07-30 07:56:53Z marcel $ |
27 */ 28 29#ifndef _MACHINE_CPUFUNC_H_ 30#define _MACHINE_CPUFUNC_H_ 31 32#ifdef _KERNEL 33 34#include <sys/types.h> --- 8 unchanged lines hidden (view full) --- 43 44static __inline void 45breakpoint(void) 46{ 47 __asm __volatile("break.m %0" :: "i"(IA64_FIXED_BREAK)); 48} 49 50#define HAVE_INLINE_FFS | 27 */ 28 29#ifndef _MACHINE_CPUFUNC_H_ 30#define _MACHINE_CPUFUNC_H_ 31 32#ifdef _KERNEL 33 34#include <sys/types.h> --- 8 unchanged lines hidden (view full) --- 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) |
|
51 | 52 |
52static __inline int 53ffs(int mask) 54{ 55 return (__builtin_ffs(mask)); 56} 57 | |
58#endif 59 60extern uint64_t ia64_port_base; 61#define __MEMIO_ADDR(x) (__volatile void*)(IA64_PHYS_TO_RR6(x)) 62#define __PIO_ADDR(x) (__volatile void*)(ia64_port_base | \ 63 (((x) & 0xFFFC) << 10) | ((x) & 0xFFF)) 64 65/* --- 153 unchanged lines hidden --- | 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/* --- 153 unchanged lines hidden --- |