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 | |
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')
-rw-r--r-- | sys/arch/hppa/gsc/gscbus.c | 6 | ||||
-rw-r--r-- | sys/arch/hppa/include/bus.h | 6 | ||||
-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 | ||||
-rw-r--r-- | sys/arch/powerpc/include/bus.h | 6 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/dma.c | 8 | ||||
-rw-r--r-- | sys/arch/vax/include/bus.h | 10 |
8 files changed, 36 insertions, 30 deletions
diff --git a/sys/arch/hppa/gsc/gscbus.c b/sys/arch/hppa/gsc/gscbus.c index 0bfd4961824..3522032b0a2 100644 --- a/sys/arch/hppa/gsc/gscbus.c +++ b/sys/arch/hppa/gsc/gscbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gscbus.c,v 1.11 2001/03/22 23:29:27 mickey Exp $ */ +/* $OpenBSD: gscbus.c,v 1.12 2001/07/30 14:15:59 art Exp $ */ /* * Copyright (c) 1998 Michael Shalayeff @@ -114,7 +114,7 @@ void gsc_dmamem_free __P((void *, bus_dma_segment_t *, int)); int gsc_dmamem_map __P((void *, bus_dma_segment_t *, int, size_t, caddr_t *, int)); void gsc_dmamem_unmap __P((void *, caddr_t, size_t)); -int gsc_dmamem_mmap __P((void *, bus_dma_segment_t *, int, int, int, int)); +paddr_t gsc_dmamem_mmap __P((void *, bus_dma_segment_t *, int, off_t, int, int)); int gscmatch(parent, cfdata, aux) @@ -398,7 +398,7 @@ gsc_dmamem_unmap(v, kva, size) } -int +paddr_t gsc_dmamem_mmap(v, segs, nsegs, off, prot, flags) void *v; bus_dma_segment_t *segs; diff --git a/sys/arch/hppa/include/bus.h b/sys/arch/hppa/include/bus.h index 809b6f03310..1139bb4c994 100644 --- a/sys/arch/hppa/include/bus.h +++ b/sys/arch/hppa/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.12 2000/06/15 19:05:09 mickey Exp $ */ +/* $OpenBSD: bus.h,v 1.13 2001/07/30 14:15:59 art Exp $ */ /* * Copyright (c) 1998,1999 Michael Shalayeff @@ -356,8 +356,8 @@ struct hppa_bus_dma_tag { int (*_dmamem_map) __P((void *, bus_dma_segment_t *, int, size_t, caddr_t *, int)); void (*_dmamem_unmap) __P((void *, caddr_t, size_t)); - int (*_dmamem_mmap) __P((void *, bus_dma_segment_t *, - int, int, int, int)); + paddr_t (*_dmamem_mmap) __P((void *, bus_dma_segment_t *, + int, off_t, int, int)); }; #define bus_dmamap_create(t, s, n, m, b, f, p) \ 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)); diff --git a/sys/arch/powerpc/include/bus.h b/sys/arch/powerpc/include/bus.h index f4441fe23ef..9946b120faa 100644 --- a/sys/arch/powerpc/include/bus.h +++ b/sys/arch/powerpc/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.16 2001/07/09 02:14:05 mickey Exp $ */ +/* $OpenBSD: bus.h,v 1.17 2001/07/30 14:16:00 art Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom. All rights reserved. @@ -451,8 +451,8 @@ struct powerpc_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) \ diff --git a/sys/arch/powerpc/powerpc/dma.c b/sys/arch/powerpc/powerpc/dma.c index f9b8bfae9c7..b9fbe2cf6f0 100644 --- a/sys/arch/powerpc/powerpc/dma.c +++ b/sys/arch/powerpc/powerpc/dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dma.c,v 1.7 2001/07/25 13:25:32 art Exp $ */ +/* $OpenBSD: dma.c,v 1.8 2001/07/30 14:16:00 art Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -406,11 +406,13 @@ _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 _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/vax/include/bus.h b/sys/arch/vax/include/bus.h index 37e0952eefc..9d2aefbde17 100644 --- a/sys/arch/vax/include/bus.h +++ b/sys/arch/vax/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.2 2000/10/09 23:11:56 bjc Exp $ */ +/* $OpenBSD: bus.h,v 1.3 2001/07/30 14:16:00 art Exp $ */ /* $NetBSD: bus.h,v 1.14 2000/06/26 04:56:13 simonb Exp $ */ /*- @@ -979,8 +979,8 @@ struct vax_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 vaxbus_dma_get_tag(t, b) \ @@ -1072,8 +1072,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)); #endif /* _VAX_BUS_DMA_PRIVATE */ #endif /* _VAX_BUS_H_ */ |