diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-12-25 20:52:37 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-12-25 20:52:37 +0000 |
commit | 222509b17017cbb2e2ec27cefb44daac5f9c70ca (patch) | |
tree | 7928bb5effe5d2aad49d879cf424e54d8ed1f525 /sys/arch/alpha/include | |
parent | 478a64a3bf3baf5d0a87c4e1876d268b5d6dbd0b (diff) |
Add bus_space_vaddr() when applicable; from NetBSD.
Diffstat (limited to 'sys/arch/alpha/include')
-rw-r--r-- | sys/arch/alpha/include/bus.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/alpha/include/bus.h b/sys/arch/alpha/include/bus.h index e20db6fb2ba..6157ac433f9 100644 --- a/sys/arch/alpha/include/bus.h +++ b/sys/arch/alpha/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.27 2009/07/30 21:39:15 miod Exp $ */ +/* $OpenBSD: bus.h,v 1.28 2009/12/25 20:52:32 miod Exp $ */ /* $NetBSD: bus.h,v 1.10 1996/12/02 22:19:32 cgd Exp $ */ /* @@ -62,6 +62,9 @@ struct alpha_bus_space { void (*abs_free)(void *, bus_space_handle_t, bus_size_t); + /* get kernel virtual address */ + void * (*abs_vaddr)(void *, bus_space_handle_t); + /* barrier */ void (*abs_barrier)(void *, bus_space_handle_t, bus_size_t, bus_size_t, int); @@ -231,6 +234,11 @@ struct alpha_bus_space { #define bus_space_free(t, h, s) \ (*(t)->abs_free)((t)->abs_cookie, (h), (s)) +/* + * Get kernel virtual address for ranges mapped BUS_SPACE_MAP_LINEAR. + */ +#define bus_space_vaddr(t, h) \ + (*(t)->abs_vaddr)((t)->abs_cookie, (h)) /* * Bus barrier operations. |