diff options
Diffstat (limited to 'sys/arch/sparc64/sparc64/machdep.c')
-rw-r--r-- | sys/arch/sparc64/sparc64/machdep.c | 113 |
1 files changed, 30 insertions, 83 deletions
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c index 2c7e3cd406e..f8c896c7043 100644 --- a/sys/arch/sparc64/sparc64/machdep.c +++ b/sys/arch/sparc64/sparc64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.200 2021/10/06 15:46:03 claudio Exp $ */ +/* $OpenBSD: machdep.c,v 1.201 2022/10/16 01:22:39 jsg Exp $ */ /* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */ /*- @@ -262,11 +262,8 @@ cpu_startup(void) /* ARGSUSED */ void -setregs(p, pack, stack, retval) - struct proc *p; - struct exec_package *pack; - vaddr_t stack; - register_t *retval; +setregs(struct proc *p, struct exec_package *pack, vaddr_t stack, + register_t *retval) { struct trapframe64 *tf = p->p_md.md_tf; int64_t tstate; @@ -715,8 +712,7 @@ dumpconf(void) static vaddr_t dumpspace; caddr_t -reserve_dumppages(p) - caddr_t p; +reserve_dumppages(caddr_t p) { dumpspace = (vaddr_t)p; @@ -841,8 +837,7 @@ void trapdump(struct trapframe64*); * dump out a trapframe. */ void -trapdump(tf) - struct trapframe64* tf; +trapdump(struct trapframe64* tf) { printf("TRAPFRAME: tstate=%llx pc=%llx npc=%llx y=%x\n", (unsigned long long)tf->tf_tstate, (unsigned long long)tf->tf_pc, @@ -911,14 +906,9 @@ stackdump(void) * DMA map creation functions. */ int -_bus_dmamap_create(t, t0, size, nsegments, maxsegsz, boundary, flags, dmamp) - bus_dma_tag_t t, t0; - bus_size_t size; - int nsegments; - bus_size_t maxsegsz; - bus_size_t boundary; - int flags; - bus_dmamap_t *dmamp; +_bus_dmamap_create(bus_dma_tag_t t, bus_dma_tag_t t0, bus_size_t size, + int nsegments, bus_size_t maxsegsz, bus_size_t boundary, int flags, + bus_dmamap_t *dmamp) { struct sparc_bus_dmamap *map; void *mapstore; @@ -961,10 +951,7 @@ _bus_dmamap_create(t, t0, size, nsegments, maxsegsz, boundary, flags, dmamp) * DMA map destruction functions. */ void -_bus_dmamap_destroy(t, t0, map) - bus_dma_tag_t t, t0; - bus_dmamap_t map; - +_bus_dmamap_destroy(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map) { /* * Unload the map if it is still loaded. This is required @@ -991,13 +978,8 @@ _bus_dmamap_destroy(t, t0, map) * bypass DVMA. */ int -_bus_dmamap_load(t, t0, map, buf, buflen, p, flags) - bus_dma_tag_t t, t0; - bus_dmamap_t map; - void *buf; - bus_size_t buflen; - struct proc *p; - int flags; +_bus_dmamap_load(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, void *buf, + bus_size_t buflen, struct proc *p, int flags) { bus_addr_t lastaddr; int seg, error; @@ -1025,11 +1007,8 @@ _bus_dmamap_load(t, t0, map, buf, buflen, p, flags) * Like _bus_dmamap_load(), but for mbufs. */ int -_bus_dmamap_load_mbuf(t, t0, map, m, flags) - bus_dma_tag_t t, t0; - bus_dmamap_t map; - struct mbuf *m; - int flags; +_bus_dmamap_load_mbuf(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, + struct mbuf *m, int flags) { bus_dma_segment_t segs[MAX_DMA_SEGS]; int i; @@ -1105,11 +1084,8 @@ _bus_dmamap_load_mbuf(t, t0, map, m, flags) * Like _bus_dmamap_load(), but for uios. */ int -_bus_dmamap_load_uio(t, t0, map, uio, flags) - bus_dma_tag_t t, t0; - bus_dmamap_t map; - struct uio *uio; - int flags; +_bus_dmamap_load_uio(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, + struct uio *uio, int flags) { /* * XXXXXXX The problem with this routine is that it needs to @@ -1184,13 +1160,8 @@ _bus_dmamap_load_uio(t, t0, map, uio, flags) * bus_dmamem_alloc(). */ int -_bus_dmamap_load_raw(t, t0, map, segs, nsegs, size, flags) - bus_dma_tag_t t, t0; - bus_dmamap_t map; - bus_dma_segment_t *segs; - int nsegs; - bus_size_t size; - int flags; +_bus_dmamap_load_raw(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, + bus_dma_segment_t *segs, int nsegs, bus_size_t size, int flags) { panic("_bus_dmamap_load_raw: not implemented"); @@ -1282,9 +1253,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t, bus_dmamap_t map, void *buf, * bus-specific DMA map unload functions. */ void -_bus_dmamap_unload(t, t0, map) - bus_dma_tag_t t, t0; - bus_dmamap_t map; +_bus_dmamap_unload(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map) { /* Mark the mappings as invalid. */ map->dm_mapsize = 0; @@ -1297,12 +1266,8 @@ _bus_dmamap_unload(t, t0, map) * by bus-specific DMA map synchronization functions. */ void -_bus_dmamap_sync(t, t0, map, offset, len, ops) - bus_dma_tag_t t, t0; - bus_dmamap_t map; - bus_addr_t offset; - bus_size_t len; - int ops; +_bus_dmamap_sync(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dmamap_t map, + bus_addr_t offset, bus_size_t len, int ops) { if (ops & (BUS_DMASYNC_PREWRITE | BUS_DMASYNC_POSTREAD)) __membar("#MemIssue"); @@ -1313,13 +1278,9 @@ _bus_dmamap_sync(t, t0, map, offset, len, ops) * by bus-specific DMA memory allocation functions. */ int -_bus_dmamem_alloc(t, t0, size, alignment, boundary, segs, nsegs, rsegs, flags) - bus_dma_tag_t t, t0; - bus_size_t size, alignment, boundary; - bus_dma_segment_t *segs; - int nsegs; - int *rsegs; - int flags; +_bus_dmamem_alloc(bus_dma_tag_t t, bus_dma_tag_t t0, bus_size_t size, + bus_size_t alignment, bus_size_t boundary, bus_dma_segment_t *segs, + int nsegs, int *rsegs, int flags) { struct pglist *mlist; int error, plaflag; @@ -1380,10 +1341,8 @@ _bus_dmamem_alloc(t, t0, size, alignment, boundary, segs, nsegs, rsegs, flags) * bus-specific DMA memory free functions. */ void -_bus_dmamem_free(t, t0, segs, nsegs) - bus_dma_tag_t t, t0; - bus_dma_segment_t *segs; - int nsegs; +_bus_dmamem_free(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dma_segment_t *segs, + int nsegs) { #ifdef DIAGNOSTIC @@ -1403,13 +1362,8 @@ _bus_dmamem_free(t, t0, segs, nsegs) * bus-specific DMA memory map functions. */ int -_bus_dmamem_map(t, t0, segs, nsegs, size, kvap, flags) - bus_dma_tag_t t, t0; - bus_dma_segment_t *segs; - int nsegs; - size_t size; - caddr_t *kvap; - int flags; +_bus_dmamem_map(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dma_segment_t *segs, + int nsegs, size_t size, caddr_t *kvap, int flags) { const struct kmem_dyn_mode *kd; struct vm_page *m; @@ -1466,10 +1420,7 @@ _bus_dmamem_map(t, t0, segs, nsegs, size, kvap, flags) * bus-specific DMA memory unmapping functions. */ void -_bus_dmamem_unmap(t, t0, kva, size) - bus_dma_tag_t t, t0; - caddr_t kva; - size_t size; +_bus_dmamem_unmap(bus_dma_tag_t t, bus_dma_tag_t t0, caddr_t kva, size_t size) { #ifdef DIAGNOSTIC @@ -1485,12 +1436,8 @@ _bus_dmamem_unmap(t, t0, kva, size) * bus-specific DMA mmap(2)'ing functions. */ paddr_t -_bus_dmamem_mmap(t, t0, segs, nsegs, off, prot, flags) - bus_dma_tag_t t, t0; - bus_dma_segment_t *segs; - int nsegs; - off_t off; - int prot, flags; +_bus_dmamem_mmap(bus_dma_tag_t t, bus_dma_tag_t t0, bus_dma_segment_t *segs, + int nsegs, off_t off, int prot, int flags) { int i; |