summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/alpha/mem.c6
-rw-r--r--sys/arch/alpha/dev/bus_dma.c4
-rw-r--r--sys/arch/alpha/include/pmap.h3
-rw-r--r--sys/arch/alpha/tc/cfb.c4
-rw-r--r--sys/arch/alpha/tc/sfb.c4
-rw-r--r--sys/arch/amd64/amd64/bus_dma.c4
-rw-r--r--sys/arch/amd64/amd64/bus_space.c4
-rw-r--r--sys/arch/amd64/amd64/mem.c10
-rw-r--r--sys/arch/amd64/include/pmap.h3
-rw-r--r--sys/arch/arm/arm/bus_dma.c4
-rw-r--r--sys/arch/arm/arm/mem.c4
-rw-r--r--sys/arch/arm/include/pmap.h4
-rw-r--r--sys/arch/arm/mainbus/mainbus_io.c4
-rw-r--r--sys/arch/aviion/aviion/bus_dma.c4
-rw-r--r--sys/arch/aviion/dev/nvram.c4
-rw-r--r--sys/arch/aviion/dev/vme.c4
-rw-r--r--sys/arch/hp300/dev/diofb.c6
-rw-r--r--sys/arch/hp300/hp300/bus_space.c4
-rw-r--r--sys/arch/hp300/hp300/mem.c4
-rw-r--r--sys/arch/hppa/dev/mem.c4
-rw-r--r--sys/arch/hppa/include/pmap.h3
-rw-r--r--sys/arch/hppa64/dev/mem.c4
-rw-r--r--sys/arch/hppa64/include/pmap.h3
-rw-r--r--sys/arch/i386/i386/bus_dma.c4
-rw-r--r--sys/arch/i386/i386/mem.c11
-rw-r--r--sys/arch/i386/include/pmap.h3
-rw-r--r--sys/arch/loongson/dev/sisfb.c6
-rw-r--r--sys/arch/loongson/dev/smfb.c6
-rw-r--r--sys/arch/loongson/loongson/bus_dma.c4
-rw-r--r--sys/arch/luna88k/dev/lunafb.c4
-rw-r--r--sys/arch/m68k/include/pmap_motorola.h3
-rw-r--r--sys/arch/m88k/include/pmap.h3
-rw-r--r--sys/arch/mac68k/dev/asc.c4
-rw-r--r--sys/arch/mac68k/dev/macfb.c4
-rw-r--r--sys/arch/mac68k/mac68k/mem.c4
-rw-r--r--sys/arch/macppc/macppc/dma.c4
-rw-r--r--sys/arch/mips64/include/pmap.h3
-rw-r--r--sys/arch/mvme68k/dev/flash.c4
-rw-r--r--sys/arch/mvme68k/dev/nvram.c4
-rw-r--r--sys/arch/mvme68k/dev/sram.c4
-rw-r--r--sys/arch/mvme68k/dev/vmel.c4
-rw-r--r--sys/arch/mvme68k/dev/vmes.c4
-rw-r--r--sys/arch/mvme68k/mvme68k/bus_dma.c4
-rw-r--r--sys/arch/mvme68k/mvme68k/mem.c4
-rw-r--r--sys/arch/mvme88k/dev/nvram.c4
-rw-r--r--sys/arch/mvme88k/dev/sram.c4
-rw-r--r--sys/arch/mvme88k/dev/vmel.c4
-rw-r--r--sys/arch/mvme88k/dev/vmes.c4
-rw-r--r--sys/arch/mvme88k/mvme88k/bus_dma.c4
-rw-r--r--sys/arch/mvmeppc/mvmeppc/bus_dma.c4
-rw-r--r--sys/arch/octeon/octeon/bus_dma.c4
-rw-r--r--sys/arch/powerpc/include/pmap.h3
-rw-r--r--sys/arch/sgi/dev/gbe.c4
-rw-r--r--sys/arch/sgi/sgi/bus_dma.c4
-rw-r--r--sys/arch/sh/include/pmap.h3
-rw-r--r--sys/arch/sh/sh/mem.c4
-rw-r--r--sys/arch/socppc/socppc/dma.c4
-rw-r--r--sys/arch/solbourne/include/pmap.h3
-rw-r--r--sys/arch/sparc/include/pmap.h3
-rw-r--r--sys/arch/sparc64/include/pmap.h1
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c4
-rw-r--r--sys/arch/vax/include/pmap.h3
-rw-r--r--sys/arch/vax/vax/bus_dma.c4
-rw-r--r--sys/arch/vax/vsa/lcg.c4
-rw-r--r--sys/arch/vax/vsa/lcspx.c4
-rw-r--r--sys/arch/vax/vsa/smg.c4
66 files changed, 124 insertions, 145 deletions
diff --git a/sys/arch/alpha/alpha/mem.c b/sys/arch/alpha/alpha/mem.c
index 01ec48b47d5..c701e98f652 100644
--- a/sys/arch/alpha/alpha/mem.c
+++ b/sys/arch/alpha/alpha/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.24 2010/04/21 03:03:25 deraadt Exp $ */
+/* $OpenBSD: mem.c,v 1.25 2010/12/26 15:40:58 miod Exp $ */
/* $NetBSD: mem.c,v 1.26 2000/03/29 03:48:20 simonb Exp $ */
/*
@@ -234,7 +234,7 @@ mmmmap(dev, off, prot)
*/
if ((prot & alpha_pa_access(atop(off))) != prot)
return (-1);
- return (atop(off));
+ return off;
#ifdef APERTURE
case 4:
@@ -243,7 +243,7 @@ mmmmap(dev, off, prot)
case 1:
if ((prot & alpha_pa_access(atop(off))) != prot)
return (-1);
- return atop(off);
+ return off;
default:
return -1;
}
diff --git a/sys/arch/alpha/dev/bus_dma.c b/sys/arch/alpha/dev/bus_dma.c
index c2bbcdd7526..0ea8d8140f8 100644
--- a/sys/arch/alpha/dev/bus_dma.c
+++ b/sys/arch/alpha/dev/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.29 2010/11/20 20:33:21 miod Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.30 2010/12/26 15:40:58 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.40 2000/07/17 04:47:56 thorpej Exp $ */
/*-
@@ -685,7 +685,7 @@ _bus_dmamem_mmap(t, segs, nsegs, off, prot, flags)
continue;
}
- return (atop(segs[i].ds_addr + off));
+ return (segs[i].ds_addr + off);
}
/* Page not found. */
diff --git a/sys/arch/alpha/include/pmap.h b/sys/arch/alpha/include/pmap.h
index d780fcb8aff..99ae8b00ef4 100644
--- a/sys/arch/alpha/include/pmap.h
+++ b/sys/arch/alpha/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.24 2008/06/26 05:42:08 ray Exp $ */
+/* $OpenBSD: pmap.h,v 1.25 2010/12/26 15:40:58 miod Exp $ */
/* $NetBSD: pmap.h,v 1.37 2000/11/19 03:16:35 thorpej Exp $ */
/*-
@@ -183,7 +183,6 @@ void pmap_tlb_shootdown_q_drain(u_long, boolean_t);
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)
#define pmap_update(pmap) /* nothing (yet) */
-#define pmap_phys_address(ppn) ptoa(ppn)
#define pmap_proc_iflush(p, va, len) /* nothing */
#define pmap_unuse_final(p) /* nothing */
diff --git a/sys/arch/alpha/tc/cfb.c b/sys/arch/alpha/tc/cfb.c
index 1afc6e26334..bb60d6002a8 100644
--- a/sys/arch/alpha/tc/cfb.c
+++ b/sys/arch/alpha/tc/cfb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cfb.c,v 1.21 2009/03/29 21:53:52 sthen Exp $ */
+/* $OpenBSD: cfb.c,v 1.22 2010/12/26 15:40:58 miod Exp $ */
/* $NetBSD: cfb.c,v 1.7 1996/12/05 01:39:39 cgd Exp $ */
/*
@@ -310,7 +310,7 @@ cfbmmap(v, offset, prot)
if (offset > CFB_SIZE)
return (-1);
- return atop(sc->sc_dc->dc_paddr + offset);
+ return sc->sc_dc->dc_paddr + offset;
}
int
diff --git a/sys/arch/alpha/tc/sfb.c b/sys/arch/alpha/tc/sfb.c
index e8af2efe73c..3766994c714 100644
--- a/sys/arch/alpha/tc/sfb.c
+++ b/sys/arch/alpha/tc/sfb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sfb.c,v 1.19 2009/03/29 21:53:52 sthen Exp $ */
+/* $OpenBSD: sfb.c,v 1.20 2010/12/26 15:40:58 miod Exp $ */
/* $NetBSD: sfb.c,v 1.7 1996/12/05 01:39:44 cgd Exp $ */
/*
@@ -354,7 +354,7 @@ sfbmmap(v, offset, prot)
if (offset >= SFB_SIZE || offset < 0)
return (-1);
- return atop(sc->sc_dc->dc_paddr + offset);
+ return sc->sc_dc->dc_paddr + offset;
}
int
diff --git a/sys/arch/amd64/amd64/bus_dma.c b/sys/arch/amd64/amd64/bus_dma.c
index bfcd2685327..3b936f13237 100644
--- a/sys/arch/amd64/amd64/bus_dma.c
+++ b/sys/arch/amd64/amd64/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.34 2010/11/20 20:33:23 miod Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.35 2010/12/26 15:40:58 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */
/*-
@@ -545,7 +545,7 @@ _bus_dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, off_t off,
continue;
}
- return (atop(segs[i].ds_addr + off));
+ return (segs[i].ds_addr + off);
}
/* Page not found. */
diff --git a/sys/arch/amd64/amd64/bus_space.c b/sys/arch/amd64/amd64/bus_space.c
index a2d02f055d9..8432ebdfa6e 100644
--- a/sys/arch/amd64/amd64/bus_space.c
+++ b/sys/arch/amd64/amd64/bus_space.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_space.c,v 1.17 2010/05/08 16:54:07 oga Exp $ */
+/* $OpenBSD: bus_space.c,v 1.18 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: bus_space.c,v 1.2 2003/03/14 18:47:53 christos Exp $ */
/*-
@@ -407,7 +407,7 @@ bus_space_mmap(bus_space_tag_t t, bus_addr_t addr, off_t off, int prot, int flag
* Note we are called for each "page" in the device that
* the upper layers want to map.
*/
- return (atop(addr + off));
+ return (addr + off);
}
u_int8_t
diff --git a/sys/arch/amd64/amd64/mem.c b/sys/arch/amd64/amd64/mem.c
index 787b3a6ef9f..9a20c20c33f 100644
--- a/sys/arch/amd64/amd64/mem.c
+++ b/sys/arch/amd64/amd64/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.14 2008/11/05 06:32:47 matthieu Exp $ */
+/* $OpenBSD: mem.c,v 1.15 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1986, 1990, 1993
@@ -217,7 +217,7 @@ mmmmap(dev_t dev, off_t off, int prot)
case 0:
if (suser(p, 0) != 0 && amd64_pa_used(off))
return -1;
- return atop(off);
+ return off;
#ifdef APERTURE
/* minor device 4 is aperture driver */
@@ -226,15 +226,15 @@ mmmmap(dev_t dev, off_t off, int prot)
case 1:
/* Allow mapping of the VGA framebuffer & BIOS only */
if ((off >= VGA_START && off <= BIOS_END) ||
- !amd64_pa_used(off))
- return atop(off);
+ !amd64_pa_used(off))
+ return off;
else
return -1;
case 2:
/* Allow mapping of the whole 1st megabyte
for x86emu */
if (off <= BIOS_END || !amd64_pa_used(off))
- return atop(off);
+ return off;
else
return -1;
default:
diff --git a/sys/arch/amd64/include/pmap.h b/sys/arch/amd64/include/pmap.h
index 4be7f724eec..17be6cc7b0e 100644
--- a/sys/arch/amd64/include/pmap.h
+++ b/sys/arch/amd64/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.36 2010/11/30 19:30:16 kettenis Exp $ */
+/* $OpenBSD: pmap.h,v 1.37 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: pmap.h,v 1.1 2003/04/26 18:39:46 fvdl Exp $ */
/*
@@ -388,7 +388,6 @@ extern pd_entry_t *pdes[];
#define pmap_is_modified(pg) pmap_test_attrs(pg, PG_M)
#define pmap_is_referenced(pg) pmap_test_attrs(pg, PG_U)
#define pmap_move(DP,SP,D,L,S)
-#define pmap_phys_address(ppn) ptoa(ppn)
#define pmap_valid_entry(E) ((E) & PG_V) /* is PDE or PTE valid? */
#define pmap_proc_iflush(p,va,len) /* nothing */
diff --git a/sys/arch/arm/arm/bus_dma.c b/sys/arch/arm/arm/bus_dma.c
index 004350a9726..28a47e7579c 100644
--- a/sys/arch/arm/arm/bus_dma.c
+++ b/sys/arch/arm/arm/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.18 2010/11/20 20:33:23 miod Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.19 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.38 2003/10/30 08:44:13 scw Exp $ */
/*-
@@ -799,7 +799,7 @@ _bus_dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs,
continue;
}
- return (atop(segs[i].ds_addr + off));
+ return (segs[i].ds_addr + off);
}
/* Page not found. */
diff --git a/sys/arch/arm/arm/mem.c b/sys/arch/arm/arm/mem.c
index b93800399fc..f6c9f756eee 100644
--- a/sys/arch/arm/arm/mem.c
+++ b/sys/arch/arm/arm/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.9 2008/11/05 06:32:47 matthieu Exp $ */
+/* $OpenBSD: mem.c,v 1.10 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: mem.c,v 1.11 2003/10/16 12:02:58 jdolecek Exp $ */
/*
@@ -259,7 +259,7 @@ mmmmap(dev, off, prot)
if ((paddr_t)off >= ptoa((paddr_t)physmem) &&
suser(p, 0) != 0)
return -1;
- return atop(off);
+ return off;
}
/*ARGSUSED*/
int
diff --git a/sys/arch/arm/include/pmap.h b/sys/arch/arm/include/pmap.h
index d5877c33475..d06496bb188 100644
--- a/sys/arch/arm/include/pmap.h
+++ b/sys/arch/arm/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.14 2010/12/06 20:57:15 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.15 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: pmap.h,v 1.76 2003/09/06 09:10:46 rearnsha Exp $ */
/*
@@ -243,8 +243,6 @@ extern int pmap_debug_level; /* Only exists if PMAP_DEBUG */
#define pmap_deactivate(p) do { /* nothing */ } while (0)
#define pmap_copy(dp, sp, da, l, sa) do { /* nothing */ } while (0)
-#define pmap_phys_address(ppn) (ptoa(ppn))
-
#define pmap_proc_iflush(p, va, len) do { /* nothing */ } while (0)
#define pmap_unuse_final(p) do { /* nothing */ } while (0)
#define pmap_remove_holes(map) do { /* nothing */ } while (0)
diff --git a/sys/arch/arm/mainbus/mainbus_io.c b/sys/arch/arm/mainbus/mainbus_io.c
index 494246376c2..6519ce9bd60 100644
--- a/sys/arch/arm/mainbus/mainbus_io.c
+++ b/sys/arch/arm/mainbus/mainbus_io.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus_io.c,v 1.4 2009/07/26 18:48:55 miod Exp $ */
+/* $OpenBSD: mainbus_io.c,v 1.5 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: mainbus_io.c,v 1.14 2003/12/06 22:05:33 bjh21 Exp $ */
/*
@@ -233,7 +233,7 @@ mainbus_bs_mmap(t, paddr, offset, prot, flags)
/*
* mmap from address `paddr+offset' for one page
*/
- return (atop(paddr + offset));
+ return (paddr + offset);
}
void
diff --git a/sys/arch/aviion/aviion/bus_dma.c b/sys/arch/aviion/aviion/bus_dma.c
index 90a967aac8c..f852f46df90 100644
--- a/sys/arch/aviion/aviion/bus_dma.c
+++ b/sys/arch/aviion/aviion/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.2 2010/06/26 23:24:43 guenther Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.3 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.2 2001/06/10 02:31:25 briggs Exp $ */
/*-
@@ -608,7 +608,7 @@ bus_dmamem_mmap(t, segs, nsegs, off, prot, flags)
continue;
}
- return (atop(segs[i].ds_addr + off));
+ return (segs[i].ds_addr + off);
}
/* Page not found. */
diff --git a/sys/arch/aviion/dev/nvram.c b/sys/arch/aviion/dev/nvram.c
index 7a9f8f17469..200f299a0f1 100644
--- a/sys/arch/aviion/dev/nvram.c
+++ b/sys/arch/aviion/dev/nvram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvram.c,v 1.6 2010/04/21 19:33:47 miod Exp $ */
+/* $OpenBSD: nvram.c,v 1.7 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -410,7 +410,7 @@ nvrammmap(dev, off, prot)
/* allow access only in RAM */
if (off < 0 || off >= round_page(sc->sc_len))
return (-1);
- return (atop(sc->sc_base + off));
+ return (sc->sc_base + off);
#else
/* disallow mmap due to non-linear layout */
return (-1);
diff --git a/sys/arch/aviion/dev/vme.c b/sys/arch/aviion/dev/vme.c
index 7b7e95cb76a..252ef199aae 100644
--- a/sys/arch/aviion/dev/vme.c
+++ b/sys/arch/aviion/dev/vme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vme.c,v 1.9 2010/09/20 06:33:47 matthew Exp $ */
+/* $OpenBSD: vme.c,v 1.10 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 2006, 2007, 2010 Miodrag Vallat.
*
@@ -1007,5 +1007,5 @@ vmemmap(dev_t dev, off_t off, int prot)
if (r->vr_width == 0)
return -1;
- return atop(r->vr_base + (paddr_t)off);
+ return r->vr_base + (paddr_t)off;
}
diff --git a/sys/arch/hp300/dev/diofb.c b/sys/arch/hp300/dev/diofb.c
index 25ba07ce5d7..45996399714 100644
--- a/sys/arch/hp300/dev/diofb.c
+++ b/sys/arch/hp300/dev/diofb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diofb.c,v 1.17 2009/09/05 14:09:35 miod Exp $ */
+/* $OpenBSD: diofb.c,v 1.18 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat
@@ -487,12 +487,12 @@ diofb_mmap(void * v, off_t offset, int prot)
switch (fb->mapmode) {
case WSDISPLAYIO_MODE_MAPPED:
if (offset >= 0 && offset < DIOFB_REGSPACE)
- return (((paddr_t)fb->regaddr + offset) >> PGSHIFT);
+ return ((paddr_t)fb->regaddr + offset);
offset -= DIOFB_REGSPACE;
/* FALLTHROUGH */
case WSDISPLAYIO_MODE_DUMBFB:
if (offset >= 0 && offset < fb->fbsize)
- return (((paddr_t)fb->fbaddr + offset) >> PGSHIFT);
+ return ((paddr_t)fb->fbaddr + offset);
break;
}
diff --git a/sys/arch/hp300/hp300/bus_space.c b/sys/arch/hp300/hp300/bus_space.c
index a25a4ba1925..e302f99ac82 100644
--- a/sys/arch/hp300/hp300/bus_space.c
+++ b/sys/arch/hp300/hp300/bus_space.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_space.c,v 1.6 2008/06/26 05:42:10 ray Exp $ */
+/* $OpenBSD: bus_space.c,v 1.7 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: bus_space.c,v 1.6 2002/09/27 15:36:02 provos Exp $ */
/*-
@@ -709,6 +709,6 @@ paddr_t
bus_space_mmap(bus_space_tag_t t, bus_addr_t addr, off_t offset, int prot,
int flags)
{
- return (((paddr_t)addr + offset) >> PAGE_SHIFT);
+ return ((paddr_t)addr + offset);
}
#endif
diff --git a/sys/arch/hp300/hp300/mem.c b/sys/arch/hp300/hp300/mem.c
index 999d3334469..c2e8bfa663c 100644
--- a/sys/arch/hp300/hp300/mem.c
+++ b/sys/arch/hp300/hp300/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.25 2009/06/10 15:58:49 miod Exp $ */
+/* $OpenBSD: mem.c,v 1.26 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: mem.c,v 1.25 1999/03/27 00:30:06 mycroft Exp $ */
/*
@@ -253,7 +253,7 @@ mmmmap(dev, off, prot)
*/
if ((u_int)off < lowram || (u_int)off >= 0xFFFFFFFC)
return (-1);
- return (atop(off));
+ return (off);
}
int
diff --git a/sys/arch/hppa/dev/mem.c b/sys/arch/hppa/dev/mem.c
index 444c4f387d2..809df3300cb 100644
--- a/sys/arch/hppa/dev/mem.c
+++ b/sys/arch/hppa/dev/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.31 2009/02/04 17:21:23 miod Exp $ */
+/* $OpenBSD: mem.c,v 1.32 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -422,7 +422,7 @@ mmmmap(dev, off, prot)
off >= ptoa(lastusablepage + 1))
return (-1);
#endif
- return (atop(off));
+ return (off);
}
int
diff --git a/sys/arch/hppa/include/pmap.h b/sys/arch/hppa/include/pmap.h
index 5384ca2bd6e..a9fc7a08adb 100644
--- a/sys/arch/hppa/include/pmap.h
+++ b/sys/arch/hppa/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.39 2010/12/06 20:57:16 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.40 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
@@ -111,7 +111,6 @@ pmap_prefer(vaddr_t offs, vaddr_t hint)
#define pmap_clear_reference(pg) pmap_changebit(pg, PTE_PROT(TLB_REFTRAP), 0)
#define pmap_is_modified(pg) pmap_testbit(pg, PTE_PROT(TLB_DIRTY))
#define pmap_is_referenced(pg) pmap_testbit(pg, PTE_PROT(TLB_REFTRAP))
-#define pmap_phys_address(ppn) ((ppn) << PAGE_SHIFT)
#define pmap_unuse_final(p) /* nothing */
#define pmap_remove_holes(map) do { /* nothing */ } while (0)
diff --git a/sys/arch/hppa64/dev/mem.c b/sys/arch/hppa64/dev/mem.c
index 67299590181..51a20555171 100644
--- a/sys/arch/hppa64/dev/mem.c
+++ b/sys/arch/hppa64/dev/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.5 2008/04/27 17:48:09 martin Exp $ */
+/* $OpenBSD: mem.c,v 1.6 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -256,7 +256,7 @@ mmmmap(dev, off, prot)
off >= ptoa(lastusablepage + 1))
return (-1);
#endif
- return (atop(off));
+ return (off);
}
int
diff --git a/sys/arch/hppa64/include/pmap.h b/sys/arch/hppa64/include/pmap.h
index 9d7694cf1e6..9c71dc29be2 100644
--- a/sys/arch/hppa64/include/pmap.h
+++ b/sys/arch/hppa64/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.3 2010/12/06 20:57:16 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.4 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -81,7 +81,6 @@ pmap_prefer(vaddr_t offs, vaddr_t hint)
#define pmap_clear_reference(pg) pmap_changebit(pg, PTE_REFTRAP, 0)
#define pmap_is_modified(pg) pmap_testbit(pg, PTE_DIRTY)
#define pmap_is_referenced(pg) pmap_testbit(pg, PTE_REFTRAP)
-#define pmap_phys_address(ppn) ((ppn) << PAGE_SHIFT)
#define pmap_proc_iflush(p,va,len) /* nothing */
#define pmap_unuse_final(p) /* nothing */
diff --git a/sys/arch/i386/i386/bus_dma.c b/sys/arch/i386/i386/bus_dma.c
index 01df80304f5..6c0d4b3c201 100644
--- a/sys/arch/i386/i386/bus_dma.c
+++ b/sys/arch/i386/i386/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.23 2010/11/20 20:33:24 miod Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.24 2010/12/26 15:40:59 miod Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -516,7 +516,7 @@ _bus_dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, off_t off,
continue;
}
- return (atop(segs[i].ds_addr + off));
+ return (segs[i].ds_addr + off);
}
/* Page not found. */
diff --git a/sys/arch/i386/i386/mem.c b/sys/arch/i386/i386/mem.c
index 1ea8bc413b7..fb64e1ec472 100644
--- a/sys/arch/i386/i386/mem.c
+++ b/sys/arch/i386/i386/mem.c
@@ -1,5 +1,5 @@
/* $NetBSD: mem.c,v 1.31 1996/05/03 19:42:19 christos Exp $ */
-/* $OpenBSD: mem.c,v 1.36 2009/01/13 19:44:20 grange Exp $ */
+/* $OpenBSD: mem.c,v 1.37 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1986, 1990, 1993
@@ -214,10 +214,9 @@ mmmmap(dev_t dev, off_t off, int prot)
switch (minor(dev)) {
/* minor device 0 is physical memory */
case 0:
- if ((u_int)off > ptoa(physmem) &&
- suser(p, 0) != 0)
+ if ((u_int)off > ptoa(physmem) && suser(p, 0) != 0)
return -1;
- return atop(off);
+ return off;
#ifdef APERTURE
/* minor device 4 is aperture driver */
@@ -227,7 +226,7 @@ mmmmap(dev_t dev, off_t off, int prot)
/* Allow mapping of the VGA framebuffer & BIOS only */
if ((off >= VGA_START && off <= BIOS_END) ||
(unsigned)off > (unsigned)ptoa(physmem))
- return atop(off);
+ return off;
else
return -1;
case 2:
@@ -235,7 +234,7 @@ mmmmap(dev_t dev, off_t off, int prot)
for x86emu */
if (off <= BIOS_END ||
(unsigned)off > (unsigned)ptoa(physmem))
- return atop(off);
+ return off;
else
return -1;
default:
diff --git a/sys/arch/i386/include/pmap.h b/sys/arch/i386/include/pmap.h
index 393938975ac..12f981ee252 100644
--- a/sys/arch/i386/include/pmap.h
+++ b/sys/arch/i386/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.55 2010/05/08 16:54:08 oga Exp $ */
+/* $OpenBSD: pmap.h,v 1.56 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: pmap.h,v 1.44 2000/04/24 17:18:18 thorpej Exp $ */
/*
@@ -364,7 +364,6 @@ extern int pmap_pg_g; /* do we support PG_G? */
#define pmap_copy(DP,SP,D,L,S)
#define pmap_is_modified(pg) pmap_test_attrs(pg, PG_M)
#define pmap_is_referenced(pg) pmap_test_attrs(pg, PG_U)
-#define pmap_phys_address(ppn) ptoa(ppn)
#define pmap_valid_entry(E) ((E) & PG_V) /* is PDE or PTE valid? */
#define pmap_proc_iflush(p,va,len) /* nothing */
diff --git a/sys/arch/loongson/dev/sisfb.c b/sys/arch/loongson/dev/sisfb.c
index aa93396a2e5..d693c9f0937 100644
--- a/sys/arch/loongson/dev/sisfb.c
+++ b/sys/arch/loongson/dev/sisfb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sisfb.c,v 1.1 2010/02/28 22:32:50 miod Exp $ */
+/* $OpenBSD: sisfb.c,v 1.2 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
@@ -349,7 +349,6 @@ sisfb_mmap(void *v, off_t offset, int prot)
{
struct sisfb_softc *sc = (struct sisfb_softc *)v;
struct rasops_info *ri = &sc->sc_fb->ri;
- paddr_t pa;
if ((offset & PAGE_MASK) != 0)
return -1;
@@ -365,8 +364,7 @@ sisfb_mmap(void *v, off_t offset, int prot)
if (((paddr_t)ri->ri_bits & PAGE_MASK) != 0)
return -1;
- pa = XKPHYS_TO_PHYS((paddr_t)ri->ri_bits) + offset;
- return atop(pa);
+ return XKPHYS_TO_PHYS((paddr_t)ri->ri_bits) + offset;
}
/*
diff --git a/sys/arch/loongson/dev/smfb.c b/sys/arch/loongson/dev/smfb.c
index 745f4d4846a..9530f335158 100644
--- a/sys/arch/loongson/dev/smfb.c
+++ b/sys/arch/loongson/dev/smfb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smfb.c,v 1.10 2010/08/31 10:24:46 pirofti Exp $ */
+/* $OpenBSD: smfb.c,v 1.11 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
@@ -303,7 +303,6 @@ smfb_mmap(void *v, off_t offset, int prot)
{
struct smfb_softc *sc = (struct smfb_softc *)v;
struct rasops_info *ri = &sc->sc_fb->ri;
- paddr_t pa;
if ((offset & PAGE_MASK) != 0)
return -1;
@@ -311,8 +310,7 @@ smfb_mmap(void *v, off_t offset, int prot)
if (offset < 0 || offset >= ri->ri_stride * ri->ri_height)
return -1;
- pa = XKPHYS_TO_PHYS((paddr_t)ri->ri_bits) + offset;
- return atop(pa);
+ return XKPHYS_TO_PHYS((paddr_t)ri->ri_bits) + offset;
}
void
diff --git a/sys/arch/loongson/loongson/bus_dma.c b/sys/arch/loongson/loongson/bus_dma.c
index fb729c55286..6f8a3724c86 100644
--- a/sys/arch/loongson/loongson/bus_dma.c
+++ b/sys/arch/loongson/loongson/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.5 2010/06/26 23:24:43 guenther Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.6 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -524,7 +524,7 @@ _dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, off_t off,
continue;
}
- return (atop((*t->_device_to_pa)(segs[i].ds_addr) + off));
+ return ((*t->_device_to_pa)(segs[i].ds_addr) + off);
}
/* Page not found. */
diff --git a/sys/arch/luna88k/dev/lunafb.c b/sys/arch/luna88k/dev/lunafb.c
index 3e2c157b4b2..3afd53a4ccb 100644
--- a/sys/arch/luna88k/dev/lunafb.c
+++ b/sys/arch/luna88k/dev/lunafb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lunafb.c,v 1.10 2009/09/05 14:09:35 miod Exp $ */
+/* $OpenBSD: lunafb.c,v 1.11 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: lunafb.c,v 1.7.6.1 2002/08/07 01:48:34 lukem Exp $ */
/*-
@@ -293,7 +293,7 @@ omfbmmap(v, offset, prot)
if (offset >= OMFB_SIZE || offset < 0)
return (-1);
- return atop(trunc_page(sc->sc_dc->dc_videobase) + offset);
+ return (trunc_page(sc->sc_dc->dc_videobase) + offset);
}
int
diff --git a/sys/arch/m68k/include/pmap_motorola.h b/sys/arch/m68k/include/pmap_motorola.h
index 8062704b872..67e1182b62e 100644
--- a/sys/arch/m68k/include/pmap_motorola.h
+++ b/sys/arch/m68k/include/pmap_motorola.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_motorola.h,v 1.20 2010/12/06 20:57:16 miod Exp $ */
+/* $OpenBSD: pmap_motorola.h,v 1.21 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
@@ -124,7 +124,6 @@ extern struct pv_entry *pv_table; /* array of entries, one per page */
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)
-#define pmap_phys_address(frame) ((paddr_t)ptoa(frame))
#define pmap_copy(dp,sp,d,l,s) do { /* nothing */ } while (0)
#define pmap_update(pmap) do { /* nothing (yet) */ } while (0)
diff --git a/sys/arch/m88k/include/pmap.h b/sys/arch/m88k/include/pmap.h
index 141061ac97b..c8059ad8f24 100644
--- a/sys/arch/m88k/include/pmap.h
+++ b/sys/arch/m88k/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.16 2010/11/18 21:21:38 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.17 2010/12/26 15:40:59 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1991 Carnegie Mellon University
@@ -53,7 +53,6 @@ extern apr_t default_apr;
#define pmap_kernel() (&kernel_pmap_store)
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)
-#define pmap_phys_address(frame) ((paddr_t)(ptoa(frame)))
#define pmap_copy(dp,sp,d,l,s) do { /* nothing */ } while (0)
#if !defined(M88110)
diff --git a/sys/arch/mac68k/dev/asc.c b/sys/arch/mac68k/dev/asc.c
index bdaf9638c16..e221a1675d3 100644
--- a/sys/arch/mac68k/dev/asc.c
+++ b/sys/arch/mac68k/dev/asc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asc.c,v 1.27 2010/05/25 01:59:12 deraadt Exp $ */
+/* $OpenBSD: asc.c,v 1.28 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: asc.c,v 1.20 1997/02/24 05:47:33 scottr Exp $ */
/*
@@ -287,7 +287,7 @@ ascmmap(dev, off, prot)
if (off >= 0 && off < MAC68K_ASC_LEN) {
(void)pmap_extract(pmap_kernel(),
(vaddr_t)bus_space_vaddr(sc->sc_tag, sc->sc_handle), &pa);
- return atop(pa + off);
+ return (pa + off);
}
return (-1);
diff --git a/sys/arch/mac68k/dev/macfb.c b/sys/arch/mac68k/dev/macfb.c
index a9219860533..e31e849da39 100644
--- a/sys/arch/mac68k/dev/macfb.c
+++ b/sys/arch/mac68k/dev/macfb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macfb.c,v 1.18 2006/11/29 12:13:54 miod Exp $ */
+/* $OpenBSD: macfb.c,v 1.19 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: macfb.c,v 1.11 2005/01/15 16:00:59 chs Exp $ */
/*
* Copyright (c) 1998 Matt DeBergalis
@@ -437,7 +437,7 @@ macfb_mmap(void *v, off_t offset, int prot)
if (offset >= 0 &&
offset < round_page(dc->dc_size))
- addr = atop(dc->dc_paddr + dc->dc_offset + offset);
+ addr = (dc->dc_paddr + dc->dc_offset + offset);
else
addr = (-1);
diff --git a/sys/arch/mac68k/mac68k/mem.c b/sys/arch/mac68k/mac68k/mem.c
index 6e5a8aecbe8..41d54f2a2ed 100644
--- a/sys/arch/mac68k/mac68k/mem.c
+++ b/sys/arch/mac68k/mac68k/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.21 2007/09/22 16:21:32 krw Exp $ */
+/* $OpenBSD: mem.c,v 1.22 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: mem.c,v 1.22 1999/03/27 00:30:07 mycroft Exp $ */
/*
@@ -228,7 +228,7 @@ mmmmap(dev, off, prot)
if ((u_int)off >= maxaddr)
return (-1);
- return (atop((u_int)off));
+ return ((paddr_t)off);
}
int
diff --git a/sys/arch/macppc/macppc/dma.c b/sys/arch/macppc/macppc/dma.c
index 2e064c35fef..3c56620a0b1 100644
--- a/sys/arch/macppc/macppc/dma.c
+++ b/sys/arch/macppc/macppc/dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dma.c,v 1.33 2010/06/26 23:24:43 guenther Exp $ */
+/* $OpenBSD: dma.c,v 1.34 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -540,7 +540,7 @@ _dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, off_t off,
continue;
}
- return (atop(segs[i].ds_addr + off));
+ return (segs[i].ds_addr + off);
}
/* Page not found. */
diff --git a/sys/arch/mips64/include/pmap.h b/sys/arch/mips64/include/pmap.h
index 2bf522895f7..ddc59007d3d 100644
--- a/sys/arch/mips64/include/pmap.h
+++ b/sys/arch/mips64/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.23 2010/12/06 20:57:17 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.24 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
@@ -120,7 +120,6 @@ extern struct pmap *const kernel_pmap_ptr;
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)
#define pmap_kernel() (kernel_pmap_ptr)
-#define pmap_phys_address(ppn) ptoa(ppn)
#define PMAP_STEAL_MEMORY /* Enable 'stealing' during boot */
diff --git a/sys/arch/mvme68k/dev/flash.c b/sys/arch/mvme68k/dev/flash.c
index 91dccfb1fbf..d0be34b85f7 100644
--- a/sys/arch/mvme68k/dev/flash.c
+++ b/sys/arch/mvme68k/dev/flash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: flash.c,v 1.21 2010/06/27 22:04:03 miod Exp $ */
+/* $OpenBSD: flash.c,v 1.22 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -499,5 +499,5 @@ flashmmap(dev, off, prot)
/* allow access only in RAM */
if (off < 0 || off >= round_page(sc->sc_len))
return (-1);
- return (atop(sc->sc_paddr + off));
+ return (sc->sc_paddr + off);
}
diff --git a/sys/arch/mvme68k/dev/nvram.c b/sys/arch/mvme68k/dev/nvram.c
index 00bebf8208b..38e548ca4aa 100644
--- a/sys/arch/mvme68k/dev/nvram.c
+++ b/sys/arch/mvme68k/dev/nvram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvram.c,v 1.20 2009/03/01 22:08:13 miod Exp $ */
+/* $OpenBSD: nvram.c,v 1.21 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -489,5 +489,5 @@ nvrammmap(dev, off, prot)
/* allow access only in RAM */
if (off < 0 || off >= round_page(sc->sc_len))
return (-1);
- return (atop(sc->sc_paddr + off));
+ return (sc->sc_paddr + off);
}
diff --git a/sys/arch/mvme68k/dev/sram.c b/sys/arch/mvme68k/dev/sram.c
index 90460659893..49aedc5d52a 100644
--- a/sys/arch/mvme68k/dev/sram.c
+++ b/sys/arch/mvme68k/dev/sram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sram.c,v 1.19 2009/03/01 21:37:41 miod Exp $ */
+/* $OpenBSD: sram.c,v 1.20 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -219,5 +219,5 @@ srammmap(dev, off, prot)
/* allow access only in RAM */
if (off < 0 || off >= round_page(sc->sc_len))
return (-1);
- return (atop(sc->sc_paddr + off));
+ return (sc->sc_paddr + off);
}
diff --git a/sys/arch/mvme68k/dev/vmel.c b/sys/arch/mvme68k/dev/vmel.c
index 1f123c1f3a2..4ea722eb156 100644
--- a/sys/arch/mvme68k/dev/vmel.c
+++ b/sys/arch/mvme68k/dev/vmel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmel.c,v 1.16 2010/06/27 22:04:03 miod Exp $ */
+/* $OpenBSD: vmel.c,v 1.17 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -171,5 +171,5 @@ vmelmmap(dev, off, prot)
#endif
if (pa == NULL)
return (-1);
- return (atop(pa));
+ return (pa);
}
diff --git a/sys/arch/mvme68k/dev/vmes.c b/sys/arch/mvme68k/dev/vmes.c
index f7019b2b2ea..e8743e18d10 100644
--- a/sys/arch/mvme68k/dev/vmes.c
+++ b/sys/arch/mvme68k/dev/vmes.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmes.c,v 1.16 2010/06/27 12:41:23 miod Exp $ */
+/* $OpenBSD: vmes.c,v 1.17 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -168,5 +168,5 @@ vmesmmap(dev, off, prot)
pa = vmepmap(sc->sc_vme, (vaddr_t)off, NBPG, BUS_VMES);
if (pa == 0)
return (-1);
- return (atop(pa));
+ return (pa);
}
diff --git a/sys/arch/mvme68k/mvme68k/bus_dma.c b/sys/arch/mvme68k/mvme68k/bus_dma.c
index ce6662712bb..c556f77ddbf 100644
--- a/sys/arch/mvme68k/mvme68k/bus_dma.c
+++ b/sys/arch/mvme68k/mvme68k/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.7 2010/06/26 23:24:43 guenther Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.8 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.2 2001/06/10 02:31:25 briggs Exp $ */
/*-
@@ -605,7 +605,7 @@ bus_dmamem_mmap(t, segs, nsegs, off, prot, flags)
continue;
}
- return (atop(segs[i].ds_addr + off));
+ return (segs[i].ds_addr + off);
}
/* Page not found. */
diff --git a/sys/arch/mvme68k/mvme68k/mem.c b/sys/arch/mvme68k/mvme68k/mem.c
index 84e26b37b1c..26339c33602 100644
--- a/sys/arch/mvme68k/mvme68k/mem.c
+++ b/sys/arch/mvme68k/mvme68k/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.24 2006/05/19 22:51:09 miod Exp $ */
+/* $OpenBSD: mem.c,v 1.25 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -247,7 +247,7 @@ mmmmap(dev, off, prot)
*/
if ((unsigned)off >= 0xFFFFFFFC || (unsigned)off < NBPG)
return (-1);
- return (atop(off));
+ return (off);
}
/*ARGSUSED*/
diff --git a/sys/arch/mvme88k/dev/nvram.c b/sys/arch/mvme88k/dev/nvram.c
index 03f0c16edf2..70527843a58 100644
--- a/sys/arch/mvme88k/dev/nvram.c
+++ b/sys/arch/mvme88k/dev/nvram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvram.c,v 1.32 2009/03/29 21:53:52 sthen Exp $ */
+/* $OpenBSD: nvram.c,v 1.33 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -514,7 +514,7 @@ nvrammmap(dev, off, prot)
/* allow access only in RAM */
if (off < 0 || off >= round_page(sc->sc_len))
return (-1);
- return (atop(sc->sc_base + off));
+ return (sc->sc_base + off);
}
#ifdef MVME188
diff --git a/sys/arch/mvme88k/dev/sram.c b/sys/arch/mvme88k/dev/sram.c
index 1a4b752395a..9db441b15bb 100644
--- a/sys/arch/mvme88k/dev/sram.c
+++ b/sys/arch/mvme88k/dev/sram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sram.c,v 1.20 2009/03/29 21:53:52 sthen Exp $ */
+/* $OpenBSD: sram.c,v 1.21 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -173,5 +173,5 @@ srammmap(dev, off, prot)
/* allow access only in RAM */
if (off < 0 || off >= round_page(sc->sc_len))
return (-1);
- return (atop(sc->sc_base + off));
+ return (sc->sc_base + off);
}
diff --git a/sys/arch/mvme88k/dev/vmel.c b/sys/arch/mvme88k/dev/vmel.c
index 5af6bde21c1..c7138828ceb 100644
--- a/sys/arch/mvme88k/dev/vmel.c
+++ b/sys/arch/mvme88k/dev/vmel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmel.c,v 1.18 2010/06/27 12:41:23 miod Exp $ */
+/* $OpenBSD: vmel.c,v 1.19 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -166,5 +166,5 @@ vmelmmap(dev, off, prot)
#endif
if (pa == NULL)
return (-1);
- return (atop(pa));
+ return (pa);
}
diff --git a/sys/arch/mvme88k/dev/vmes.c b/sys/arch/mvme88k/dev/vmes.c
index d8f6faa5575..80bbe54b52c 100644
--- a/sys/arch/mvme88k/dev/vmes.c
+++ b/sys/arch/mvme88k/dev/vmes.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmes.c,v 1.21 2010/06/27 12:41:23 miod Exp $ */
+/* $OpenBSD: vmes.c,v 1.22 2010/12/26 15:40:59 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -171,5 +171,5 @@ vmesmmap(dev, off, prot)
#endif
if (pa == NULL)
return (-1);
- return (atop(pa));
+ return (pa);
}
diff --git a/sys/arch/mvme88k/mvme88k/bus_dma.c b/sys/arch/mvme88k/mvme88k/bus_dma.c
index 1cff01753b7..b08e5e59f73 100644
--- a/sys/arch/mvme88k/mvme88k/bus_dma.c
+++ b/sys/arch/mvme88k/mvme88k/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.15 2010/06/26 23:24:44 guenther Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.16 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.2 2001/06/10 02:31:25 briggs Exp $ */
/*-
@@ -608,7 +608,7 @@ bus_dmamem_mmap(t, segs, nsegs, off, prot, flags)
continue;
}
- return (atop(segs[i].ds_addr + off));
+ return (segs[i].ds_addr + off);
}
/* Page not found. */
diff --git a/sys/arch/mvmeppc/mvmeppc/bus_dma.c b/sys/arch/mvmeppc/mvmeppc/bus_dma.c
index 85c38e3ac0b..839b4c2515c 100644
--- a/sys/arch/mvmeppc/mvmeppc/bus_dma.c
+++ b/sys/arch/mvmeppc/mvmeppc/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.27 2010/06/26 23:24:44 guenther Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.28 2010/12/26 15:40:59 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.2 2001/06/10 02:31:25 briggs Exp $ */
/*-
@@ -577,7 +577,7 @@ _bus_dmamem_mmap(t, segs, nsegs, off, prot, flags)
continue;
}
- return (atop(PCI_MEM_TO_PHYS(segs[i].ds_addr) + off));
+ return (PCI_MEM_TO_PHYS(segs[i].ds_addr) + off);
}
/* Page not found. */
diff --git a/sys/arch/octeon/octeon/bus_dma.c b/sys/arch/octeon/octeon/bus_dma.c
index 76201128876..fa3f5a95748 100644
--- a/sys/arch/octeon/octeon/bus_dma.c
+++ b/sys/arch/octeon/octeon/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.1 2010/09/20 06:32:30 syuu Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.2 2010/12/26 15:41:00 miod Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -529,7 +529,7 @@ _dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, off_t off,
continue;
}
- return (atop((*t->_device_to_pa)(segs[i].ds_addr) + off));
+ return ((*t->_device_to_pa)(segs[i].ds_addr) + off);
}
/* Page not found. */
diff --git a/sys/arch/powerpc/include/pmap.h b/sys/arch/powerpc/include/pmap.h
index b98247c4fe2..6c48972175e 100644
--- a/sys/arch/powerpc/include/pmap.h
+++ b/sys/arch/powerpc/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.46 2010/11/18 21:21:38 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.47 2010/12/26 15:41:00 miod Exp $ */
/* $NetBSD: pmap.h,v 1.1 1996/09/30 16:34:29 ws Exp $ */
/*-
@@ -111,7 +111,6 @@ boolean_t pteclrbits(struct vm_page *pg, u_int mask, u_int clear);
(pteclrbits((page), PG_PMAP_REF, FALSE))
#define pmap_unwire(pm, va)
-#define pmap_phys_address(x) (x)
#define pmap_update(pmap) /* nothing (yet) */
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
diff --git a/sys/arch/sgi/dev/gbe.c b/sys/arch/sgi/dev/gbe.c
index 766aa3dc1cd..f4ab42da94b 100644
--- a/sys/arch/sgi/dev/gbe.c
+++ b/sys/arch/sgi/dev/gbe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gbe.c,v 1.12 2010/03/08 20:54:42 miod Exp $ */
+/* $OpenBSD: gbe.c,v 1.13 2010/12/26 15:41:00 miod Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Joel Sing <jsing@openbsd.org>
@@ -917,7 +917,7 @@ gbe_mmap(void *v, off_t offset, int protection)
paddr_t pa;
if (offset >= 0 && offset < screen->fb_size)
- pa = atop(screen->fb_phys + offset);
+ pa = screen->fb_phys + offset;
else
pa = -1;
diff --git a/sys/arch/sgi/sgi/bus_dma.c b/sys/arch/sgi/sgi/bus_dma.c
index c7e7ad201ef..49879ab4d89 100644
--- a/sys/arch/sgi/sgi/bus_dma.c
+++ b/sys/arch/sgi/sgi/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.19 2010/06/26 23:24:44 guenther Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.20 2010/12/26 15:41:00 miod Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -529,7 +529,7 @@ _dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, off_t off,
continue;
}
- return (atop((*t->_device_to_pa)(segs[i].ds_addr) + off));
+ return ((*t->_device_to_pa)(segs[i].ds_addr) + off);
}
/* Page not found. */
diff --git a/sys/arch/sh/include/pmap.h b/sys/arch/sh/include/pmap.h
index e4d031f149b..55f5b7ff697 100644
--- a/sys/arch/sh/include/pmap.h
+++ b/sys/arch/sh/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.8 2010/12/06 20:57:17 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.9 2010/12/26 15:41:00 miod Exp $ */
/* $NetBSD: pmap.h,v 1.28 2006/04/10 23:12:11 uwe Exp $ */
/*-
@@ -66,7 +66,6 @@ void pmap_bootstrap(void);
#define pmap_collect(pmap) do { /* nothing */ } while (0)
#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
-#define pmap_phys_address(frame) ((paddr_t)(ptoa(frame)))
/* ARGSUSED */
static __inline void
diff --git a/sys/arch/sh/sh/mem.c b/sys/arch/sh/sh/mem.c
index 606376cb231..85a4e37e673 100644
--- a/sys/arch/sh/sh/mem.c
+++ b/sys/arch/sh/sh/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.3 2007/10/06 23:50:54 krw Exp $ */
+/* $OpenBSD: mem.c,v 1.4 2010/12/26 15:41:00 miod Exp $ */
/* $NetBSD: mem.c,v 1.21 2006/07/23 22:06:07 ad Exp $ */
/*
@@ -219,7 +219,7 @@ mmmmap(dev_t dev, off_t off, int prot)
if (__mm_mem_addr((paddr_t)off) == FALSE && suser(p, 0) != 0)
return (-1);
- return (atop((paddr_t)off));
+ return ((paddr_t)off);
}
/*ARGSUSED*/
diff --git a/sys/arch/socppc/socppc/dma.c b/sys/arch/socppc/socppc/dma.c
index e3f184996af..856d56cfbcf 100644
--- a/sys/arch/socppc/socppc/dma.c
+++ b/sys/arch/socppc/socppc/dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dma.c,v 1.7 2010/06/26 23:24:44 guenther Exp $ */
+/* $OpenBSD: dma.c,v 1.8 2010/12/26 15:41:00 miod Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -540,7 +540,7 @@ _dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, off_t off,
continue;
}
- return (atop(segs[i].ds_addr + off));
+ return (segs[i].ds_addr + off);
}
/* Page not found. */
diff --git a/sys/arch/solbourne/include/pmap.h b/sys/arch/solbourne/include/pmap.h
index 8d00def393d..0e20888aba9 100644
--- a/sys/arch/solbourne/include/pmap.h
+++ b/sys/arch/solbourne/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.4 2010/12/06 20:57:18 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.5 2010/12/26 15:41:00 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat
*
@@ -68,7 +68,6 @@ extern struct pmap kernel_pmap_store;
#define pmap_copy(a,b,c,d,e) do { /* nothing */ } while (0)
#define pmap_deactivate(p) do { /* nothing */ } while (0)
#define pmap_kernel() (&kernel_pmap_store)
-#define pmap_phys_address(frame) ptoa(frame)
#define pmap_resident_count(p) ((p)->pm_stats.resident_count)
#define pmap_update(p) do { /* nothing */ } while (0)
#define pmap_wired_count(p) ((p)->pm_stats.wired_count)
diff --git a/sys/arch/sparc/include/pmap.h b/sys/arch/sparc/include/pmap.h
index 2c3c3968ff2..b14264f11f8 100644
--- a/sys/arch/sparc/include/pmap.h
+++ b/sys/arch/sparc/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.49 2010/12/06 20:57:18 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.50 2010/12/26 15:41:00 miod Exp $ */
/* $NetBSD: pmap.h,v 1.30 1997/08/04 20:00:47 pk Exp $ */
/*
@@ -297,7 +297,6 @@ void pmap_writetext(unsigned char *, int);
#define pmap_collect(pm) do { /* nothing */ } while (0)
#define pmap_copy(DP,SP,D,L,S) do { /* nothing */ } while (0)
#define pmap_deactivate(p) do { /* nothing */ } while (0)
-#define pmap_phys_address(frame) (frame)
#define pmap_proc_iflush(p,va,len) do { /* nothing */ } while (0)
#define pmap_update(pm) do { /* nothing */ } while (0)
diff --git a/sys/arch/sparc64/include/pmap.h b/sys/arch/sparc64/include/pmap.h
index e347dc139d9..5be76a4ba47 100644
--- a/sys/arch/sparc64/include/pmap.h
+++ b/sys/arch/sparc64/include/pmap.h
@@ -161,7 +161,6 @@ extern struct pmap kernel_pmap_;
/* int pmap_change_wiring(pmap_t pm, vaddr_t va, boolean_t wired); */
#define pmap_resident_count(pm) ((pm)->pm_stats.resident_count)
-#define pmap_phys_address(x) (x)
#define pmap_update(pm) /* nothing (yet) */
#define pmap_proc_iflush(p,va,len) /* nothing */
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c
index 04b8206257c..4a33a825131 100644
--- a/sys/arch/sparc64/sparc64/machdep.c
+++ b/sys/arch/sparc64/sparc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.126 2010/11/27 19:41:48 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.127 2010/12/26 15:41:00 miod Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
@@ -1573,7 +1573,7 @@ _bus_dmamem_mmap(t, t0, segs, nsegs, off, prot, flags)
continue;
}
- return (atop(segs[i].ds_addr + off));
+ return (segs[i].ds_addr + off);
}
/* Page not found. */
diff --git a/sys/arch/vax/include/pmap.h b/sys/arch/vax/include/pmap.h
index 79088650d0e..dfa1568180d 100644
--- a/sys/arch/vax/include/pmap.h
+++ b/sys/arch/vax/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.30 2008/08/30 20:45:31 martin Exp $ */
+/* $OpenBSD: pmap.h,v 1.31 2010/12/26 15:41:00 miod Exp $ */
/* $NetBSD: pmap.h,v 1.37 1999/08/01 13:48:07 ragge Exp $ */
/*
@@ -113,7 +113,6 @@ extern struct pmap kernel_pmap_store;
*/
/* Routines that are best to define as macros */
-#define pmap_phys_address(phys) ((u_int)(phys) << PGSHIFT)
#define pmap_copy(a,b,c,d,e) /* Dont do anything */
#define pmap_update(pm) /* nothing */
#define pmap_collect(pmap) /* No need so far */
diff --git a/sys/arch/vax/vax/bus_dma.c b/sys/arch/vax/vax/bus_dma.c
index b5984fe383d..c2302f4278f 100644
--- a/sys/arch/vax/vax/bus_dma.c
+++ b/sys/arch/vax/vax/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.25 2010/11/20 20:33:24 miod Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.26 2010/12/26 15:41:00 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.5 1999/11/13 00:32:20 thorpej Exp $ */
/*-
@@ -536,7 +536,7 @@ _bus_dmamem_mmap(t, segs, nsegs, off, prot, flags)
continue;
}
- return (atop(segs[i].ds_addr + off));
+ return (segs[i].ds_addr + off);
}
/* Page not found. */
diff --git a/sys/arch/vax/vsa/lcg.c b/sys/arch/vax/vsa/lcg.c
index d2cbecb56f8..a714b10edae 100644
--- a/sys/arch/vax/vsa/lcg.c
+++ b/sys/arch/vax/vsa/lcg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lcg.c,v 1.14 2008/12/21 21:39:50 miod Exp $ */
+/* $OpenBSD: lcg.c,v 1.15 2010/12/26 15:41:00 miod Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
@@ -491,7 +491,7 @@ lcg_mmap(void *v, off_t offset, int prot)
if (offset >= ss->ss_fbsize || offset < 0)
return (-1);
- return (LCG_FB_ADDR + offset) >> PGSHIFT;
+ return (LCG_FB_ADDR + offset);
}
int
diff --git a/sys/arch/vax/vsa/lcspx.c b/sys/arch/vax/vsa/lcspx.c
index 2298006bdcc..6e35247e5d3 100644
--- a/sys/arch/vax/vsa/lcspx.c
+++ b/sys/arch/vax/vsa/lcspx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lcspx.c,v 1.15 2008/12/21 21:39:50 miod Exp $ */
+/* $OpenBSD: lcspx.c,v 1.16 2010/12/26 15:41:00 miod Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
@@ -485,7 +485,7 @@ lcspx_mmap(void *v, off_t offset, int prot)
if (offset >= ss->ss_fbsize || offset < 0)
return (-1);
- return (LCSPX_FB_ADDR + offset) >> PGSHIFT;
+ return (LCSPX_FB_ADDR + offset);
}
int
diff --git a/sys/arch/vax/vsa/smg.c b/sys/arch/vax/vsa/smg.c
index 27d50a88095..d8cfec8c4b1 100644
--- a/sys/arch/vax/vsa/smg.c
+++ b/sys/arch/vax/vsa/smg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smg.c,v 1.23 2009/09/05 14:09:35 miod Exp $ */
+/* $OpenBSD: smg.c,v 1.24 2010/12/26 15:41:00 miod Exp $ */
/* $NetBSD: smg.c,v 1.21 2000/03/23 06:46:44 thorpej Exp $ */
/*
* Copyright (c) 2006, Miodrag Vallat
@@ -435,7 +435,7 @@ smg_mmap(void *v, off_t offset, int prot)
if (offset >= SMSIZE || offset < 0)
return (-1);
- return (SMADDR + offset) >> PGSHIFT;
+ return (SMADDR + offset);
}
int