diff options
author | Martin Reindl <martin@cvs.openbsd.org> | 2005-10-26 19:15:44 +0000 |
---|---|---|
committer | Martin Reindl <martin@cvs.openbsd.org> | 2005-10-26 19:15:44 +0000 |
commit | 5cf28623260321d5b19019ce3855c82e785460fd (patch) | |
tree | 86ab0893fc40eeef7492d3708655d1b53a2ddf0a /sys | |
parent | 32adf1aaf358e063069e6b5463d5d9fd8cf97758 (diff) |
use the MI atop() macro for alpha and mips
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/tga.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/pci/tga.c b/sys/dev/pci/tga.c index d0b7cde971c..b46f48fe515 100644 --- a/sys/dev/pci/tga.c +++ b/sys/dev/pci/tga.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tga.c,v 1.24 2005/01/05 23:04:25 miod Exp $ */ +/* $OpenBSD: tga.c,v 1.25 2005/10/26 19:15:43 martin Exp $ */ /* $NetBSD: tga.c,v 1.40 2002/03/13 15:05:18 ad Exp $ */ /* @@ -56,6 +56,10 @@ #include <dev/rasops/rasops.h> #include <dev/wsfont/wsfont.h> +#if defined(__alpha__) || defined(__mips__) +#include <uvm/uvm_extern.h> +#endif + #ifdef __alpha__ #include <machine/pte.h> #endif @@ -715,10 +719,8 @@ tga_mmap(v, offset, prot) */ offset += dc->dc_tgaconf->tgac_cspace_size / 2; } -#if defined(__alpha__) - return alpha_btop(sc->sc_dc->dc_paddr + offset); -#elif defined(__mips__) - return mips_btop(sc->sc_dc->dc_paddr + offset); +#if defined(__alpha__) || defined(__mips__) + return atop(sc->sc_dc->dc_paddr + offset); #else return (-1); #endif |