Module Name: src Committed By: skrll Date: Sat Jan 22 15:08:11 UTC 2022
Modified Files: src/sys/arch/emips/emips: bus_dma.c src/sys/arch/evbmips/malta/pci: pcib.c src/sys/arch/mips/mips: bus_dma.c src/sys/arch/mips/rmi: rmixl_obio.c rmixl_pcix.c src/sys/arch/mips/sibyte/pci: sbbrz.c src/sys/arch/newsmips/newsmips: bus.c src/sys/arch/playstation2/playstation2: bus_dma.c src/sys/arch/pmax/pmax: bus_dma.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/emips/emips/bus_dma.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/evbmips/malta/pci/pcib.c cvs rdiff -u -r1.44 -r1.45 src/sys/arch/mips/mips/bus_dma.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/rmi/rmixl_obio.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/mips/rmi/rmixl_pcix.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/sibyte/pci/sbbrz.c cvs rdiff -u -r1.35 -r1.36 src/sys/arch/newsmips/newsmips/bus.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/playstation2/playstation2/bus_dma.c cvs rdiff -u -r1.61 -r1.62 src/sys/arch/pmax/pmax/bus_dma.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/emips/emips/bus_dma.c diff -u src/sys/arch/emips/emips/bus_dma.c:1.6 src/sys/arch/emips/emips/bus_dma.c:1.7 --- src/sys/arch/emips/emips/bus_dma.c:1.6 Sun Dec 5 03:07:15 2021 +++ src/sys/arch/emips/emips/bus_dma.c Sat Jan 22 15:08:10 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.6 2021/12/05 03:07:15 msaitoh Exp $ */ +/* $NetBSD: bus_dma.c,v 1.7 2022/01/22 15:08:10 skrll Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.6 2021/12/05 03:07:15 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.7 2022/01/22 15:08:10 skrll Exp $"); #include "opt_cputype.h" @@ -88,9 +88,9 @@ emips_bus_dma_init(void) #endif } -static size_t +static size_t _bus_dmamap_mapsize(int const nsegments) -{ +{ KASSERT(nsegments > 0); return sizeof(struct emips_bus_dmamap) + (sizeof(bus_dma_segment_t) * (nsegments - 1)); @@ -488,11 +488,11 @@ _bus_dmamap_sync_r3k(bus_dma_tag_t t, bu } /* - * Now at the first segment to sync; nail + * Now at the first segment to sync; nail * each segment until we have exhausted the * length. */ - minlen = len < map->dm_segs[i].ds_len - offset ? + minlen = len < map->dm_segs[i].ds_len - offset ? len : map->dm_segs[i].ds_len - offset; addr = map->dm_segs[i].ds_addr; @@ -736,6 +736,6 @@ _bus_dmamem_mmap(bus_dma_tag_t t, bus_dm rv = _bus_dmamem_mmap_common(t, segs, nsegs, off, prot, flags); if (rv == (bus_addr_t)-1) return (-1); - + return (mips_btop((char *)rv)); } Index: src/sys/arch/evbmips/malta/pci/pcib.c diff -u src/sys/arch/evbmips/malta/pci/pcib.c:1.22 src/sys/arch/evbmips/malta/pci/pcib.c:1.23 --- src/sys/arch/evbmips/malta/pci/pcib.c:1.22 Sat Aug 7 16:18:51 2021 +++ src/sys/arch/evbmips/malta/pci/pcib.c Sat Jan 22 15:08:10 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: pcib.c,v 1.22 2021/08/07 16:18:51 thorpej Exp $ */ +/* $NetBSD: pcib.c,v 1.23 2022/01/22 15:08:10 skrll Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.22 2021/08/07 16:18:51 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.23 2022/01/22 15:08:10 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -426,7 +426,7 @@ pcib_intr(void *v) * From YAMON source code: * * IRQ7 is used to detect spurious interrupts. - * The interrupt acknowledge cycle returns IRQ7, if no + * The interrupt acknowledge cycle returns IRQ7, if no * interrupts is requested. * We can differentiate between this situation and a * "Normal" IRQ7 by reading the ISR. Index: src/sys/arch/mips/mips/bus_dma.c diff -u src/sys/arch/mips/mips/bus_dma.c:1.44 src/sys/arch/mips/mips/bus_dma.c:1.45 --- src/sys/arch/mips/mips/bus_dma.c:1.44 Thu Jan 7 17:28:20 2021 +++ src/sys/arch/mips/mips/bus_dma.c Sat Jan 22 15:08:10 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.44 2021/01/07 17:28:20 skrll Exp $ */ +/* $NetBSD: bus_dma.c,v 1.45 2022/01/22 15:08:10 skrll Exp $ */ /*- * Copyright (c) 1997, 1998, 2001, 2020 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.44 2021/01/07 17:28:20 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.45 2022/01/22 15:08:10 skrll Exp $"); #define _MIPS_BUS_DMA_PRIVATE @@ -285,9 +285,9 @@ _bus_dma_load_bouncebuf(bus_dma_tag_t t, } #endif /* _MIPS_NEED_BUS_DMA_BOUNCE */ -static size_t +static size_t _bus_dmamap_mapsize(int const nsegments) -{ +{ KASSERT(nsegments > 0); return sizeof(struct mips_bus_dmamap) + (sizeof(bus_dma_segment_t) * (nsegments - 1)); @@ -862,7 +862,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm for (; offset >= seg->ds_len; seg++) { offset -= seg->ds_len; } - + for (; seg < lastseg && len != 0; seg++, offset = 0, len -= minlen) { /* * Now at the first segment to sync; nail each segment until we @@ -949,7 +949,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm break; case _BUS_DMA_BUFTYPE_MBUF: - m_copyback(cookie->id_origmbuf, offset, len, + m_copyback(cookie->id_origmbuf, offset, len, (char *)cookie->id_bouncebuf + offset); break; @@ -1006,7 +1006,7 @@ _bus_dmamem_alloc_range(bus_dma_tag_t t, int flags, paddr_t low, paddr_t high) { paddr_t curaddr, lastaddr; - struct vm_page *m; + struct vm_page *m; struct pglist mlist; int curseg, error; Index: src/sys/arch/mips/rmi/rmixl_obio.c diff -u src/sys/arch/mips/rmi/rmixl_obio.c:1.7 src/sys/arch/mips/rmi/rmixl_obio.c:1.8 --- src/sys/arch/mips/rmi/rmixl_obio.c:1.7 Sat Aug 7 16:18:59 2021 +++ src/sys/arch/mips/rmi/rmixl_obio.c Sat Jan 22 15:08:11 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: rmixl_obio.c,v 1.7 2021/08/07 16:18:59 thorpej Exp $ */ +/* $NetBSD: rmixl_obio.c,v 1.8 2022/01/22 15:08:11 skrll Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rmixl_obio.c,v 1.7 2021/08/07 16:18:59 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rmixl_obio.c,v 1.8 2022/01/22 15:08:11 skrll Exp $"); #include "locators.h" #include "pci.h" @@ -242,8 +242,8 @@ rmixl_addr_error_init(void) r |= ~(__BITS(19,16) | __BITS(10,9) | __BITS(7,5)); RMIXL_IOREG_WRITE(RMIXL_ADDR_ERR_DEVICE_MASK, r); - /* - * enable the address error interrupts + /* + * enable the address error interrupts * "upgrade" cache and CPU errors to A1 */ #define _ADDR_ERR_DEVSTAT_A1 (__BIT(8) | __BIT(1) | __BIT(0)) @@ -268,8 +268,8 @@ rmixl_addr_error_init(void) r = RMIXL_IOREG_READ(RMIXL_ADDR_ERR_AERR1_CLEAR); RMIXL_IOREG_WRITE(RMIXL_ADDR_ERR_AERR1_CLEAR, r); - /* - * enable the double bit error interrupts + /* + * enable the double bit error interrupts * (assume reserved bits, which are read-only, are ignored) */ r = RMIXL_IOREG_READ(RMIXL_ADDR_ERR_BITERR_INT_EN); Index: src/sys/arch/mips/rmi/rmixl_pcix.c diff -u src/sys/arch/mips/rmi/rmixl_pcix.c:1.17 src/sys/arch/mips/rmi/rmixl_pcix.c:1.18 --- src/sys/arch/mips/rmi/rmixl_pcix.c:1.17 Sat Aug 7 16:18:59 2021 +++ src/sys/arch/mips/rmi/rmixl_pcix.c Sat Jan 22 15:08:11 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: rmixl_pcix.c,v 1.17 2021/08/07 16:18:59 thorpej Exp $ */ +/* $NetBSD: rmixl_pcix.c,v 1.18 2022/01/22 15:08:11 skrll Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rmixl_pcix.c,v 1.17 2021/08/07 16:18:59 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rmixl_pcix.c,v 1.18 2022/01/22 15:08:11 skrll Exp $"); #include "opt_pci.h" #include "pci.h" @@ -261,15 +261,15 @@ static int rmixl_pcix_error_intr(void *) CFATTACH_DECL_NEW(rmixl_pcix, sizeof(rmixl_pcix_softc_t), - rmixl_pcix_match, rmixl_pcix_attach, NULL, NULL); + rmixl_pcix_match, rmixl_pcix_attach, NULL, NULL); static int rmixl_pcix_found; -static int +static int rmixl_pcix_match(device_t parent, cfdata_t cf, void *aux) -{ +{ uint32_t r; /* @@ -294,9 +294,9 @@ rmixl_pcix_match(device_t parent, cfdata return 0; /* strapped for Device Mode */ return 1; -} +} -static void +static void rmixl_pcix_attach(device_t parent, device_t self, void *aux) { rmixl_pcix_softc_t *sc = device_private(self); @@ -323,12 +323,12 @@ rmixl_pcix_attach(device_t parent, devic /* * check XLR Control Register */ - DPRINTF(("%s: XLR_CONTROL=%#x\n", __func__, + DPRINTF(("%s: XLR_CONTROL=%#x\n", __func__, RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_XLR_CONTROL))); /* * HBAR[0] if a 32 bit BAR, or - * HBAR[0,1] if a 64 bit BAR pair + * HBAR[0,1] if a 64 bit BAR pair * must cover all RAM */ extern u_quad_t mem_cluster_maxaddr; @@ -496,8 +496,8 @@ rmixl_pcix_intcfg(rmixl_pcix_softc_t *sc * read-to-clear any pre-existing interrupts * XXX MSI bits in STATUS are also documented as write 1 to clear in PRM */ - (void)RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_STATUS); - (void)RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_ERR_STATUS); + (void)RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_STATUS); + (void)RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_ERR_STATUS); /* initialize the (non-error interrupt) dispatch handles */ sc->sc_intr = NULL; @@ -906,12 +906,12 @@ rmixl_pcix_intr_establish(void *v, pci_i mutex_enter(&sc->sc_mutex); - pip = rmixl_pcix_pip_add_1(sc, irq, ipl); + pip = rmixl_pcix_pip_add_1(sc, irq, ipl); if (pip == NULL) return NULL; /* - * initializae our new interrupt, the last element in dispatch_data[] + * initializae our new interrupt, the last element in dispatch_data[] */ dip = &pip->dispatch_data[pip->dispatch_count - 1]; dip->bitno = bitno; @@ -934,9 +934,9 @@ rmixl_pcix_intr_establish(void *v, pci_i uint32_t bit = 1 << (bitno + 2); uint32_t r; - r = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_CONTROL); + r = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_CONTROL); r &= ~bit; /* clear mask */ - RMIXL_PCIXREG_WRITE(RMIXL_PCIX_ECFG_INTR_CONTROL, r); + RMIXL_PCIXREG_WRITE(RMIXL_PCIX_ECFG_INTR_CONTROL, r); pip->sc = sc; pip->ipl = ipl; @@ -993,13 +993,13 @@ rmixl_pcix_pip_add_1(rmixl_pcix_softc_t */ KASSERT(sc == pip_old->sc); if (sc != pip_old->sc) { - printf("%s: sc %p mismatch\n", __func__, sc); + printf("%s: sc %p mismatch\n", __func__, sc); free(pip_new, M_DEVBUF); return NULL; } KASSERT (ipl == pip_old->ipl); if (ipl != pip_old->ipl) { - printf("%s: ipl %d mismatch\n", __func__, ipl); + printf("%s: ipl %d mismatch\n", __func__, ipl); free(pip_new, M_DEVBUF); return NULL; } @@ -1036,11 +1036,11 @@ rmixl_pcix_pip_free_callout(rmixl_pcix_i { callout_init(&pip->callout, 0); callout_reset(&pip->callout, 2 * hz, rmixl_pcix_pip_free, pip); -} - +} + static void rmixl_pcix_pip_free(void *arg) -{ +{ rmixl_pcix_intr_t *pip = arg; callout_destroy(&pip->callout); @@ -1053,7 +1053,7 @@ rmixl_pcix_intr(void *arg) rmixl_pcix_intr_t *pip = arg; int rv = 0; - uint32_t status = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_STATUS); + uint32_t status = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_STATUS); DPRINTF(("%s: %#x\n", __func__, status)); if (status != 0) { @@ -1077,7 +1077,7 @@ rmixl_pcix_error_intr(void *arg) rmixl_pcix_softc_t *sc = arg; uint32_t error_status; - error_status = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_ERR_STATUS); + error_status = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_ERR_STATUS); #ifdef DIAGNOSTIC printf("%s: error status %#x\n", __func__, error_status); @@ -1150,18 +1150,18 @@ rmixl_pcix_intr_chk(void) { uint32_t control, status, error_status; - control = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_CONTROL); - status = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_STATUS); - error_status = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_ERR_STATUS); + control = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_CONTROL); + status = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_STATUS); + error_status = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_ERR_STATUS); printf("%s: %#x, %#x, %#x\n", __func__, control, status, error_status); control |= PCIX_INTR_CONTROL_DIA; - RMIXL_PCIXREG_WRITE(RMIXL_PCIX_ECFG_INTR_CONTROL, control); + RMIXL_PCIXREG_WRITE(RMIXL_PCIX_ECFG_INTR_CONTROL, control); - control = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_CONTROL); - status = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_STATUS); - error_status = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_ERR_STATUS); + control = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_CONTROL); + status = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_STATUS); + error_status = RMIXL_PCIXREG_READ(RMIXL_PCIX_ECFG_INTR_ERR_STATUS); printf("%s: %#x, %#x, %#x\n", __func__, control, status, error_status); Index: src/sys/arch/mips/sibyte/pci/sbbrz.c diff -u src/sys/arch/mips/sibyte/pci/sbbrz.c:1.6 src/sys/arch/mips/sibyte/pci/sbbrz.c:1.7 --- src/sys/arch/mips/sibyte/pci/sbbrz.c:1.6 Sat Aug 7 16:18:59 2021 +++ src/sys/arch/mips/sibyte/pci/sbbrz.c Sat Jan 22 15:08:11 2022 @@ -1,25 +1,25 @@ -/* $NetBSD: sbbrz.c,v 1.6 2021/08/07 16:18:59 thorpej Exp $ */ +/* $NetBSD: sbbrz.c,v 1.7 2022/01/22 15:08:11 skrll Exp $ */ /* * Copyright 2000, 2001 * Broadcom Corporation. All rights reserved. - * + * * This software is furnished under license and may be used and copied only * in accordance with the following terms and conditions. Subject to these * conditions, you may download, copy, install, use, modify and distribute * modified or unmodified copies of this software in source and/or binary * form. No title or ownership is transferred hereby. - * + * * 1) Any source code used, modified or distributed must reproduce and * retain this copyright notice and list of conditions as they appear in * the source file. - * + * * 2) No right is granted to use any trade name, trademark, or logo of * Broadcom Corporation. Neither the "Broadcom Corporation" name nor any * trademark or logo of Broadcom Corporation may be used to endorse or * promote products derived from this software without the prior written * permission of Broadcom Corporation. - * + * * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR @@ -69,17 +69,17 @@ * All rights reserved. * * Author: Chris G. Demetriou - * + * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or software.distribut...@cs.cmu.edu @@ -130,7 +130,7 @@ sbbrz_match(device_t parent, cfdata_t ma if (zap->za_locs.za_type != ZBBUS_ENTTYPE_BRZ) return (0); - + if (sbbrz_softc.sc_dev != NULL) return (0); @@ -159,7 +159,7 @@ sbbrz_init(struct sbbrz_softc *sc) error = bus_dmatag_subregion(t, 0, (bus_addr_t)1 << 32, &sc->sc_dmat32, 0); if (error) - panic("%s: failed to create 32bit dma tag: %d", + panic("%s: failed to create 32bit dma tag: %d", __func__, error); sbbrz_pci_init(&sc->sc_pc, sc); @@ -208,7 +208,7 @@ static int sbbrz_print(void *aux, const char *pnp) { struct pcibus_attach_args *pba = aux; - + /* only PCIs can attach to sbbrz; easy. */ if (pnp) #if _has_pba_busname @@ -218,4 +218,4 @@ sbbrz_print(void *aux, const char *pnp) #endif aprint_normal(" bus %d", pba->pba_bus); return (UNCONF); -} +} Index: src/sys/arch/newsmips/newsmips/bus.c diff -u src/sys/arch/newsmips/newsmips/bus.c:1.35 src/sys/arch/newsmips/newsmips/bus.c:1.36 --- src/sys/arch/newsmips/newsmips/bus.c:1.35 Sun Dec 5 03:07:16 2021 +++ src/sys/arch/newsmips/newsmips/bus.c Sat Jan 22 15:08:11 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.35 2021/12/05 03:07:16 msaitoh Exp $ */ +/* $NetBSD: bus.c,v 1.36 2022/01/22 15:08:11 skrll Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.35 2021/12/05 03:07:16 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.36 2022/01/22 15:08:11 skrll Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -132,10 +132,10 @@ bus_space_subregion(bus_space_tag_t t, b return 0; } -static size_t +static size_t _bus_dmamap_mapsize(int const nsegments) -{ - KASSERT(nsegments > 0); +{ + KASSERT(nsegments > 0); return sizeof(struct newsmips_bus_dmamap) + (sizeof(bus_dma_segment_t) * (nsegments - 1)); } @@ -782,6 +782,6 @@ _bus_dmamem_mmap(bus_dma_tag_t t, bus_dm rv = _bus_dmamem_mmap_common(t, segs, nsegs, off, prot, flags); if (rv == (bus_addr_t)-1) return (-1); - + return (mips_btop((char *)rv)); } Index: src/sys/arch/playstation2/playstation2/bus_dma.c diff -u src/sys/arch/playstation2/playstation2/bus_dma.c:1.23 src/sys/arch/playstation2/playstation2/bus_dma.c:1.24 --- src/sys/arch/playstation2/playstation2/bus_dma.c:1.23 Sat Nov 21 17:46:09 2020 +++ src/sys/arch/playstation2/playstation2/bus_dma.c Sat Jan 22 15:08:11 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.23 2020/11/21 17:46:09 thorpej Exp $ */ +/* $NetBSD: bus_dma.c,v 1.24 2022/01/22 15:08:11 skrll Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.23 2020/11/21 17:46:09 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.24 2022/01/22 15:08:11 skrll Exp $"); #include <sys/param.h> #include <sys/kmem.h> @@ -559,6 +559,6 @@ _bus_dmamem_mmap(bus_dma_tag_t t, bus_dm rv = _bus_dmamem_mmap_common(t, segs, nsegs, off, prot, flags); if (rv == (bus_addr_t)-1) return (-1); - + return (mips_btop((char *)rv)); } Index: src/sys/arch/pmax/pmax/bus_dma.c diff -u src/sys/arch/pmax/pmax/bus_dma.c:1.61 src/sys/arch/pmax/pmax/bus_dma.c:1.62 --- src/sys/arch/pmax/pmax/bus_dma.c:1.61 Sun Dec 5 03:07:16 2021 +++ src/sys/arch/pmax/pmax/bus_dma.c Sat Jan 22 15:08:11 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.61 2021/12/05 03:07:16 msaitoh Exp $ */ +/* $NetBSD: bus_dma.c,v 1.62 2022/01/22 15:08:11 skrll Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.61 2021/12/05 03:07:16 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.62 2022/01/22 15:08:11 skrll Exp $"); #include "opt_cputype.h" @@ -488,11 +488,11 @@ _bus_dmamap_sync_r3k(bus_dma_tag_t t, bu } /* - * Now at the first segment to sync; nail + * Now at the first segment to sync; nail * each segment until we have exhausted the * length. */ - minlen = len < map->dm_segs[i].ds_len - offset ? + minlen = len < map->dm_segs[i].ds_len - offset ? len : map->dm_segs[i].ds_len - offset; addr = map->dm_segs[i].ds_addr; @@ -736,6 +736,6 @@ _bus_dmamem_mmap(bus_dma_tag_t t, bus_dm rv = _bus_dmamem_mmap_common(t, segs, nsegs, off, prot, flags); if (rv == (bus_addr_t)-1) return (-1); - + return (mips_btop((char *)rv)); }