diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-04-20 17:13:48 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-04-20 17:13:48 +0000 |
commit | 31ef9cb64a206d478084facfc925f796060495c9 (patch) | |
tree | 147736641c3e1ae21ccb1aa3c50030cbc1712f4a /sys/arch | |
parent | 62018a945d985e76808505e824c426a87fb447b6 (diff) |
Add proper bus_space_vaddr(9) impementation.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hppa64/hppa64/mainbus.c | 10 | ||||
-rw-r--r-- | sys/arch/hppa64/include/bus.h | 7 |
2 files changed, 13 insertions, 4 deletions
diff --git a/sys/arch/hppa64/hppa64/mainbus.c b/sys/arch/hppa64/hppa64/mainbus.c index bbecf633ec8..6ea53cd05e7 100644 --- a/sys/arch/hppa64/hppa64/mainbus.c +++ b/sys/arch/hppa64/hppa64/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.5 2007/10/02 00:59:12 krw Exp $ */ +/* $OpenBSD: mainbus.c,v 1.6 2008/04/20 17:13:47 kettenis Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -169,11 +169,17 @@ mbus_barrier(void *v, bus_space_handle_t h, bus_size_t o, bus_size_t l, int op) sync_caches(); } +void * +mbus_vaddr(void *v, bus_space_handle_t h) +{ + return ((void *)h); +} + struct hppa64_bus_space_tag hppa_bustag = { NULL, mbus_map, mbus_unmap, mbus_subregion, mbus_alloc, mbus_free, - mbus_barrier, + mbus_barrier, mbus_vaddr }; int diff --git a/sys/arch/hppa64/include/bus.h b/sys/arch/hppa64/include/bus.h index bfd7606dbaf..81e338a2595 100644 --- a/sys/arch/hppa64/include/bus.h +++ b/sys/arch/hppa64/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.1 2005/04/01 10:40:48 mickey Exp $ */ +/* $OpenBSD: bus.h,v 1.2 2008/04/20 17:13:47 kettenis Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -42,6 +42,8 @@ struct hppa64_bus_space_tag { void (*hbt_free)(void *, bus_space_handle_t, bus_size_t); void (*hbt_barrier)(void *v, bus_space_handle_t h, bus_size_t o, bus_size_t l, int op); + void *(*hbt_vaddr)(void *v, bus_space_handle_t h); + u_int8_t (*hbt_r1)(void *, bus_space_handle_t, bus_size_t); u_int16_t (*hbt_r2)(void *, bus_space_handle_t, bus_size_t); u_int32_t (*hbt_r4)(void *, bus_space_handle_t, bus_size_t); @@ -169,7 +171,8 @@ typedef struct hppa64_bus_space_tag *bus_space_tag_t; #define bus_space_barrier(t,h,o,l,op) \ ((t)->hbt_barrier((t)->hbt_cookie, (h), (o), (l), (op))) -#define bus_space_vaddr(t,h) ((vaddr_t)(h)) +#define bus_space_vaddr(t,h) \ + ((t)->hbt_vaddr((t)->hbt_cookie, (h))) #define bus_space_read_1(t,h,o) (((t)->hbt_r1)((t)->hbt_cookie,(h),(o))) #define bus_space_read_2(t,h,o) (((t)->hbt_r2)((t)->hbt_cookie,(h),(o))) |