CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Fri Jun 26 06:57:17 UTC 2015 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Fix a bug that wm_detach() didn't unmap the FHASH's area. Now drvct -d wm0 - drvctl -r pci0 works on ICH* and PCH*. To generate a diff of this commit: cvs rdiff -u -r1.335 -r1.336 src/sys/dev/pci/if_wm.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/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.335 src/sys/dev/pci/if_wm.c:1.336 --- src/sys/dev/pci/if_wm.c:1.335 Sat Jun 13 15:47:58 2015 +++ src/sys/dev/pci/if_wm.c Fri Jun 26 06:57:17 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.335 2015/06/13 15:47:58 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.336 2015/06/26 06:57:17 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -81,7 +81,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.335 2015/06/13 15:47:58 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.336 2015/06/26 06:57:17 msaitoh Exp $); #ifdef _KERNEL_OPT #include opt_net_mpsafe.h @@ -295,6 +295,7 @@ struct wm_softc { bus_size_t sc_ios; /* I/O space size */ bus_space_tag_t sc_flasht; /* flash registers space tag */ bus_space_handle_t sc_flashh; /* flash registers space handle */ + bus_size_t sc_flashs; /* flash registers space size */ bus_dma_tag_t sc_dmat; /* bus DMA tag */ struct ethercom sc_ethercom; /* ethernet common data */ @@ -2061,7 +2062,7 @@ int_failed: sc-sc_nvm_wordsize = 2048; memtype = pci_mapreg_type(pa-pa_pc, pa-pa_tag, WM_ICH8_FLASH); if (pci_mapreg_map(pa, WM_ICH8_FLASH, memtype, 0, - sc-sc_flasht, sc-sc_flashh, NULL, NULL)) { + sc-sc_flasht, sc-sc_flashh, NULL, sc-sc_flashs)) { aprint_error_dev(sc-sc_dev, can't map FLASH registers\n); goto fail_5; @@ -2807,11 +2808,14 @@ wm_detach(device_t self, int flags __unu bus_space_unmap(sc-sc_st, sc-sc_sh, sc-sc_ss); sc-sc_ss = 0; } - if (sc-sc_ios) { bus_space_unmap(sc-sc_iot, sc-sc_ioh, sc-sc_ios); sc-sc_ios = 0; } + if (sc-sc_flashs) { + bus_space_unmap(sc-sc_flasht, sc-sc_flashh, sc-sc_flashs); + sc-sc_flashs = 0; + } if (sc-sc_tx_lock) mutex_obj_free(sc-sc_tx_lock);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Fri Jun 26 07:31:18 UTC 2015 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add PLX Technology PEX 8111. To generate a diff of this commit: cvs rdiff -u -r1.1227 -r1.1228 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1227 src/sys/dev/pci/pcidevs:1.1228 --- src/sys/dev/pci/pcidevs:1.1227 Tue Jun 2 02:07:54 2015 +++ src/sys/dev/pci/pcidevs Fri Jun 26 07:31:18 2015 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1227 2015/06/02 02:07:54 nonaka Exp $ +$NetBSD: pcidevs,v 1.1228 2015/06/26 07:31:18 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -5077,6 +5077,7 @@ product PLANEX FNW_3800_TX 0xab07 FNW-38 product PLX PCI_400 0x1077 VScom PCI-400 4 port serial product PLX PCI_800 0x1076 VScom PCI-800 8 port serial product PLX PCI_200 0x1103 VScom PCI-200 2 port serial +product PLX PEX_8111 0x8111 PEX 8111 PCIe-to-PCI Bridge product PLX PEX_8112 0x8112 PEX 8112 PCIe-to-PCI Bridge product PLX PEX_8114 0x8114 PEX 8114 PCIe-to-PCI/PCI-X Bridge product PLX 9030 0x9030 9030 I/O Accelrator
CVS commit: src/sys/arch/riscv/include
Module Name:src Committed By: matt Date: Fri Jun 26 14:20:11 UTC 2015 Modified Files: src/sys/arch/riscv/include: lock.h Log Message: Fix cp error. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/riscv/include/lock.h 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/riscv/include/lock.h diff -u src/sys/arch/riscv/include/lock.h:1.2 src/sys/arch/riscv/include/lock.h:1.3 --- src/sys/arch/riscv/include/lock.h:1.2 Sun Mar 29 09:43:26 2015 +++ src/sys/arch/riscv/include/lock.h Fri Jun 26 14:20:11 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.2 2015/03/29 09:43:26 matt Exp $ */ +/* $NetBSD: lock.h,v 1.3 2015/06/26 14:20:11 matt Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -88,7 +88,7 @@ __cpu_simple_lock(__cpu_simple_lock_t *_ static __inline int __unused __cpu_simple_lock_try(__cpu_simple_lock_t *__ptr) { - return __atomic_exchange_n(__ptr, __SIMPLELOCK_LOCKED, __ATOMIC_ACQUIRE) == __SIMPLELOCK_LOCKED; + return __atomic_exchange_n(__ptr, __SIMPLELOCK_LOCKED, __ATOMIC_ACQUIRE) == __SIMPLELOCK_UNLOCKED; } static __inline void __unused
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Fri Jun 26 14:26:38 UTC 2015 Modified Files: src/sys/kern: kgdb_stub.c Log Message: Wait for the next character forever as kgdb wants. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/kern/kgdb_stub.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/kern/kgdb_stub.c diff -u src/sys/kern/kgdb_stub.c:1.28 src/sys/kern/kgdb_stub.c:1.29 --- src/sys/kern/kgdb_stub.c:1.28 Sun Sep 21 13:17:15 2014 +++ src/sys/kern/kgdb_stub.c Fri Jun 26 10:26:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb_stub.c,v 1.28 2014/09/21 17:17:15 christos Exp $ */ +/* $NetBSD: kgdb_stub.c,v 1.29 2015/06/26 14:26:38 christos Exp $ */ /* * Copyright (c) 1990, 1993 @@ -45,7 +45,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kgdb_stub.c,v 1.28 2014/09/21 17:17:15 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: kgdb_stub.c,v 1.29 2015/06/26 14:26:38 christos Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -85,8 +85,17 @@ static void *kgdb_ioarg; static u_char buffer[KGDB_BUFLEN]; static kgdb_reg_t gdb_regs[KGDB_NUMREGS]; -#define GETC() ((*kgdb_getc)(kgdb_ioarg)) -#define PUTC(c) ((*kgdb_putc)(kgdb_ioarg, c)) +#define GETC() kgdb_waitc(kgdb_ioarg) +#define PUTC(c) (*kgdb_putc)(kgdb_ioarg, c) + +static int +kgdb_waitc(void *arg) +{ + int c; + while ((c = (*kgdb_getc)(arg)) == -1) + continue; + return c; +} /* * db_trap_callback can be hooked by MD port code to handle special
CVS commit: src/sys/sys
Module Name:src Committed By: matt Date: Fri Jun 26 14:38:54 UTC 2015 Modified Files: src/sys/sys: Makefile Log Message: Install common_lock.h To generate a diff of this commit: cvs rdiff -u -r1.153 -r1.154 src/sys/sys/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/Makefile diff -u src/sys/sys/Makefile:1.153 src/sys/sys/Makefile:1.154 --- src/sys/sys/Makefile:1.153 Mon Apr 13 21:55:52 2015 +++ src/sys/sys/Makefile Fri Jun 26 14:38:54 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.153 2015/04/13 21:55:52 riastradh Exp $ +# $NetBSD: Makefile,v 1.154 2015/06/26 14:38:54 matt Exp $ .include bsd.own.mk @@ -10,7 +10,7 @@ INCS= acct.h agpio.h aio.h ansi.h aout_m cdefs_elf.h cdio.h chio.h clock.h clockctl.h \ common_ansi.h common_int_const.h common_int_fmtio.h \ common_int_limits.h common_int_mwgwtypes.h common_int_types.h \ - common_limits.h common_wchar_limits.h \ + common_limits.h common_lock.h common_wchar_limits.h \ condvar.h conf.h core.h \ cpufreq.h cpuio.h ctype_bits.h ctype_inline.h \ device.h device_if.h \
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Fri Jun 26 15:39:56 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: xhci.c Log Message: Revert previous (for now) To generate a diff of this commit: cvs rdiff -u -r1.28.2.30 -r1.28.2.31 src/sys/dev/usb/xhci.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/dev/usb/xhci.c diff -u src/sys/dev/usb/xhci.c:1.28.2.30 src/sys/dev/usb/xhci.c:1.28.2.31 --- src/sys/dev/usb/xhci.c:1.28.2.30 Thu Jun 25 06:30:13 2015 +++ src/sys/dev/usb/xhci.c Fri Jun 26 15:39:55 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.28.2.30 2015/06/25 06:30:13 skrll Exp $ */ +/* $NetBSD: xhci.c,v 1.28.2.31 2015/06/26 15:39:55 skrll Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.30 2015/06/25 06:30:13 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.31 2015/06/26 15:39:55 skrll Exp $); #include opt_usb.h @@ -1419,8 +1419,7 @@ xhci_stop_endpoint(struct usbd_pipe *pip * Set TR Dequeue Pointer. * xCHI 1.1 4.6.10 6.4.3.9 * Purge all of the transfer requests on ring. - * EPSTATE of endpoint must be ERROR or STOPPED, otherwise CONTEXT_STATE - * error will be generated. + * EPSTATE of endpoint must be ERROR or STOPPED, or CONTEXT_STATE error. */ static usbd_status xhci_set_dequeue(struct usbd_pipe *pipe) @@ -1760,10 +1759,7 @@ xhci_handle_event(struct xhci_softc * co } else { xx = (void *)(uintptr_t)(trb_0 ~0x3); } - /* - * stop_endpoint may cause ERR_STOPPED_LENGTH_INVALID, - * in which case this condition may happen. - */ + /* XXX this may not happen */ if (xx == NULL) { DPRINTFN(1, xfer done: xx is NULL, 0, 0, 0, 0); break; @@ -2159,7 +2155,6 @@ xhci_new_device(device_t parent, struct KASSERT(bus-ub_devices[dev-ud_addr] == NULL); bus-ub_devices[dev-ud_addr] = dev; - /* read 64 bytes of device descriptor */ err = usbd_get_initial_ddesc(dev, dd); if (err) goto bad; @@ -2361,10 +2356,6 @@ xhci_ring_put(struct xhci_softc * const * (called from interrupt from xHCI), or timed-out. * Command validation is performed in xhci_handle_event by checking if * trb_0 in CMD_COMPLETE TRB and sc-sc_command_addr are identical. - * locked = 0: called without lock held - * locked = 1: allows called with lock held - * 'locked' is needed as some methods are called with sc_lock_held. - * (see usbdivar.h) */ static usbd_status xhci_do_command1(struct xhci_softc * const sc, struct xhci_trb * const trb, @@ -2382,7 +2373,7 @@ xhci_do_command1(struct xhci_softc * con if (!locked) mutex_enter(sc-sc_lock); - /* XXX KASSERT may fail when cv_timedwait unlocks sc_lock */ + /* XXX KASSERT may fire when cv_timedwait unlocks sc_lock */ KASSERT(sc-sc_command_addr == 0); sc-sc_command_addr = xhci_ring_trbp(cr, cr-xr_ep);
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Fri Jun 26 15:43:46 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: xhci.c Log Message: Add port range check in xhci_rhpsc(). KASSERT xfer-ux_pipe != NULL in xhci_handle_event(). Based on a diff from t-hash To generate a diff of this commit: cvs rdiff -u -r1.28.2.31 -r1.28.2.32 src/sys/dev/usb/xhci.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/dev/usb/xhci.c diff -u src/sys/dev/usb/xhci.c:1.28.2.31 src/sys/dev/usb/xhci.c:1.28.2.32 --- src/sys/dev/usb/xhci.c:1.28.2.31 Fri Jun 26 15:39:55 2015 +++ src/sys/dev/usb/xhci.c Fri Jun 26 15:43:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.28.2.31 2015/06/26 15:39:55 skrll Exp $ */ +/* $NetBSD: xhci.c,v 1.28.2.32 2015/06/26 15:43:46 skrll Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.31 2015/06/26 15:39:55 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.32 2015/06/26 15:43:46 skrll Exp $); #include opt_usb.h @@ -1684,11 +1684,15 @@ xhci_rhpsc(struct xhci_softc * const sc, uint8_t *p; XHCIHIST_FUNC(); XHCIHIST_CALLED(); - DPRINTFN(4, port %u status change, port, 0, 0, 0); + DPRINTFN(4, xhci%d: port %u status change, device_unit(sc-sc_dev), + port, 0, 0); if (xfer == NULL) return; + if (port sc-sc_maxports) + return; + p = xfer-ux_buf; memset(p, 0, xfer-ux_length); p[port/NBBY] |= 1 (port%NBBY); @@ -1772,6 +1776,8 @@ xhci_handle_event(struct xhci_softc * co } DPRINTFN(14, xfer %p, xfer, 0, 0, 0); /* XXX I dunno why this happens */ + KASSERT(xfer-ux_pipe != NULL); + if (!xfer-ux_pipe-up_repeat SIMPLEQ_EMPTY(xfer-ux_pipe-up_queue)) { DPRINTFN(1, xfer done: xfer not started, 0, 0, 0, 0);
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Fri Jun 26 15:39:11 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: if_upgt.c Log Message: Whitespace To generate a diff of this commit: cvs rdiff -u -r1.12.4.5 -r1.12.4.6 src/sys/dev/usb/if_upgt.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/dev/usb/if_upgt.c diff -u src/sys/dev/usb/if_upgt.c:1.12.4.5 src/sys/dev/usb/if_upgt.c:1.12.4.6 --- src/sys/dev/usb/if_upgt.c:1.12.4.5 Sat Mar 21 11:33:37 2015 +++ src/sys/dev/usb/if_upgt.c Fri Jun 26 15:39:11 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_upgt.c,v 1.12.4.5 2015/03/21 11:33:37 skrll Exp $ */ +/* $NetBSD: if_upgt.c,v 1.12.4.6 2015/06/26 15:39:11 skrll Exp $ */ /* $OpenBSD: if_upgt.c,v 1.49 2010/04/20 22:05:43 tedu Exp $ */ /* @@ -18,7 +18,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_upgt.c,v 1.12.4.5 2015/03/21 11:33:37 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: if_upgt.c,v 1.12.4.6 2015/06/26 15:39:11 skrll Exp $); #include sys/param.h #include sys/callout.h @@ -2361,7 +2361,7 @@ upgt_free_cmd(struct upgt_softc *sc) static int upgt_bulk_xmit(struct upgt_softc *sc, struct upgt_data *data, -struct usbd_pipe * pipeh, uint32_t *size, int flags) +struct usbd_pipe *pipeh, uint32_t *size, int flags) { usbd_status status;
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Fri Jun 26 15:51:05 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: xhci.c Log Message: Make xhci_close_pipe void - nothing cares about any errors. From t-hash. To generate a diff of this commit: cvs rdiff -u -r1.28.2.32 -r1.28.2.33 src/sys/dev/usb/xhci.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/dev/usb/xhci.c diff -u src/sys/dev/usb/xhci.c:1.28.2.32 src/sys/dev/usb/xhci.c:1.28.2.33 --- src/sys/dev/usb/xhci.c:1.28.2.32 Fri Jun 26 15:43:46 2015 +++ src/sys/dev/usb/xhci.c Fri Jun 26 15:51:05 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.28.2.32 2015/06/26 15:43:46 skrll Exp $ */ +/* $NetBSD: xhci.c,v 1.28.2.33 2015/06/26 15:51:05 skrll Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.32 2015/06/26 15:43:46 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.33 2015/06/26 15:51:05 skrll Exp $); #include opt_usb.h @@ -125,6 +125,7 @@ struct xhci_pipe { #define XHCI_TRB_3_ED_BIT XHCI_TRB_3_ISP_BIT static usbd_status xhci_open(struct usbd_pipe *); +static void xhci_close_pipe(struct usbd_pipe *); static int xhci_intr1(struct xhci_softc * const); static void xhci_softintr(void *); static void xhci_poll(struct usbd_bus *); @@ -1522,7 +1523,7 @@ xhci_open(struct usbd_pipe *pipe) * If the endpoint to be closed is ep0, disable_slot. * Should be called with sc_lock held. */ -static usbd_status +static void xhci_close_pipe(struct usbd_pipe *pipe) { struct xhci_softc * const sc = pipe-up_dev-ud_bus-ub_hcpriv; @@ -1530,17 +1531,16 @@ xhci_close_pipe(struct usbd_pipe *pipe) usb_endpoint_descriptor_t * const ed = pipe-up_endpoint-ue_edesc; const u_int dci = xhci_ep_get_dci(ed); struct xhci_trb trb; - usbd_status err; uint32_t *cp; XHCIHIST_FUNC(); XHCIHIST_CALLED(); if (sc-sc_dying) - return USBD_IOERROR; + return; if (xs == NULL || xs-xs_idx == 0) /* xs is uninitialized before xhci_init_slot */ - return USBD_IOERROR; + return; DPRINTFN(4, slot %u dci %u, xs-xs_idx, dci, 0, 0); @@ -1548,11 +1548,12 @@ xhci_close_pipe(struct usbd_pipe *pipe) KASSERT(mutex_owned(sc-sc_lock)); if (pipe-up_dev-ud_depth == 0) - return USBD_NORMAL_COMPLETION; + return; if (dci == XHCI_DCI_EP_CONTROL) { DPRINTFN(4, closing ep0, 0, 0, 0, 0); - return xhci_disable_slot(sc, xs-xs_idx); + xhci_disable_slot(sc, xs-xs_idx); + return; } /* @@ -1582,10 +1583,8 @@ xhci_close_pipe(struct usbd_pipe *pipe) trb.trb_3 = XHCI_TRB_3_SLOT_SET(xs-xs_idx) | XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_CONFIGURE_EP); - err = xhci_do_command_locked(sc, trb, USBD_DEFAULT_TIMEOUT); + (void)xhci_do_command(sc, trb, USBD_DEFAULT_TIMEOUT); usb_syncmem(xs-xs_dc_dma, 0, sc-sc_pgsz, BUS_DMASYNC_POSTREAD); - - return err; } /* @@ -3143,7 +3142,7 @@ xhci_device_ctrl_close(struct usbd_pipe { XHCIHIST_FUNC(); XHCIHIST_CALLED(); - (void)xhci_close_pipe(pipe); + xhci_close_pipe(pipe); } /* -- */ @@ -3265,7 +3264,7 @@ xhci_device_bulk_close(struct usbd_pipe { XHCIHIST_FUNC(); XHCIHIST_CALLED(); - (void)xhci_close_pipe(pipe); + xhci_close_pipe(pipe); } /* */ @@ -3399,7 +3398,7 @@ xhci_device_intr_close(struct usbd_pipe XHCIHIST_FUNC(); XHCIHIST_CALLED(); DPRINTFN(15, %p, pipe, 0, 0, 0); - (void)xhci_close_pipe(pipe); + xhci_close_pipe(pipe); } /* */
CVS commit: src/sys
Module Name:src Committed By: matt Date: Fri Jun 26 14:27:35 UTC 2015 Modified Files: src/sys/arch/riscv/include: lock.h Added Files: src/sys/sys: common_lock.h Log Message: Move the riscv lock.h which uses only compiler builtin atomic primitives to a common location which can be used by others and make riscv's lock.h use it. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/riscv/include/lock.h cvs rdiff -u -r0 -r1.1 src/sys/sys/common_lock.h 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/riscv/include/lock.h diff -u src/sys/arch/riscv/include/lock.h:1.3 src/sys/arch/riscv/include/lock.h:1.4 --- src/sys/arch/riscv/include/lock.h:1.3 Fri Jun 26 14:20:11 2015 +++ src/sys/arch/riscv/include/lock.h Fri Jun 26 14:27:35 2015 @@ -1,100 +1,3 @@ -/* $NetBSD: lock.h,v 1.3 2015/06/26 14:20:11 matt Exp $ */ +/* $NetBSD: lock.h,v 1.4 2015/06/26 14:27:35 matt Exp $ */ -/*- - * Copyright (c) 2014 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Matt Thomas of 3am Software Foundry. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -/* - * Machine-dependent spin lock operations. - */ - -#ifndef _RISCV_LOCK_H_ -#define _RISCV_LOCK_H_ - -static __inline int -__SIMPLELOCK_LOCKED_P(__cpu_simple_lock_t *__ptr) -{ - return *__ptr != __SIMPLELOCK_UNLOCKED; -} - -static __inline int -__SIMPLELOCK_UNLOCKED_P(__cpu_simple_lock_t *__ptr) -{ - return *__ptr == __SIMPLELOCK_UNLOCKED; -} - -static __inline void -__cpu_simple_lock_clear(__cpu_simple_lock_t *__ptr) -{ -#if 1 - *__ptr = __SIMPLELOCK_UNLOCKED; -#else - __atomic_store_n(__ptr, __SIMPLELOCK_UNLOCKED, __ATOMIC_RELAXED); -#endif -} - -static __inline void -__cpu_simple_lock_set(__cpu_simple_lock_t *__ptr) -{ -#if 1 - *__ptr = __SIMPLELOCK_LOCKED; -#else - __atomic_store_n(__ptr, __SIMPLELOCK_LOCKED, __ATOMIC_RELAXED); -#endif -} - -static __inline void __unused -__cpu_simple_lock_init(__cpu_simple_lock_t *__ptr) -{ -#if 1 - *__ptr = __SIMPLELOCK_UNLOCKED; -#else - __atomic_store_n(__ptr, __SIMPLELOCK_UNLOCKED, __ATOMIC_RELAXED); -#endif -} - -static __inline void __unused -__cpu_simple_lock(__cpu_simple_lock_t *__ptr) -{ - while (__atomic_exchange_n(__ptr, __SIMPLELOCK_LOCKED, __ATOMIC_ACQUIRE) == __SIMPLELOCK_LOCKED) { - /* do nothing */ - } -} - -static __inline int __unused -__cpu_simple_lock_try(__cpu_simple_lock_t *__ptr) -{ - return __atomic_exchange_n(__ptr, __SIMPLELOCK_LOCKED, __ATOMIC_ACQUIRE) == __SIMPLELOCK_UNLOCKED; -} - -static __inline void __unused -__cpu_simple_unlock(__cpu_simple_lock_t *__ptr) -{ - __atomic_store_n(__ptr, __SIMPLELOCK_UNLOCKED, __ATOMIC_RELEASE); -} - -#endif /* _RISCV_LOCK_H_ */ +#include sys/common_lock.h Added files: Index: src/sys/sys/common_lock.h diff -u /dev/null src/sys/sys/common_lock.h:1.1 --- /dev/null Fri Jun 26 14:27:35 2015 +++ src/sys/sys/common_lock.h Fri Jun 26 14:27:35 2015 @@ -0,0 +1,102 @@ +/* $NetBSD: common_lock.h,v 1.1 2015/06/26 14:27:35 matt Exp $ */ + +/*- + * Copyright (c) 2014 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: matt Date: Fri Jun 26 14:40:32 UTC 2015 Modified Files: src/distrib/sets/lists/comp: mi Log Message: Add ./usr/include/sys/common_lock.h To generate a diff of this commit: cvs rdiff -u -r1.1967 -r1.1968 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1967 src/distrib/sets/lists/comp/mi:1.1968 --- src/distrib/sets/lists/comp/mi:1.1967 Thu Jun 25 05:30:47 2015 +++ src/distrib/sets/lists/comp/mi Fri Jun 26 14:40:31 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1967 2015/06/25 05:30:47 matt Exp $ +# $NetBSD: mi,v 1.1968 2015/06/26 14:40:31 matt Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -3146,6 +3146,7 @@ ./usr/include/sys/common_int_mwgwtypes.h comp-c-include ./usr/include/sys/common_int_types.h comp-c-include ./usr/include/sys/common_limits.h comp-c-include +./usr/include/sys/common_lock.h comp-c-include ./usr/include/sys/common_wchar_limits.h comp-c-include ./usr/include/sys/condvar.h comp-c-include ./usr/include/sys/conf.h comp-c-include
CVS commit: src/sys/arch/aarch64/include
Module Name:src Committed By: matt Date: Fri Jun 26 18:27:52 UTC 2015 Modified Files: src/sys/arch/aarch64/include: lock.h Log Message: Use sys/common_lock.h for !__arm__ To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/aarch64/include/lock.h 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/aarch64/include/lock.h diff -u src/sys/arch/aarch64/include/lock.h:1.2 src/sys/arch/aarch64/include/lock.h:1.3 --- src/sys/arch/aarch64/include/lock.h:1.2 Wed Aug 13 19:32:35 2014 +++ src/sys/arch/aarch64/include/lock.h Fri Jun 26 18:27:52 2015 @@ -1,96 +1,7 @@ -/* $NetBSD: lock.h,v 1.2 2014/08/13 19:32:35 matt Exp $ */ - -/*- - * Copyright (c) 2014 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Matt Thomas of 3am Software Foundry. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -/* - * Machine-dependent spin lock operations. - */ - -#ifndef _AARCH64_LOCK_H_ -#define _AARCH64_LOCK_H_ +/* $NetBSD: lock.h,v 1.3 2015/06/26 18:27:52 matt Exp $ */ #ifdef __aarch64__ - -static __inline int -__SIMPLELOCK_LOCKED_P(__cpu_simple_lock_t *__ptr) -{ - return *__ptr != __SIMPLELOCK_UNLOCKED; -} - -static __inline int -__SIMPLELOCK_UNLOCKED_P(__cpu_simple_lock_t *__ptr) -{ - return *__ptr == __SIMPLELOCK_UNLOCKED; -} - -static __inline void -__cpu_simple_lock_clear(__cpu_simple_lock_t *__ptr) -{ - __atomic_clear(__ptr, __ATOMIC_RELAXED); -} - -static __inline void -__cpu_simple_lock_set(__cpu_simple_lock_t *__ptr) -{ - (void)__atomic_test_and_set(__ptr, __ATOMIC_RELAXED); -} - -static __inline void __unused -__cpu_simple_lock_init(__cpu_simple_lock_t *alp) -{ - __atomic_clear(alp, __ATOMIC_RELAXED); -} - -static __inline void __unused -__cpu_simple_lock(__cpu_simple_lock_t *alp) -{ - while (__atomic_test_and_set(alp, __ATOMIC_ACQUIRE)) { - /* do nothing */ - } -} - -static __inline int __unused -__cpu_simple_lock_try(__cpu_simple_lock_t *alp) -{ - return !__atomic_test_and_set(alp, __ATOMIC_ACQUIRE); -} - -static __inline void __unused -__cpu_simple_unlock(__cpu_simple_lock_t *alp) -{ - __atomic_clear(alp, __ATOMIC_RELEASE); -} - +# include sys/common_lock.h #elif defined(__arm__) - -#include arm/lock.h - +# include arm/lock.h #endif - -#endif /* _AARCH64_LOCK_H_ */
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Fri Jun 26 16:19:28 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: usb_subr.c Log Message: Don't give doing SET_CONFIG if usbd_set_config_index fails to get the full BOS descriptor. Mark ud_bdesc as NULL instead To generate a diff of this commit: cvs rdiff -u -r1.198.2.15 -r1.198.2.16 src/sys/dev/usb/usb_subr.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/dev/usb/usb_subr.c diff -u src/sys/dev/usb/usb_subr.c:1.198.2.15 src/sys/dev/usb/usb_subr.c:1.198.2.16 --- src/sys/dev/usb/usb_subr.c:1.198.2.15 Sat Jun 6 15:26:15 2015 +++ src/sys/dev/usb/usb_subr.c Fri Jun 26 16:19:28 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_subr.c,v 1.198.2.15 2015/06/06 15:26:15 skrll Exp $ */ +/* $NetBSD: usb_subr.c,v 1.198.2.16 2015/06/26 16:19:28 skrll Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ /* @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: usb_subr.c,v 1.198.2.15 2015/06/06 15:26:15 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: usb_subr.c,v 1.198.2.16 2015/06/26 16:19:28 skrll Exp $); #ifdef _KERNEL_OPT #include opt_compat_netbsd.h @@ -602,36 +602,30 @@ usbd_set_config_index(struct usbd_device } if (USB_IS_SS(dev-ud_speed)) { - int blen; - /* get short bos desc */ err = usbd_get_bos_desc(dev, index, bd); - if (err) { - DPRINTF(get_bos_desc=%d, err, 0, 0, 0); - goto bad; - } - blen = UGETW(bd.wTotalLength); - bdp = kmem_alloc(blen, KM_SLEEP); - if (bdp == NULL) { - err = USBD_NOMEM; - goto bad; - } + if (!err) { + int blen = UGETW(bd.wTotalLength); + bdp = kmem_alloc(blen, KM_SLEEP); + if (bdp == NULL) { +err = USBD_NOMEM; +goto bad; + } - /* Get the full desc */ - for (i = 0; i 3; i++) { - err = usbd_get_desc(dev, UDESC_BOS, index, blen, bdp); - if (!err) -break; - usbd_delay_ms(dev, 200); - } - if (err) { - DPRINTF(get_bos_desc=%d, err, 0, 0, 0); - goto bad; - } - if (bdp-bDescriptorType != UDESC_BOS) { - DPRINTF(bad desc %d, bdp-bDescriptorType, 0, 0, 0); - err = USBD_INVAL; - goto bad; + /* Get the full desc */ + for (i = 0; i 3; i++) { +err = usbd_get_desc(dev, UDESC_BOS, index, blen, +bdp); +if (!err) + break; +usbd_delay_ms(dev, 200); + } + if (err || bdp-bDescriptorType != UDESC_BOS) { +DPRINTF(error %d or bad desc %d, err, +bdp-bDescriptorType, 0, 0); +kmem_free(bdp, blen); +bdp = NULL; + } } } dev-ud_bdesc = bdp;
CVS commit: src/sys/arch/hpcmips/dev
Module Name:src Committed By: matt Date: Fri Jun 26 22:15:33 UTC 2015 Modified Files: src/sys/arch/hpcmips/dev: mq200.c Log Message: Cleanup includes To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/hpcmips/dev/mq200.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/hpcmips/dev/mq200.c diff -u src/sys/arch/hpcmips/dev/mq200.c:1.31 src/sys/arch/hpcmips/dev/mq200.c:1.32 --- src/sys/arch/hpcmips/dev/mq200.c:1.31 Sat Oct 27 17:17:52 2012 +++ src/sys/arch/hpcmips/dev/mq200.c Fri Jun 26 22:15:33 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mq200.c,v 1.31 2012/10/27 17:17:52 chs Exp $ */ +/* $NetBSD: mq200.c,v 1.32 2015/06/26 22:15:33 matt Exp $ */ /*- * Copyright (c) 2000, 2001 TAKEMURA Shin @@ -30,11 +30,12 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mq200.c,v 1.31 2012/10/27 17:17:52 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: mq200.c,v 1.32 2015/06/26 22:15:33 matt Exp $); #include sys/param.h -#include sys/kernel.h +#include sys/bus.h #include sys/device.h +#include sys/kernel.h #include sys/systm.h #include sys/reboot.h @@ -42,8 +43,9 @@ __KERNEL_RCSID(0, $NetBSD: mq200.c,v 1. #include dev/wscons/wsconsio.h +#include mips/locore.h + #include machine/bootinfo.h -#include machine/bus.h #include machine/autoconf.h #include machine/config_hook.h #include machine/platid.h
CVS commit: src/sys/arch/mips
Module Name:src Committed By: matt Date: Fri Jun 26 22:20:58 UTC 2015 Modified Files: src/sys/arch/mips/adm5120/dev: admpci.c src/sys/arch/mips/atheros/dev: arpci.c ohci_arbus.c Log Message: #include mips/locore.h and other include cleanups. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/adm5120/dev/admpci.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/atheros/dev/arpci.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/atheros/dev/ohci_arbus.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/mips/adm5120/dev/admpci.c diff -u src/sys/arch/mips/adm5120/dev/admpci.c:1.11 src/sys/arch/mips/adm5120/dev/admpci.c:1.12 --- src/sys/arch/mips/adm5120/dev/admpci.c:1.11 Sat Jun 28 10:25:16 2014 +++ src/sys/arch/mips/adm5120/dev/admpci.c Fri Jun 26 22:20:58 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: admpci.c,v 1.11 2014/06/28 10:25:16 skrll Exp $ */ +/* $NetBSD: admpci.c,v 1.12 2015/06/26 22:20:58 matt Exp $ */ /*- * Copyright (c) 2007 David Young. All rights reserved. @@ -61,13 +61,12 @@ #include pci.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: admpci.c,v 1.11 2014/06/28 10:25:16 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: admpci.c,v 1.12 2015/06/26 22:20:58 matt Exp $); +#include sys/param.h #include sys/types.h #include sys/bus.h #include sys/cpu.h - -#include sys/param.h #include sys/time.h #include sys/systm.h #include sys/errno.h @@ -85,8 +84,6 @@ __KERNEL_RCSID(0, $NetBSD: admpci.c,v 1 #include mips/cache.h #endif -#include mips/pte.h - #include mips/adm5120/include/adm5120_mainbusvar.h #include mips/adm5120/include/adm5120reg.h #include mips/adm5120/include/adm5120var.h Index: src/sys/arch/mips/atheros/dev/arpci.c diff -u src/sys/arch/mips/atheros/dev/arpci.c:1.3 src/sys/arch/mips/atheros/dev/arpci.c:1.4 --- src/sys/arch/mips/atheros/dev/arpci.c:1.3 Sat Mar 29 19:28:29 2014 +++ src/sys/arch/mips/atheros/dev/arpci.c Fri Jun 26 22:20:58 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: arpci.c,v 1.3 2014/03/29 19:28:29 christos Exp $ */ +/* $NetBSD: arpci.c,v 1.4 2015/06/26 22:20:58 matt Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -30,7 +30,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: arpci.c,v 1.3 2014/03/29 19:28:29 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: arpci.c,v 1.4 2015/06/26 22:20:58 matt Exp $); #include sys/param.h #include sys/bus.h @@ -38,6 +38,8 @@ __KERNEL_RCSID(0, $NetBSD: arpci.c,v 1. #include dev/pci/pcivar.h +#include mips/locore.h + #include mips/atheros/include/arbusvar.h #include mips/atheros/include/ar9344reg.h Index: src/sys/arch/mips/atheros/dev/ohci_arbus.c diff -u src/sys/arch/mips/atheros/dev/ohci_arbus.c:1.1 src/sys/arch/mips/atheros/dev/ohci_arbus.c:1.2 --- src/sys/arch/mips/atheros/dev/ohci_arbus.c:1.1 Thu Jul 7 05:06:44 2011 +++ src/sys/arch/mips/atheros/dev/ohci_arbus.c Fri Jun 26 22:20:58 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ohci_arbus.c,v 1.1 2011/07/07 05:06:44 matt Exp $ */ +/* $NetBSD: ohci_arbus.c,v 1.2 2015/06/26 22:20:58 matt Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002, 2003 The NetBSD Foundation, Inc. @@ -32,12 +32,11 @@ #include locators.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ohci_arbus.c,v 1.1 2011/07/07 05:06:44 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ohci_arbus.c,v 1.2 2015/06/26 22:20:58 matt Exp $); #include sys/param.h #include sys/systm.h #include sys/device.h - #include sys/bus.h #include dev/usb/usb.h @@ -48,6 +47,8 @@ __KERNEL_RCSID(0, $NetBSD: ohci_arbus.c #include dev/usb/ohcireg.h #include dev/usb/ohcivar.h +#include mips/locore.h + #include mips/atheros/include/arbusvar.h static int ohci_arbus_match(device_t, cfdata_t, void *);
CVS commit: src/sys/arch/sgimips
Module Name:src Committed By: matt Date: Fri Jun 26 22:55:06 UTC 2015 Modified Files: src/sys/arch/sgimips/include: intr.h src/sys/arch/sgimips/sgimips: machdep.c Log Message: Cleanup includes To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sgimips/include/intr.h cvs rdiff -u -r1.140 -r1.141 src/sys/arch/sgimips/sgimips/machdep.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/sgimips/include/intr.h diff -u src/sys/arch/sgimips/include/intr.h:1.27 src/sys/arch/sgimips/include/intr.h:1.28 --- src/sys/arch/sgimips/include/intr.h:1.27 Sun Feb 20 07:59:50 2011 +++ src/sys/arch/sgimips/include/intr.h Fri Jun 26 22:55:06 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.27 2011/02/20 07:59:50 matt Exp $ */ +/* $NetBSD: intr.h,v 1.28 2015/06/26 22:55:06 matt Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -43,8 +43,6 @@ #include sys/queue.h #include sys/types.h #include sys/evcnt.h -#include mips/cpuregs.h -#include mips/locore.h #define NINTR 32 Index: src/sys/arch/sgimips/sgimips/machdep.c diff -u src/sys/arch/sgimips/sgimips/machdep.c:1.140 src/sys/arch/sgimips/sgimips/machdep.c:1.141 --- src/sys/arch/sgimips/sgimips/machdep.c:1.140 Mon Mar 24 19:10:34 2014 +++ src/sys/arch/sgimips/sgimips/machdep.c Fri Jun 26 22:55:06 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.140 2014/03/24 19:10:34 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.141 2015/06/26 22:55:06 matt Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.140 2014/03/24 19:10:34 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.141 2015/06/26 22:55:06 matt Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -50,10 +50,12 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v #include sys/kernel.h #include sys/proc.h #include sys/buf.h +#include sys/bus.h #include sys/reboot.h #include sys/conf.h #include sys/file.h #include sys/malloc.h +#include sys/intr.h #include sys/mbuf.h #include sys/msgbuf.h #include sys/device.h @@ -67,18 +69,15 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v #include uvm/uvm_extern.h -#include machine/cpu.h +#include mips/locore.h + #include machine/reg.h #include machine/psl.h -#include machine/pte.h #include machine/autoconf.h #include machine/machtype.h #include machine/sysconf.h -#include machine/intr.h #include machine/bootinfo.h -#include sys/bus.h -#include mips/locore.h #include mips/cache.h #include mips/cache_r5k.h #ifdef ENABLE_MIPS4_CACHE_R10K
CVS commit: src/sys/arch/mipsco/mipsco
Module Name:src Committed By: matt Date: Fri Jun 26 22:55:41 UTC 2015 Modified Files: src/sys/arch/mipsco/mipsco: machdep.c Log Message: Cleanup includes Use cpu_startup_common() To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/arch/mipsco/mipsco/machdep.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/mipsco/mipsco/machdep.c diff -u src/sys/arch/mipsco/mipsco/machdep.c:1.78 src/sys/arch/mipsco/mipsco/machdep.c:1.79 --- src/sys/arch/mipsco/mipsco/machdep.c:1.78 Sun Jun 8 07:01:30 2014 +++ src/sys/arch/mipsco/mipsco/machdep.c Fri Jun 26 22:55:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.78 2014/06/08 07:01:30 he Exp $ */ +/* $NetBSD: machdep.c,v 1.79 2015/06/26 22:55:40 matt Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,66 +39,48 @@ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.78 2014/06/08 07:01:30 he Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.79 2015/06/26 22:55:40 matt Exp $); /* from: Utah Hdr: machdep.c 1.63 91/04/24 */ #include opt_ddb.h #include opt_kgdb.h #include opt_modular.h +#include opt_execfmt.h + +#include zsc.h /* XXX */ +#include com.h /* XXX */ +#include ksyms.h #include sys/param.h -#include sys/systm.h -#include sys/signalvar.h -#include sys/kernel.h -#include sys/proc.h -#include sys/buf.h -#include sys/reboot.h +#include sys/boot_flag.h #include sys/conf.h -#include sys/file.h -#include sys/callout.h -#include sys/malloc.h -#include sys/mbuf.h -#include sys/msgbuf.h -#include sys/ioctl.h +#include sys/cpu.h #include sys/device.h -#include sys/exec.h -#include sys/mount.h -#include sys/syscallargs.h +#include sys/intr.h #include sys/kcore.h #include sys/ksyms.h -#include sys/cpu.h +#include sys/kernel.h +#include sys/reboot.h +#include sys/systm.h #include uvm/uvm_extern.h #include ufs/mfs/mfs_extern.h /* mfs_initminiroot() */ -#include machine/cpu.h -#include machine/reg.h -#include machine/psl.h -#include machine/pte.h +#include dev/clock_subr.h +#include dev/cons.h #ifdef DDB #include machine/db_machdep.h #include ddb/db_extern.h #endif -#include machine/intr.h #include machine/mainboard.h #include machine/sysconf.h #include machine/autoconf.h #include machine/bootinfo.h #include machine/prom.h -#include dev/clock_subr.h -#include dev/cons.h - -#include sys/boot_flag.h - -#include opt_execfmt.h - -#include zsc.h /* XXX */ -#include com.h /* XXX */ -#include ksyms.h /* maps for VM objects */ @@ -328,41 +310,7 @@ mach_init(int argc, char *argv[], char * void cpu_startup(void) { - vaddr_t minaddr, maxaddr; - char pbuf[9]; -#ifdef DEBUG - extern int pmapdebug; - int opmapdebug = pmapdebug; - - pmapdebug = 0; -#endif - - /* - * Good {morning,afternoon,evening,night}. - */ - printf(%s%s, copyright, version); - printf(%s\n, cpu_getmodel()); - format_bytes(pbuf, sizeof(pbuf), ctob(physmem)); - printf(total memory = %s\n, pbuf); - - minaddr = 0; - /* - * Allocate a submap for physio - */ - phys_map = uvm_km_suballoc(kernel_map, minaddr, maxaddr, - VM_PHYS_SIZE, true, false, NULL); - - /* - * No need to allocate an mbuf cluster submap. Mbuf clusters - * are allocated via the pool allocator, and we use KSEG to - * map those pages. - */ - -#ifdef DEBUG - pmapdebug = opmapdebug; -#endif - format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free)); - printf(avail memory = %s\n, pbuf); + cpu_startup_common(); } /*
CVS commit: src/sys/arch/evbmips/conf
Module Name:src Committed By: matt Date: Fri Jun 26 21:56:31 UTC 2015 Modified Files: src/sys/arch/evbmips/conf: Makefile.evbmips.inc Log Message: if NEED_MDSETIMAGE != no and the ramdisk.fs exists add ramdisk.fs to SYSTEM_DEP if DEBUG is defined, mdsetimage the ramdisk image into the .gdb copy To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbmips/conf/Makefile.evbmips.inc 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/evbmips/conf/Makefile.evbmips.inc diff -u src/sys/arch/evbmips/conf/Makefile.evbmips.inc:1.6 src/sys/arch/evbmips/conf/Makefile.evbmips.inc:1.7 --- src/sys/arch/evbmips/conf/Makefile.evbmips.inc:1.6 Tue Aug 5 15:40:59 2014 +++ src/sys/arch/evbmips/conf/Makefile.evbmips.inc Fri Jun 26 21:56:31 2015 @@ -4,9 +4,15 @@ RAMDISKDIR!= cd ${NETBSDSRCDIR}/distrib/ .if defined(NEED_MDSETIMAGE) ${NEED_MDSETIMAGE} != no \ exists(${RAMDISKDIR}/ramdisk.fs) +SYSTEM_DEP+= ${RAMDISKDIR}/ramdisk.fs SYSTEM_LD_TAIL_EXTRA+=; \ echo ${TOOL_MDSETIMAGE} -s $@ ${RAMDISKDIR}/ramdisk.fs; \ ${TOOL_MDSETIMAGE} -s $@ ${RAMDISKDIR}/ramdisk.fs +.if defined(DEBUG) +SYSTEM_LD_TAIL_EXTRA+=; \ + echo ${TOOL_MDSETIMAGE} -s $@.gdb ${RAMDISKDIR}/ramdisk.fs; \ + ${TOOL_MDSETIMAGE} -s $@.gdb ${RAMDISKDIR}/ramdisk.fs +.endif .endif .if defined(NEED_SREC) ${NEED_SREC} != no
CVS commit: src/sys/arch/evbmips/evbmips
Module Name:src Committed By: matt Date: Fri Jun 26 21:57:25 UTC 2015 Modified Files: src/sys/arch/evbmips/evbmips: cpu.c yamon.c Log Message: Add #include mips/locore.h To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbmips/evbmips/cpu.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbmips/evbmips/yamon.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/evbmips/evbmips/cpu.c diff -u src/sys/arch/evbmips/evbmips/cpu.c:1.4 src/sys/arch/evbmips/evbmips/cpu.c:1.5 --- src/sys/arch/evbmips/evbmips/cpu.c:1.4 Tue May 26 02:09:34 2015 +++ src/sys/arch/evbmips/evbmips/cpu.c Fri Jun 26 21:57:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.4 2015/05/26 02:09:34 matt Exp $ */ +/* $NetBSD: cpu.c,v 1.5 2015/06/26 21:57:25 matt Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -36,13 +36,15 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.4 2015/05/26 02:09:34 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.5 2015/06/26 21:57:25 matt Exp $); #include sys/param.h #include sys/device.h #include sys/systm.h #include sys/cpu.h +#include mips/locore.h + static int cpu_match(device_t, cfdata_t, void *); static void cpu_attach(device_t, device_t, void *); Index: src/sys/arch/evbmips/evbmips/yamon.c diff -u src/sys/arch/evbmips/evbmips/yamon.c:1.13 src/sys/arch/evbmips/evbmips/yamon.c:1.14 --- src/sys/arch/evbmips/evbmips/yamon.c:1.13 Sun Feb 20 07:48:34 2011 +++ src/sys/arch/evbmips/evbmips/yamon.c Fri Jun 26 21:57:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: yamon.c,v 1.13 2011/02/20 07:48:34 matt Exp $ */ +/* $NetBSD: yamon.c,v 1.14 2015/06/26 21:57:25 matt Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -38,7 +38,7 @@ /* XXX move to arch/mips/yamon/yamon.c or similar? */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: yamon.c,v 1.13 2011/02/20 07:48:34 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: yamon.c,v 1.14 2015/06/26 21:57:25 matt Exp $); #include sys/param.h #include sys/device.h @@ -48,6 +48,8 @@ __KERNEL_RCSID(0, $NetBSD: yamon.c,v 1. #include dev/cons.h +#include mips/locore.h + #include machine/yamon.h static int yamongetc(dev_t);
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Fri Jun 26 21:58:53 UTC 2015 Modified Files: src/sys/arch/mips/mips: core_machdep.c Log Message: Move mips/locore.h lower To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/mips/core_machdep.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/mips/mips/core_machdep.c diff -u src/sys/arch/mips/mips/core_machdep.c:1.7 src/sys/arch/mips/mips/core_machdep.c:1.8 --- src/sys/arch/mips/mips/core_machdep.c:1.7 Wed Jan 1 18:57:15 2014 +++ src/sys/arch/mips/mips/core_machdep.c Fri Jun 26 21:58:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: core_machdep.c,v 1.7 2014/01/01 18:57:15 dsl Exp $ */ +/* $NetBSD: core_machdep.c,v 1.8 2015/06/26 21:58:53 matt Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: core_machdep.c,v 1.7 2014/01/01 18:57:15 dsl Exp $); +__KERNEL_RCSID(0, $NetBSD: core_machdep.c,v 1.8 2015/06/26 21:58:53 matt Exp $); #include sys/param.h #include sys/systm.h @@ -53,10 +53,10 @@ __KERNEL_RCSID(0, $NetBSD: core_machdep #include uvm/uvm_extern.h +#include mips/locore.h #include mips/pcb.h #include mips/cache.h #include mips/regnum.h -#include mips/locore.h #include mips/pte.h #include mips/psl.h
CVS commit: src/sys/arch/evbmips/adm5120
Module Name:src Committed By: matt Date: Fri Jun 26 22:12:21 UTC 2015 Modified Files: src/sys/arch/evbmips/adm5120: machdep.c Log Message: Use cpu_startup_common() To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/evbmips/adm5120/machdep.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/evbmips/adm5120/machdep.c diff -u src/sys/arch/evbmips/adm5120/machdep.c:1.23 src/sys/arch/evbmips/adm5120/machdep.c:1.24 --- src/sys/arch/evbmips/adm5120/machdep.c:1.23 Mon Mar 24 20:06:31 2014 +++ src/sys/arch/evbmips/adm5120/machdep.c Fri Jun 26 22:12:21 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.23 2014/03/24 20:06:31 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.24 2015/06/26 22:12:21 matt Exp $ */ /*- * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko. @@ -70,7 +70,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.23 2014/03/24 20:06:31 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.24 2015/06/26 22:12:21 matt Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -418,46 +418,12 @@ void cpu_startup(void) { struct adm5120_config *admc = adm5120_configuration; - char pbuf[9]; - vaddr_t minaddr, maxaddr; -#ifdef DEBUG - extern int pmapdebug; /* XXX */ - int opmapdebug = pmapdebug; - - pmapdebug = 0; /* Shut up pmap debug during bootstrap */ -#endif if ((admc-properties = prop_dictionary_create()) == NULL) printf(%s: prop_dictionary_create\n, __func__); parse_args(admc-properties, admc-argc, admc-argv, NULL); - /* - * Good {morning,afternoon,evening,night}. - */ - printf(%s%s, copyright, version); - printf(%s\n, cpu_getmodel()); - format_bytes(pbuf, sizeof(pbuf), ctob(physmem)); - printf(total memory = %s\n, pbuf); - - minaddr = 0; - - /* - * Allocate a submap for physio - */ - phys_map = uvm_km_suballoc(kernel_map, minaddr, maxaddr, - VM_PHYS_SIZE, 0, FALSE, NULL); - - /* - * No need to allocate an mbuf cluster submap. Mbuf clusters - * are allocated via the pool allocator, and we use KSEG to - * map those pages. - */ - -#ifdef DEBUG - pmapdebug = opmapdebug; -#endif - format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free)); - printf(avail memory = %s\n, pbuf); + cpu_startup_common(); } void
CVS commit: src/sys/arch/hpcmips/dev
Module Name:src Committed By: matt Date: Fri Jun 26 22:16:27 UTC 2015 Modified Files: src/sys/arch/hpcmips/dev: ucbsnd.c Log Message: Cleanup includes To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hpcmips/dev/ucbsnd.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/hpcmips/dev/ucbsnd.c diff -u src/sys/arch/hpcmips/dev/ucbsnd.c:1.23 src/sys/arch/hpcmips/dev/ucbsnd.c:1.24 --- src/sys/arch/hpcmips/dev/ucbsnd.c:1.23 Fri Jul 25 08:10:33 2014 +++ src/sys/arch/hpcmips/dev/ucbsnd.c Fri Jun 26 22:16:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ucbsnd.c,v 1.23 2014/07/25 08:10:33 dholland Exp $ */ +/* $NetBSD: ucbsnd.c,v 1.24 2015/06/26 22:16:27 matt Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ucbsnd.c,v 1.23 2014/07/25 08:10:33 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: ucbsnd.c,v 1.24 2015/06/26 22:16:27 matt Exp $); #include opt_use_poll.h @@ -48,12 +48,12 @@ __KERNEL_RCSID(0, $NetBSD: ucbsnd.c,v 1 #include sys/device.h #include sys/proc.h #include sys/endian.h +#include sys/bus.h +#include sys/intr.h +#include mips/locore.h #include mips/cache.h -#include machine/bus.h -#include machine/intr.h - #include hpcmips/tx/tx39var.h #include hpcmips/tx/tx39sibvar.h #include hpcmips/tx/tx39sibreg.h
CVS commit: src/sys/arch/hpcmips/hpcmips
Module Name:src Committed By: matt Date: Fri Jun 26 22:18:00 UTC 2015 Modified Files: src/sys/arch/hpcmips/hpcmips: interrupt.c kloader_machdep.c Log Message: #include mips/locore.h To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hpcmips/hpcmips/interrupt.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hpcmips/hpcmips/kloader_machdep.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/hpcmips/hpcmips/interrupt.c diff -u src/sys/arch/hpcmips/hpcmips/interrupt.c:1.19 src/sys/arch/hpcmips/hpcmips/interrupt.c:1.20 --- src/sys/arch/hpcmips/hpcmips/interrupt.c:1.19 Tue Jun 9 22:46:36 2015 +++ src/sys/arch/hpcmips/hpcmips/interrupt.c Fri Jun 26 22:17:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.19 2015/06/09 22:46:36 matt Exp $ */ +/* $NetBSD: interrupt.c,v 1.20 2015/06/26 22:17:59 matt Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: interrupt.c,v 1.19 2015/06/09 22:46:36 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: interrupt.c,v 1.20 2015/06/26 22:17:59 matt Exp $); #include opt_vr41xx.h #include opt_tx39xx.h @@ -42,6 +42,8 @@ __KERNEL_RCSID(0, $NetBSD: interrupt.c, #include sys/malloc.h #include sys/intr.h +#include mips/locore.h + #include machine/sysconf.h void Index: src/sys/arch/hpcmips/hpcmips/kloader_machdep.c diff -u src/sys/arch/hpcmips/hpcmips/kloader_machdep.c:1.8 src/sys/arch/hpcmips/hpcmips/kloader_machdep.c:1.9 --- src/sys/arch/hpcmips/hpcmips/kloader_machdep.c:1.8 Tue Jun 9 22:46:36 2015 +++ src/sys/arch/hpcmips/hpcmips/kloader_machdep.c Fri Jun 26 22:17:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kloader_machdep.c,v 1.8 2015/06/09 22:46:36 matt Exp $ */ +/* $NetBSD: kloader_machdep.c,v 1.9 2015/06/26 22:17:59 matt Exp $ */ /*- * Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc. @@ -27,12 +27,13 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kloader_machdep.c,v 1.8 2015/06/09 22:46:36 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: kloader_machdep.c,v 1.9 2015/06/26 22:17:59 matt Exp $); #include sys/param.h #include sys/cpu.h #include sys/systm.h +#include mips/locore.h #include mips/cache.h #include machine/sysconf.h
CVS commit: src/sys/arch/mips/pmon
Module Name:src Committed By: matt Date: Fri Jun 26 22:32:23 UTC 2015 Modified Files: src/sys/arch/mips/pmon: pmon.c pmon32.S Log Message: Cleanup includes To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/pmon/pmon.c \ src/sys/arch/mips/pmon/pmon32.S 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/mips/pmon/pmon.c diff -u src/sys/arch/mips/pmon/pmon.c:1.1 src/sys/arch/mips/pmon/pmon.c:1.2 --- src/sys/arch/mips/pmon/pmon.c:1.1 Sat Aug 27 13:34:29 2011 +++ src/sys/arch/mips/pmon/pmon.c Fri Jun 26 22:32:23 2015 @@ -18,9 +18,10 @@ #include sys/param.h #include sys/systm.h +#include sys/cpu.h #include sys/proc.h -#include machine/cpu.h +#include mips/cpuregs.h #include mips/pmon/pmon.h int pmon_argc; Index: src/sys/arch/mips/pmon/pmon32.S diff -u src/sys/arch/mips/pmon/pmon32.S:1.1 src/sys/arch/mips/pmon/pmon32.S:1.2 --- src/sys/arch/mips/pmon/pmon32.S:1.1 Sat Aug 27 13:34:29 2011 +++ src/sys/arch/mips/pmon/pmon32.S Fri Jun 26 22:32:23 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: pmon32.S,v 1.1 2011/08/27 13:34:29 bouyer Exp $ */ +/* $NetBSD: pmon32.S,v 1.2 2015/06/26 22:32:23 matt Exp $ */ /* OpenBSD: pmon32.S,v 1.4 2010/02/18 18:53:33 miod Exp */ /* @@ -28,10 +28,11 @@ * than four arguments; other functions are not affected. */ -#include machine/param.h #include machine/asm.h -#ifndef _STANDALONE +#ifdef _STANDALONE +#include machine/param.h +#else #include assym.h #endif
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Fri Jun 26 22:56:36 UTC 2015 Modified Files: src/sys/arch/mips/include: mips1_pte.h Log Message: ifdef out bitfield struct for pte (not used). To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/mips/include/mips1_pte.h 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/mips/include/mips1_pte.h diff -u src/sys/arch/mips/include/mips1_pte.h:1.19 src/sys/arch/mips/include/mips1_pte.h:1.20 --- src/sys/arch/mips/include/mips1_pte.h:1.19 Sun Feb 20 07:45:47 2011 +++ src/sys/arch/mips/include/mips1_pte.h Fri Jun 26 22:56:36 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mips1_pte.h,v 1.19 2011/02/20 07:45:47 matt Exp $ */ +/* $NetBSD: mips1_pte.h,v 1.20 2015/06/26 22:56:36 matt Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -45,6 +45,7 @@ */ #ifndef _LOCORE +#if 0 struct mips1_pte { #if BYTE_ORDER == BIG_ENDIAN unsigned int pg_pfnum:20, /* HW: core page frame number or 0 */ @@ -69,6 +70,7 @@ unsigned int pg_prot:2, /* SW: access c pg_pfnum:20; /* HW: core page frame number or 0 */ #endif }; +#endif #endif /* _LOCORE */ #define MIPS1_PG_PROT 0x0003
CVS commit: src/sys/arch/evbppc/conf
Module Name:src Committed By: matt Date: Fri Jun 26 21:54:41 UTC 2015 Modified Files: src/sys/arch/evbppc/conf: TWRP1025 Log Message: Add cinlude TWRP1025.local To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbppc/conf/TWRP1025 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/evbppc/conf/TWRP1025 diff -u src/sys/arch/evbppc/conf/TWRP1025:1.20 src/sys/arch/evbppc/conf/TWRP1025:1.21 --- src/sys/arch/evbppc/conf/TWRP1025:1.20 Fri Jan 30 14:54:46 2015 +++ src/sys/arch/evbppc/conf/TWRP1025 Fri Jun 26 21:54:41 2015 @@ -1,4 +1,4 @@ -# $NetBSD: TWRP1025,v 1.20 2015/01/30 14:54:46 nonaka Exp $ +# $NetBSD: TWRP1025,v 1.21 2015/06/26 21:54:41 matt Exp $ # # TWRP1025 -- everything that's currently supported # @@ -7,7 +7,7 @@ include arch/evbppc/conf/std.mpc85xx options INCLUDE_CONFIG_FILE # embed config file in kernel binary -ident TWRP1025-$Revision: 1.20 $ +ident TWRP1025-$Revision: 1.21 $ maxusers 32 @@ -231,3 +231,5 @@ pseudo-device pty # pseudo-terminals pseudo-device kttcp # kernel ttcp pseudo-device vlan # 802.1Q VLANs pseudo-device lockstat # lock profiling + +cinclude arch/evbppc/conf/TWRP1025.local
CVS commit: src/sys/arch/evbmips
Module Name:src Committed By: matt Date: Fri Jun 26 22:11:10 UTC 2015 Modified Files: src/sys/arch/evbmips/alchemy: machdep.c src/sys/arch/evbmips/atheros: machdep.c Log Message: Just cpu_startup_common() To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/arch/evbmips/alchemy/machdep.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/evbmips/atheros/machdep.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/evbmips/alchemy/machdep.c diff -u src/sys/arch/evbmips/alchemy/machdep.c:1.54 src/sys/arch/evbmips/alchemy/machdep.c:1.55 --- src/sys/arch/evbmips/alchemy/machdep.c:1.54 Tue Mar 25 10:44:12 2014 +++ src/sys/arch/evbmips/alchemy/machdep.c Fri Jun 26 22:11:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.54 2014/03/25 10:44:12 martin Exp $ */ +/* $NetBSD: machdep.c,v 1.55 2015/06/26 22:11:10 matt Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -70,7 +70,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.54 2014/03/25 10:44:12 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.55 2015/06/26 22:11:10 matt Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -343,42 +343,7 @@ consinit(void) void cpu_startup(void) { - char pbuf[9]; - vaddr_t minaddr, maxaddr; -#ifdef DEBUG - extern int pmapdebug; /* XXX */ - int opmapdebug = pmapdebug; - - pmapdebug = 0; /* Shut up pmap debug during bootstrap */ -#endif - - /* - * Good {morning,afternoon,evening,night}. - */ - printf(%s%s, copyright, version); - printf(%s\n, cpu_getmodel()); - format_bytes(pbuf, sizeof(pbuf), ctob(physmem)); - printf(total memory = %s\n, pbuf); - - minaddr = 0; - - /* - * Allocate a submap for physio - */ - phys_map = uvm_km_suballoc(kernel_map, minaddr, maxaddr, - VM_PHYS_SIZE, 0, false, NULL); - - /* - * No need to allocate an mbuf cluster submap. Mbuf clusters - * are allocated via the pool allocator, and we use KSEG to - * map those pages. - */ - -#ifdef DEBUG - pmapdebug = opmapdebug; -#endif - format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free)); - printf(avail memory = %s\n, pbuf); + cpu_startup_common(); } void Index: src/sys/arch/evbmips/atheros/machdep.c diff -u src/sys/arch/evbmips/atheros/machdep.c:1.29 src/sys/arch/evbmips/atheros/machdep.c:1.30 --- src/sys/arch/evbmips/atheros/machdep.c:1.29 Mon Mar 24 20:06:31 2014 +++ src/sys/arch/evbmips/atheros/machdep.c Fri Jun 26 22:11:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.29 2014/03/24 20:06:31 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.30 2015/06/26 22:11:10 matt Exp $ */ /* * Copyright (c) 2006 Urbana-Champaign Independent Media Center. @@ -110,7 +110,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.29 2014/03/24 20:06:31 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.30 2015/06/26 22:11:10 matt Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -306,41 +306,7 @@ consinit(void) void cpu_startup(void) { - char pbuf[9]; - vaddr_t minaddr, maxaddr; -#ifdef DEBUG - extern int pmapdebug; /* XXX */ - int opmapdebug = pmapdebug; - - pmapdebug = 0; /* Shut up pmap debug during bootstrap */ -#endif - - /* - * Good {morning,afternoon,evening,night}. - */ - printf(%s%s, copyright, version); - printf(%s\n, cpu_getmodel()); - format_bytes(pbuf, sizeof(pbuf), ctob(physmem)); - printf(total memory = %s\n, pbuf); - - minaddr = 0; - /* - * Allocate a submap for physio - */ - phys_map = uvm_km_suballoc(kernel_map, minaddr, maxaddr, - VM_PHYS_SIZE, 0, FALSE, NULL); - - /* - * No need to allocate an mbuf cluster submap. Mbuf clusters - * are allocated via the pool allocator, and we use KSEG to - * map those pages. - */ - -#ifdef DEBUG - pmapdebug = opmapdebug; -#endif - format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free)); - printf(avail memory = %s\n, pbuf); + cpu_startup_common(); } void
CVS commit: src/sys/arch/evbmips/rasoc
Module Name:src Committed By: matt Date: Fri Jun 26 22:14:01 UTC 2015 Modified Files: src/sys/arch/evbmips/rasoc: machdep.c Log Message: Remove pmapdebug stuff To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbmips/rasoc/machdep.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/evbmips/rasoc/machdep.c diff -u src/sys/arch/evbmips/rasoc/machdep.c:1.10 src/sys/arch/evbmips/rasoc/machdep.c:1.11 --- src/sys/arch/evbmips/rasoc/machdep.c:1.10 Wed Apr 30 01:01:47 2014 +++ src/sys/arch/evbmips/rasoc/machdep.c Fri Jun 26 22:14:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.10 2014/04/30 01:01:47 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.11 2015/06/26 22:14:01 matt Exp $ */ /*- * Copyright (c) 2011 CradlePoint Technology, Inc. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.10 2014/04/30 01:01:47 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.11 2015/06/26 22:14:01 matt Exp $); #include sys/param.h #include sys/boot_flag.h @@ -217,17 +217,7 @@ mach_init(void) void cpu_startup(void) { -#ifdef DEBUG - extern int pmapdebug; - const int opmapdebug = pmapdebug; - pmapdebug = 0; /* Shut up pmap debug during bootstrap */ -#endif - cpu_startup_common(); - -#ifdef DEBUG - pmapdebug = opmapdebug; -#endif } void
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Fri Jun 26 22:29:38 UTC 2015 Modified Files: src/sys/arch/mips/mips: ipifuncs.c Log Message: #include mips/locore.h To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/mips/ipifuncs.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/mips/mips/ipifuncs.c diff -u src/sys/arch/mips/mips/ipifuncs.c:1.10 src/sys/arch/mips/mips/ipifuncs.c:1.11 --- src/sys/arch/mips/mips/ipifuncs.c:1.10 Wed Jun 10 22:31:00 2015 +++ src/sys/arch/mips/mips/ipifuncs.c Fri Jun 26 22:29:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ipifuncs.c,v 1.10 2015/06/10 22:31:00 matt Exp $ */ +/* $NetBSD: ipifuncs.c,v 1.11 2015/06/26 22:29:38 matt Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include opt_ddb.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ipifuncs.c,v 1.10 2015/06/10 22:31:00 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ipifuncs.c,v 1.11 2015/06/26 22:29:38 matt Exp $); #include sys/param.h #include sys/cpu.h @@ -44,6 +44,7 @@ __KERNEL_RCSID(0, $NetBSD: ipifuncs.c,v #include uvm/uvm_extern.h #include mips/cache.h +#include mips/locore.h #ifdef DDB #include mips/db_machdep.h #endif
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Jun 27 03:29:09 UTC 2015 Modified Files: src/sys/arch/mips/mips: spl.S Log Message: Turn KX (no need for UX) when !O32 ABI and MULTIPROCESSOR To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mips/mips/spl.S 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/mips/mips/spl.S diff -u src/sys/arch/mips/mips/spl.S:1.9 src/sys/arch/mips/mips/spl.S:1.10 --- src/sys/arch/mips/mips/spl.S:1.9 Thu Jun 11 07:30:10 2015 +++ src/sys/arch/mips/mips/spl.S Sat Jun 27 03:29:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: spl.S,v 1.9 2015/06/11 07:30:10 matt Exp $ */ +/* $NetBSD: spl.S,v 1.10 2015/06/27 03:29:09 matt Exp $ */ /*- * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include mips/asm.h #include mips/cpuregs.h -RCSID($NetBSD: spl.S,v 1.9 2015/06/11 07:30:10 matt Exp $) +RCSID($NetBSD: spl.S,v 1.10 2015/06/27 03:29:09 matt Exp $) #include assym.h @@ -86,8 +86,8 @@ _splraise: or v1, MIPS_INT_MASK # enable all interrupts xor a0, v1# disable ipl's masked bits DYNAMIC_STATUS_MASK(a0,v0) # machine dependent masking -#if defined(_LP64) MULTIPROCESSOR - li v1, MIPS3_SR_KX | MIPS3_SR_UX # keep 64-bit addressing on +#if !defined(__mips_o32) defined(MULTIPROCESSOR) + li v1, MIPS3_SR_KX # keep 64-bit addressing on mtc0 v1, MIPS_COP_0_STATUS ## disable interrupts #else mtc0 zero, MIPS_COP_0_STATUS ## disable interrupts
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Sat Jun 27 03:30:01 UTC 2015 Modified Files: src/sys/arch/mips/include: mips_opcode.h Log Message: More instructions To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/mips/include/mips_opcode.h 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/mips/include/mips_opcode.h diff -u src/sys/arch/mips/include/mips_opcode.h:1.20 src/sys/arch/mips/include/mips_opcode.h:1.21 --- src/sys/arch/mips/include/mips_opcode.h:1.20 Thu Jun 4 02:26:49 2015 +++ src/sys/arch/mips/include/mips_opcode.h Sat Jun 27 03:30:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_opcode.h,v 1.20 2015/06/04 02:26:49 matt Exp $ */ +/* $NetBSD: mips_opcode.h,v 1.21 2015/06/27 03:30:01 matt Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -150,6 +150,8 @@ typedef union { #define OP_LDR 033 /* MIPS-II, for r4000 port */ #define OP_SPECIAL2 034 /* QED opcodes */ +#define OP_JALX 035 +#define OP_MDMX 036 #define OP_SPECIAL3 037 #define OP_LB 040 @@ -309,14 +311,30 @@ typedef union { #define OP_DINSU 006 /* MIPS32/64 r2 */ #define OP_DINS 007 /* MIPS32/64 r2 */ #define OP_LX 012 /* DSP */ +#define OP_LWLE 031 /* EVA */ +#define OP_LWRE 032 /* EVA */ +#define OP_CACHEE 033 /* EVA */ +#define OP_SBE 034 /* EVA */ +#define OP_SHE 035 /* EVA */ +#define OP_SCE 035 /* EVA */ +#define OP_SWE 035 /* EVA */ #define OP_BSHFL 040 /* MIPS32/64 r2 */ +#define OP_SWLE 041 /* EVA */ +#define OP_SWRE 042 /* EVA */ +#define OP_PREFE 043 /* EVA */ #define OP_DBSHFL 044 /* MIPS32/64 r2 */ +#define OP_LBUE 050 /* EVA */ +#define OP_LHUE 051 /* EVA */ +#define OP_LBE 054 /* EVA */ +#define OP_LHE 055 /* EVA */ +#define OP_LLE 056 /* EVA */ +#define OP_LWE 057 /* EVA */ #define OP_RDHWR 073 /* MIPS32/64 r2 */ -#define OP_BSHFL_SBH 2 /* swap bytes within halfwords */ -#define OP_BSHFL_SHD 4 /* swap halfworks within double */ -#define OP_BSHFL_SEB 16 /* sign extend byte */ -#define OP_BSHFL_SEH 24 /* sign extend halfword */ +#define OP_BSHFL_SBH 002 /* swap bytes within halfwords */ +#define OP_BSHFL_SHD 005 /* swap halfworks within double */ +#define OP_BSHFL_SEB 020 /* sign extend byte */ +#define OP_BSHFL_SEH 030 /* sign extend halfword */ #define OP_LX_LWX 0 /* lwx */ #define OP_LX_LHX 4 /* lhx */
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Jun 27 03:31:29 UTC 2015 Modified Files: src/sys/arch/mips/mips: db_disasm.c Log Message: Decode jr.hb and ssnop and few more spec3 instructions u_int32_t - uint32_t To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/mips/mips/db_disasm.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/mips/mips/db_disasm.c diff -u src/sys/arch/mips/mips/db_disasm.c:1.29 src/sys/arch/mips/mips/db_disasm.c:1.30 --- src/sys/arch/mips/mips/db_disasm.c:1.29 Mon Jun 15 02:55:02 2015 +++ src/sys/arch/mips/mips/db_disasm.c Sat Jun 27 03:31:29 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: db_disasm.c,v 1.29 2015/06/15 02:55:02 matt Exp $ */ +/* $NetBSD: db_disasm.c,v 1.30 2015/06/27 03:31:29 matt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -35,14 +35,15 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: db_disasm.c,v 1.29 2015/06/15 02:55:02 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: db_disasm.c,v 1.30 2015/06/27 03:31:29 matt Exp $); #include sys/param.h #include sys/cpu.h #include sys/systm.h -#include mips/reg.h +#include mips/locore.h #include mips/mips_opcode.h +#include mips/reg.h #include machine/db_machdep.h @@ -118,8 +119,24 @@ static const char * const spec3_name[64] [OP_DINSM] = dinsm, [OP_DINSU] = dinsu, [OP_DINS] = dins, + [OP_LWLE] = lwle, + [OP_LWRE] = lwre, + [OP_CACHEE] = cachee, + [OP_SBE] = sbe, + [OP_SHE] = she, + [OP_SCE] = sce, + [OP_SWE] = swe, [OP_BSHFL] = bshfl, + [OP_SWLE] = swle, + [OP_SWRE] = swre, + [OP_PREFE] = prefe, [OP_DBSHFL] = dbshfl, + [OP_LBUE] = lbue, + [OP_LHUE] = lhue, + [OP_LBE] = lbe, + [OP_LHE] = lhe, + [OP_LLE] = lle, + [OP_LWE] = lwe, [OP_RDHWR] = rdhwr, }; @@ -202,7 +219,7 @@ static void print_addr(db_addr_t); db_addr_t db_disasm(db_addr_t loc, bool altfmt) { - u_int32_t instr; + uint32_t instr; /* * Take some care with addresses to not UTLB here as it @@ -217,7 +234,7 @@ db_disasm(db_addr_t loc, bool altfmt) } } else { - instr = *(u_int32_t *)loc; + instr = *(uint32_t *)loc; } return (db_disasm_insn(instr, loc, altfmt)); @@ -243,6 +260,10 @@ db_disasm_insn(int insn, db_addr_t loc, db_printf(nop); break; } + if (i.word == (1 6)) { + db_printf(ssnop); + break; + } if (i.word == (3 6)) { db_printf(ehb); break; @@ -277,7 +298,6 @@ db_disasm_insn(int insn, db_addr_t loc, case OP_SRL: case OP_SRA: case OP_DSLL: - case OP_DSRL: case OP_DSRA: case OP_DSLL32: @@ -308,7 +328,8 @@ db_disasm_insn(int insn, db_addr_t loc, case OP_JR: case OP_JALR: - db_printf(\t%s, reg_name[i.RType.rs]); + db_printf(\t%s%s, reg_name[i.RType.rs], + (insn __BIT(10)) ? .hb : ); bdslot = true; break; case OP_MTLO: @@ -711,6 +732,7 @@ db_disasm_insn(int insn, db_addr_t loc, case OP_J: case OP_JAL: + case OP_JALX: db_printf(%s\t, op_name[i.JType.op]); print_addr((loc ~0x0FFFL) | (i.JType.target 2)); bdslot = true;
CVS commit: src/sys/arch/mips/alchemy/dev
Module Name:src Committed By: matt Date: Sat Jun 27 03:33:18 UTC 2015 Modified Files: src/sys/arch/mips/alchemy/dev: augpio.c aupci.c Log Message: Cleanup includes. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/alchemy/dev/augpio.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/mips/alchemy/dev/aupci.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/mips/alchemy/dev/augpio.c diff -u src/sys/arch/mips/alchemy/dev/augpio.c:1.7 src/sys/arch/mips/alchemy/dev/augpio.c:1.8 --- src/sys/arch/mips/alchemy/dev/augpio.c:1.7 Tue Jan 3 07:36:02 2012 +++ src/sys/arch/mips/alchemy/dev/augpio.c Sat Jun 27 03:33:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: augpio.c,v 1.7 2012/01/03 07:36:02 kiyohara Exp $ */ +/* $NetBSD: augpio.c,v 1.8 2015/06/27 03:33:18 matt Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: augpio.c,v 1.7 2012/01/03 07:36:02 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: augpio.c,v 1.8 2015/06/27 03:33:18 matt Exp $); #include sys/types.h #include sys/param.h @@ -41,11 +41,11 @@ __KERNEL_RCSID(0, $NetBSD: augpio.c,v 1 #include sys/device.h #include sys/gpio.h #include sys/kernel.h +#include sys/bus.h #include dev/gpio/gpiovar.h -#include sys/bus.h -#include machine/cpu.h +#include mips/locore.h #include mips/alchemy/include/aubusvar.h #include mips/alchemy/include/aureg.h Index: src/sys/arch/mips/alchemy/dev/aupci.c diff -u src/sys/arch/mips/alchemy/dev/aupci.c:1.15 src/sys/arch/mips/alchemy/dev/aupci.c:1.16 --- src/sys/arch/mips/alchemy/dev/aupci.c:1.15 Sat Mar 29 19:28:29 2014 +++ src/sys/arch/mips/alchemy/dev/aupci.c Sat Jun 27 03:33:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: aupci.c,v 1.15 2014/03/29 19:28:29 christos Exp $ */ +/* $NetBSD: aupci.c,v 1.16 2015/06/27 03:33:18 matt Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -35,7 +35,7 @@ #include pci.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: aupci.c,v 1.15 2014/03/29 19:28:29 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: aupci.c,v 1.16 2015/06/27 03:33:18 matt Exp $); #include sys/types.h #include sys/param.h @@ -45,12 +45,12 @@ __KERNEL_RCSID(0, $NetBSD: aupci.c,v 1. #include sys/device.h #include sys/malloc.h #include sys/extent.h +#include sys/bus.h #include uvm/uvm_extern.h -#include sys/bus.h -#include machine/cpu.h -#include machine/pte.h +#include mips/locore.h +#include mips/pte.h #include dev/pci/pcivar.h #include dev/pci/pcireg.h
CVS commit: src/sys/arch/evbmips/include
Module Name:src Committed By: matt Date: Sat Jun 27 03:34:26 UTC 2015 Modified Files: src/sys/arch/evbmips/include: bus_defs.h Log Message: add whitespace To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbmips/include/bus_defs.h 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/evbmips/include/bus_defs.h diff -u src/sys/arch/evbmips/include/bus_defs.h:1.1 src/sys/arch/evbmips/include/bus_defs.h:1.2 --- src/sys/arch/evbmips/include/bus_defs.h:1.1 Fri Jul 1 17:09:59 2011 +++ src/sys/arch/evbmips/include/bus_defs.h Sat Jun 27 03:34:26 2015 @@ -1,7 +1,8 @@ -/* $NetBSD: bus_defs.h,v 1.1 2011/07/01 17:09:59 dyoung Exp $ */ +/* $NetBSD: bus_defs.h,v 1.2 2015/06/27 03:34:26 matt Exp $ */ #ifndef _EVBMIPS_BUS_DEFS_H_ -#define _EVBMIPS_BUS_DEFS_H_ +#define _EVBMIPS_BUS_DEFS_H_ + #define _MIPS_NEED_BUS_DMA_BOUNCE #include mips/bus_space_defs.h
CVS commit: src/lib/libpthread
Module Name:src Committed By: pooka Date: Fri Jun 26 11:25:22 UTC 2015 Modified Files: src/lib/libpthread: pthread_types.h Log Message: Rev 1.14 was nice except it didn't work with _INITIALIZER, which sort of negates the whole point ... so revert everything while in drawing board mode. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libpthread/pthread_types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpthread/pthread_types.h diff -u src/lib/libpthread/pthread_types.h:1.15 src/lib/libpthread/pthread_types.h:1.16 --- src/lib/libpthread/pthread_types.h:1.15 Fri Jun 26 10:05:17 2015 +++ src/lib/libpthread/pthread_types.h Fri Jun 26 11:25:22 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_types.h,v 1.15 2015/06/26 10:05:17 pooka Exp $ */ +/* $NetBSD: pthread_types.h,v 1.16 2015/06/26 11:25:22 pooka Exp $ */ /*- * Copyright (c) 2001, 2008 The NetBSD Foundation, Inc. @@ -84,21 +84,6 @@ struct __pthread_attr_st { }; /* - * C++ (namely libc++) expects to be using PTHREAD_FOO_INITIALIZER as a - * member initializer. This does not work for volatile types. Since C++ - * does not touch the guts of those types, we redefine them as non-volatile - */ -#ifdef __cplusplus -# define __pthread_spin_t \ -struct { unsigned char _simplelock[sizeof(__cpu_simple_lock_t)]; } \ -__aligned(__alignof(__cpu_simple_lock_t)) -# define __pthread_volatile -#else /* __cplusplus */ -# define __pthread_spin_t pthread_spin_t -# define __pthread_volatile volatile -#endif /* __cplusplus */ - -/* * ptm_owner is the actual lock field which is locked via CAS operation. * This structure's layout is designed to compatible with the previous * version used in SA pthreads. @@ -115,16 +100,16 @@ struct __pthread_attr_st { #endif struct __pthread_mutex_st { unsigned int ptm_magic; - __pthread_spin_t ptm_errorcheck; + pthread_spin_t ptm_errorcheck; #ifdef __CPU_SIMPLE_LOCK_PAD uint8_t ptm_pad1[3]; #endif - __pthread_spin_t ptm_interlock; /* unused - backwards compat */ + pthread_spin_t ptm_interlock; /* unused - backwards compat */ #ifdef __CPU_SIMPLE_LOCK_PAD uint8_t ptm_pad2[3]; #endif - __pthread_volatile pthread_t ptm_owner; - pthread_t * __pthread_volatile ptm_waiters; + volatile pthread_t ptm_owner; + pthread_t * volatile ptm_waiters; unsigned int ptm_recursed; void *ptm_spare2; /* unused - backwards compat */ }; @@ -160,7 +145,7 @@ struct __pthread_cond_st { unsigned int ptc_magic; /* Protects the queue of waiters */ - __pthread_spin_t ptc_lock; + pthread_spin_t ptc_lock; pthread_queue_t ptc_waiters; pthread_mutex_t *ptc_mutex; /* Current mutex */ @@ -194,7 +179,7 @@ struct __pthread_once_st { struct __pthread_spinlock_st { unsigned int pts_magic; - __pthread_spin_t pts_spin; + pthread_spin_t pts_spin; int pts_flags; }; @@ -212,12 +197,12 @@ struct __pthread_rwlock_st { unsigned int ptr_magic; /* Protects data below */ - __pthread_spin_t ptr_interlock; + pthread_spin_t ptr_interlock; pthread_queue_t ptr_rblocked; pthread_queue_t ptr_wblocked; unsigned int ptr_nreaders; - __pthread_volatile pthread_t ptr_owner; + volatile pthread_t ptr_owner; void *ptr_private; };
CVS commit: src/doc
Module Name:src Committed By: pooka Date: Fri Jun 26 10:25:41 UTC 2015 Modified Files: src/doc: HACKS Log Message: document g++ 5.1 + libpthread volatile workaround (PR lib/49989) To generate a diff of this commit: cvs rdiff -u -r1.159 -r1.160 src/doc/HACKS Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/HACKS diff -u src/doc/HACKS:1.159 src/doc/HACKS:1.160 --- src/doc/HACKS:1.159 Fri May 8 09:44:45 2015 +++ src/doc/HACKS Fri Jun 26 10:25:41 2015 @@ -1,4 +1,4 @@ -# $NetBSD: HACKS,v 1.159 2015/05/08 09:44:45 martin Exp $ +# $NetBSD: HACKS,v 1.160 2015/06/26 10:25:41 pooka Exp $ # # This file is intended to document workarounds for currently unsolved # (mostly) compiler bugs. @@ -381,6 +381,28 @@ descr used in the link(2) system call. kcah +hack g++ 5.1 barfs on volatile in initializers +cdata 26 Jun 2015 +who pooka +file src/lib/libpthread/pthread_types.h : 1.14 +file src/lib/libpthread/pthread_types.h : 1.15 +pr lib/49989 +descr + Trying to use e.g. pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER + in C++ results in: + error: temporary of non-literal type '__pthread_mutex_st' + in a constant expression + constexpr mutex() _NOEXCEPT : __m_(PTHREAD_MUTEX_INITIALIZER) {} + [...] + include/pthread_types.h:101:8: note: '__pthread_mutex_st' is + not literal because: + struct __pthread_mutex_st { + ^ + include/pthread_types.h:103:17: note: non-static data + member '__pthread_mutex_st::ptm_errorcheck' has volatile type + pthread_spin_t ptm_errorcheck; +kcah + port vax hack gcc4/vax ICE
CVS commit: src/tests/lib/libpthread
Module Name:src Committed By: pooka Date: Fri Jun 26 11:07:20 UTC 2015 Modified Files: src/tests/lib/libpthread: t_rwlock.c Log Message: Check that PTHREAD_RWLOCK_INITIALIZER works. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libpthread/t_rwlock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libpthread/t_rwlock.c diff -u src/tests/lib/libpthread/t_rwlock.c:1.1 src/tests/lib/libpthread/t_rwlock.c:1.2 --- src/tests/lib/libpthread/t_rwlock.c:1.1 Fri Jul 16 15:42:53 2010 +++ src/tests/lib/libpthread/t_rwlock.c Fri Jun 26 11:07:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_rwlock.c,v 1.1 2010/07/16 15:42:53 jmmv Exp $ */ +/* $NetBSD: t_rwlock.c,v 1.2 2015/06/26 11:07:20 pooka Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ #include sys/cdefs.h __COPYRIGHT(@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved.); -__RCSID($NetBSD: t_rwlock.c,v 1.1 2010/07/16 15:42:53 jmmv Exp $); +__RCSID($NetBSD: t_rwlock.c,v 1.2 2015/06/26 11:07:20 pooka Exp $); #include errno.h #include pthread.h @@ -70,6 +70,8 @@ pthread_rwlock_t lk; struct timespec to; +static pthread_rwlock_t static_rwlock = PTHREAD_RWLOCK_INITIALIZER; + /* ARGSUSED */ static void * do_nothing(void *dummy) @@ -117,9 +119,23 @@ ATF_TC_BODY(rwlock1, tc) %s, strerror(error)); } +ATF_TC(rwlock_static); +ATF_TC_HEAD(rwlock_static, tc) +{ + atf_tc_set_md_var(tc, descr, rwlock w/ static initializer); +} +ATF_TC_BODY(rwlock_static, tc) +{ + + PTHREAD_REQUIRE(pthread_rwlock_rdlock(static_rwlock)); + PTHREAD_REQUIRE(pthread_rwlock_unlock(static_rwlock)); + PTHREAD_REQUIRE(pthread_rwlock_destroy(static_rwlock)); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, rwlock1); + ATF_TP_ADD_TC(tp, rwlock_static); return atf_no_error(); }