diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-07-30 14:16:01 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-07-30 14:16:01 +0000 |
commit | 6dddcb3649b42a72fb6e1f90a4d66dd0f4bcd482 (patch) | |
tree | 387f92f0878112dc277af9725f0e35183769916e /sys/arch/i386 | |
parent | 7e30b92f64324e3a7561a1bba30cf003e4037d76 (diff) |
Change:
int bus_dmamem_mmap(bus_dma_tag_t, bus_dma_segment_t, int, int, int, int);
to:
paddr_t bus_dmamem_mmap(bus_dma_tag_t, bus_dma_segment_t, int, int, off_t, int);
To allow mmaping offsets larger than INT_MAX. And to simply make more sense.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 8 | ||||
-rw-r--r-- | sys/arch/i386/include/bus.h | 10 | ||||
-rw-r--r-- | sys/arch/i386/isa/isa_machdep.c | 12 |
3 files changed, 17 insertions, 13 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index f67604aa7da..1d357e0de8d 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.170 2001/07/25 13:25:32 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.171 2001/07/30 14:15:59 art Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -3122,11 +3122,13 @@ _bus_dmamem_unmap(t, kva, size) * Common functin for mmap(2)'ing DMA-safe memory. May be called by * bus-specific DMA mmap(2)'ing functions. */ -int +paddr_t _bus_dmamem_mmap(t, segs, nsegs, off, prot, flags) bus_dma_tag_t t; bus_dma_segment_t *segs; - int nsegs, off, prot, flags; + int nsegs; + off_t off; + int prot, flags; { int i; diff --git a/sys/arch/i386/include/bus.h b/sys/arch/i386/include/bus.h index 2c26d8d0b1e..c04d967e0cd 100644 --- a/sys/arch/i386/include/bus.h +++ b/sys/arch/i386/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.29 2001/06/25 23:03:43 mickey Exp $ */ +/* $OpenBSD: bus.h,v 1.30 2001/07/30 14:15:59 art Exp $ */ /* $NetBSD: bus.h,v 1.6 1996/11/10 03:19:25 thorpej Exp $ */ /*- @@ -811,8 +811,8 @@ struct i386_bus_dma_tag { int (*_dmamem_map) __P((bus_dma_tag_t, bus_dma_segment_t *, int, size_t, caddr_t *, int)); void (*_dmamem_unmap) __P((bus_dma_tag_t, caddr_t, size_t)); - int (*_dmamem_mmap) __P((bus_dma_tag_t, bus_dma_segment_t *, - int, int, int, int)); + paddr_t (*_dmamem_mmap) __P((bus_dma_tag_t, bus_dma_segment_t *, + int, off_t, int, int)); }; #define bus_dmamap_create(t, s, n, m, b, f, p) \ @@ -893,8 +893,8 @@ int _bus_dmamem_map __P((bus_dma_tag_t tag, bus_dma_segment_t *segs, int nsegs, size_t size, caddr_t *kvap, int flags)); void _bus_dmamem_unmap __P((bus_dma_tag_t tag, caddr_t kva, size_t size)); -int _bus_dmamem_mmap __P((bus_dma_tag_t tag, bus_dma_segment_t *segs, - int nsegs, int off, int prot, int flags)); +paddr_t _bus_dmamem_mmap __P((bus_dma_tag_t tag, bus_dma_segment_t *segs, + int nsegs, off_t off, int prot, int flags)); int _bus_dmamem_alloc_range __P((bus_dma_tag_t tag, bus_size_t size, bus_size_t alignment, bus_size_t boundary, diff --git a/sys/arch/i386/isa/isa_machdep.c b/sys/arch/i386/isa/isa_machdep.c index afb1ae510e1..345633fc772 100644 --- a/sys/arch/i386/isa/isa_machdep.c +++ b/sys/arch/i386/isa/isa_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isa_machdep.c,v 1.37 2001/06/25 00:43:12 mickey Exp $ */ +/* $OpenBSD: isa_machdep.c,v 1.38 2001/07/30 14:15:59 art Exp $ */ /* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */ #define ISA_DMA_STATS @@ -178,8 +178,8 @@ void _isa_bus_dmamem_free __P((bus_dma_tag_t, int _isa_bus_dmamem_map __P((bus_dma_tag_t, bus_dma_segment_t *, int, size_t, caddr_t *, int)); void _isa_bus_dmamem_unmap __P((bus_dma_tag_t, caddr_t, size_t)); -int _isa_bus_dmamem_mmap __P((bus_dma_tag_t, bus_dma_segment_t *, - int, int, int, int)); +paddr_t _isa_bus_dmamem_mmap __P((bus_dma_tag_t, bus_dma_segment_t *, + int, off_t, int, int)); int _isa_dma_check_buffer __P((void *, bus_size_t, int, bus_size_t, struct proc *)); @@ -1000,11 +1000,13 @@ _isa_bus_dmamem_unmap(t, kva, size) /* * mmap(2) ISA DMA-safe memory. */ -int +paddr_t _isa_bus_dmamem_mmap(t, segs, nsegs, off, prot, flags) bus_dma_tag_t t; bus_dma_segment_t *segs; - int nsegs, off, prot, flags; + int nsegs; + off_t off; + int prot, flags; { return (_bus_dmamem_mmap(t, segs, nsegs, off, prot, flags)); |