diff options
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia64/machdep.c | 10 | ||||
-rw-r--r-- | sys/ia64/include/cpufunc.h | 5 |
2 files changed, 12 insertions, 3 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index ab49f48..6b8ec5a 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -817,6 +817,16 @@ ia64_init(void) /* NOTREACHED */ } +__volatile void * +ia64_ioport_address(u_int port) +{ + uint64_t addr; + + addr = (port > 0xffff) ? IA64_PHYS_TO_RR6((uint64_t)port) : + ia64_port_base | ((port & 0xfffc) << 10) | (port & 0xFFF); + return ((__volatile void *)addr); +} + uint64_t ia64_get_hcdp(void) { diff --git a/sys/ia64/include/cpufunc.h b/sys/ia64/include/cpufunc.h index 27d66ef..339bd95 100644 --- a/sys/ia64/include/cpufunc.h +++ b/sys/ia64/include/cpufunc.h @@ -54,10 +54,9 @@ breakpoint(void) #define HAVE_INLINE_FFS #define ffs(x) __builtin_ffs(x) -extern uint64_t ia64_port_base; #define __MEMIO_ADDR(x) (__volatile void*)(IA64_PHYS_TO_RR6(x)) -#define __PIO_ADDR(x) (__volatile void*)(ia64_port_base | \ - (((x) & 0xFFFC) << 10) | ((x) & 0xFFF)) +extern __volatile void *ia64_ioport_address(u_int); +#define __PIO_ADDR(x) ia64_ioport_address(x) /* * I/O port reads with ia32 semantics. |