From e119c0361672dad51ececf74e902e9e746c3669a Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Fri, 25 Dec 2009 20:52:58 +0000 Subject: Implement bus_space_vaddr(). --- sys/arch/vax/include/bus.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'sys/arch/vax/include') diff --git a/sys/arch/vax/include/bus.h b/sys/arch/vax/include/bus.h index 51bdffb1e17..bb349715186 100644 --- a/sys/arch/vax/include/bus.h +++ b/sys/arch/vax/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.12 2009/04/20 00:42:06 oga Exp $ */ +/* $OpenBSD: bus.h,v 1.13 2009/12/25 20:52:57 miod Exp $ */ /* $NetBSD: bus.h,v 1.14 2000/06/26 04:56:13 simonb Exp $ */ /*- @@ -95,6 +95,9 @@ struct vax_bus_space { bus_addr_t *, bus_space_handle_t *); void (*vbs_free)(void *, bus_space_handle_t, bus_size_t); + + /* get kernel virtual address */ + void * (*vbs_vaddr)(void *, bus_space_handle_t); }; /* @@ -159,6 +162,15 @@ struct vax_bus_space { #define bus_space_free(t, h, s) \ (*(t)->vbs_free)((t)->vbs_cookie, (h), (s)) +/* + * void *bus_space_vaddr(bus_space_tag_t t, bus_space_handle_t h); + * + * Get kernel virtual address. + */ + +#define bus_space_vaddr(t, h) \ + (*(t)->vbs_vaddr)((t)->vbs_cookie, (h)) + /* * u_intN_t bus_space_read_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset); -- cgit v1.2.3