CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: jmcneill Date: Sat Nov 10 01:56:28 UTC 2018 Modified Files: src/sys/arch/arm/cortex: gicv3.c gicv3.h Log Message: Implement pic_get_affinity/pic_set_affinity for SPIs To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/cortex/gicv3.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/cortex/gicv3.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/arm/cortex/gicv3.c diff -u src/sys/arch/arm/cortex/gicv3.c:1.5 src/sys/arch/arm/cortex/gicv3.c:1.6 --- src/sys/arch/arm/cortex/gicv3.c:1.5 Fri Nov 9 23:36:24 2018 +++ src/sys/arch/arm/cortex/gicv3.c Sat Nov 10 01:56:28 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: gicv3.c,v 1.5 2018/11/09 23:36:24 jmcneill Exp $ */ +/* $NetBSD: gicv3.c,v 1.6 2018/11/10 01:56:28 jmcneill Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -31,7 +31,7 @@ #define _INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.5 2018/11/09 23:36:24 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.6 2018/11/10 01:56:28 jmcneill Exp $"); #include #include @@ -68,6 +68,12 @@ gicd_write_4(struct gicv3_softc *sc, bus bus_space_write_4(sc->sc_bst, sc->sc_bsh_d, reg, val); } +static inline uint64_t +gicd_read_8(struct gicv3_softc *sc, bus_size_t reg) +{ + return bus_space_read_8(sc->sc_bst, sc->sc_bsh_d, reg); +} + static inline void gicd_write_8(struct gicv3_softc *sc, bus_size_t reg, uint64_t val) { @@ -177,7 +183,7 @@ gicv3_establish_irq(struct pic_softc *pi irouter = GICD_IROUTER_Interrupt_Routing_mode; } else { /* Route non-MP-safe interrupts to the primary PE only */ - irouter = sc->sc_default_irouter; + irouter = sc->sc_irouter[0]; } gicd_write_8(sc, GICD_IROUTER(is->is_irq), irouter); @@ -365,19 +371,17 @@ gicv3_cpu_init(struct pic_softc *pic, st ci->ci_gic_redist = gicv3_find_redist(sc); ci->ci_gic_sgir = gicv3_sgir(sc); - if (CPU_IS_PRIMARY(ci)) { - /* Store route to primary CPU for non-MPSAFE SPIs */ - const uint64_t cpu_identity = gicv3_cpu_identity(); - const u_int aff0 = __SHIFTOUT(cpu_identity, GICR_TYPER_Affinity_Value_Aff0); - const u_int aff1 = __SHIFTOUT(cpu_identity, GICR_TYPER_Affinity_Value_Aff1); - const u_int aff2 = __SHIFTOUT(cpu_identity, GICR_TYPER_Affinity_Value_Aff2); - const u_int aff3 = __SHIFTOUT(cpu_identity, GICR_TYPER_Affinity_Value_Aff3); - sc->sc_default_irouter = - __SHIFTIN(aff0, GICD_IROUTER_Aff0) | - __SHIFTIN(aff1, GICD_IROUTER_Aff1) | - __SHIFTIN(aff2, GICD_IROUTER_Aff2) | - __SHIFTIN(aff3, GICD_IROUTER_Aff3); - } + /* Store route to CPU for SPIs */ + const uint64_t cpu_identity = gicv3_cpu_identity(); + const u_int aff0 = __SHIFTOUT(cpu_identity, GICR_TYPER_Affinity_Value_Aff0); + const u_int aff1 = __SHIFTOUT(cpu_identity, GICR_TYPER_Affinity_Value_Aff1); + const u_int aff2 = __SHIFTOUT(cpu_identity, GICR_TYPER_Affinity_Value_Aff2); + const u_int aff3 = __SHIFTOUT(cpu_identity, GICR_TYPER_Affinity_Value_Aff3); + sc->sc_irouter[cpu_index(ci)] = + __SHIFTIN(aff0, GICD_IROUTER_Aff0) | + __SHIFTIN(aff1, GICD_IROUTER_Aff1) | + __SHIFTIN(aff2, GICD_IROUTER_Aff2) | + __SHIFTIN(aff3, GICD_IROUTER_Aff3); /* Enable System register access and disable IRQ/FIQ bypass */ icc_sre = ICC_SRE_EL1_SRE | ICC_SRE_EL1_DFB | ICC_SRE_EL1_DIB; @@ -446,6 +450,54 @@ gicv3_ipi_send(struct pic_softc *pic, co icc_sgi1r_write(intid | aff | targets); } } + +static void +gicv3_get_affinity(struct pic_softc *pic, size_t irq, kcpuset_t *affinity) +{ + struct gicv3_softc * const sc = PICTOSOFTC(pic); + const size_t group = irq / 32; + int n; + + kcpuset_zero(affinity); + if (group == 0) { + /* All CPUs are targets for group 0 (SGI/PPI) */ + for (n = 0; n < ncpu; n++) { + if (sc->sc_irouter[n] != UINT64_MAX) +kcpuset_set(affinity, n); + } + } else { + /* Find distributor targets (SPI) */ + const uint64_t irouter = gicd_read_8(sc, GICD_IROUTER(irq)); + for (n = 0; n < ncpu; n++) { + if (irouter == GICD_IROUTER_Interrupt_Routing_mode || + irouter == sc->sc_irouter[n]) +kcpuset_set(affinity, n); + } + } +} + +static int +gicv3_set_affinity(struct pic_softc *pic, size_t irq, const kcpuset_t *affinity) +{ + struct gicv3_softc * const sc = PICTOSOFTC(pic); + const size_t group = irq / 32; + uint64_t irouter; + + if (group == 0) + return EINVAL; + + const int set = kcpuset_countset(affinity); + if (set == ncpu) + irouter = GICD_IROUTER_Interrupt_Routing_mode; + else if (set == 1) + irouter = sc->sc_irouter[kcpuset_ffs(affinity)]; + else + return EINVAL; + + gicd_write_8(sc, GICD_IROUTER(irq), irouter); + + return 0; +} #endif static const struct pic_ops gicv3_picops = { @@ -456,6 +508,8 @@ static const struct pic_ops gicv3_picops #ifdef MULTIPROCESSOR .pic_cpu_init = gicv3_cpu_init, .pic_ipi_send = gicv3_ipi_send, + .pic_get_affinity = gicv3_get_affinity, + .pic_set_affinity
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: jmcneill Date: Sat Nov 10 01:56:28 UTC 2018 Modified Files: src/sys/arch/arm/cortex: gicv3.c gicv3.h Log Message: Implement pic_get_affinity/pic_set_affinity for SPIs To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/cortex/gicv3.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/cortex/gicv3.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/xserver
Module Name:src Committed By: macallan Date: Sat Nov 10 01:44:26 UTC 2018 Added Files: src/distrib/sets/lists/xserver: md.iyonix Log Message: set list for Xorg on iyonix To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/xserver/md.iyonix Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/xserver
Module Name:src Committed By: macallan Date: Sat Nov 10 01:44:26 UTC 2018 Added Files: src/distrib/sets/lists/xserver: md.iyonix Log Message: set list for Xorg on iyonix To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/xserver/md.iyonix Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/distrib/sets/lists/xserver/md.iyonix diff -u /dev/null src/distrib/sets/lists/xserver/md.iyonix:1.1 --- /dev/null Sat Nov 10 01:44:26 2018 +++ src/distrib/sets/lists/xserver/md.iyonix Sat Nov 10 01:44:26 2018 @@ -0,0 +1,72 @@ +# $NetBSD: md.iyonix,v 1.1 2018/11/10 01:44:26 macallan Exp $ +./usr/X11R7/bin/X -unknown- xorg +./usr/X11R7/bin/Xorg -unknown- xorg +./usr/X11R7/bin/cvt -unknown- xorg +./usr/X11R7/bin/gtf -unknown- xorg +./usr/X11R7/lib/X11/doc/README.modes -unknown- xorg +./usr/X11R7/lib/modules/drivers/kbd_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/kbd_drv.so.1 -unknown- xorg +./usr/X11R7/lib/modules/drivers/mouse_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/mouse_drv.so.1 -unknown- xorg +./usr/X11R7/lib/modules/drivers/nv_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/nv_drv.so.2 -unknown- xorg +./usr/X11R7/lib/modules/drivers/ws_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/ws_drv.so.1 -unknown- xorg +./usr/X11R7/lib/modules/drivers/wsfb_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/wsfb_drv.so.0 -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdri.a -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdri.so -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdri.so.0 -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdri2.a -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdri2.so -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdri2.so.0 -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdri2_pic.a -unknown- xorg,picinstall,obsolete +./usr/X11R7/lib/modules/extensions/libdri_pic.a -unknown- xorg,picinstall,obsolete +./usr/X11R7/lib/modules/extensions/libglx.a -unknown- xorg,obsolete +./usr/X11R7/lib/modules/extensions/libglx.so -unknown- xorg +./usr/X11R7/lib/modules/extensions/libglx.so.0 -unknown- xorg +./usr/X11R7/lib/modules/extensions/libglx_pic.a -unknown- xorg,picinstall,obsolete +./usr/X11R7/lib/modules/extensions/libshadow.a -unknown- xorg,obsolete +./usr/X11R7/lib/modules/extensions/libshadow.so -unknown- xorg +./usr/X11R7/lib/modules/extensions/libshadow.so.0 -unknown- xorg +./usr/X11R7/lib/modules/extensions/libshadow_pic.a -unknown- xorg,picinstall,obsolete +./usr/X11R7/lib/modules/libexa.so -unknown- xorg +./usr/X11R7/lib/modules/libexa.so.0 -unknown- xorg +./usr/X11R7/lib/modules/libexa_pic.a -unknown- xorg,picinstall,obsolete +./usr/X11R7/lib/modules/libfb.a-unknown- xorg +./usr/X11R7/lib/modules/libfb.so -unknown- xorg +./usr/X11R7/lib/modules/libfb.so.0 -unknown- xorg +./usr/X11R7/lib/modules/libfb_pic.a -unknown- xorg,picinstall,obsolete +./usr/X11R7/lib/modules/libshadowfb.a -unknown- xorg,obsolete +./usr/X11R7/lib/modules/libshadowfb.so -unknown- xorg +./usr/X11R7/lib/modules/libshadowfb.so.0 -unknown- xorg +./usr/X11R7/lib/modules/libshadowfb_pic.a -unknown- xorg,picinstall,obsolete +./usr/X11R7/lib/modules/libvbe.a -unknown- xorg,obsolete +./usr/X11R7/lib/modules/libvbe.so -unknown- xorg +./usr/X11R7/lib/modules/libvbe.so.0 -unknown- xorg +./usr/X11R7/lib/modules/libvbe_pic.a -unknown- xorg,picinstall,obsolete +./usr/X11R7/lib/modules/libvgahw.a -unknown- xorg,obsolete +./usr/X11R7/lib/modules/libvgahw.so -unknown- xorg +./usr/X11R7/lib/modules/libvgahw.so.0 -unknown- xorg +./usr/X11R7/lib/modules/libvgahw_pic.a -unknown- xorg,picinstall,obsolete +./usr/X11R7/man/html1/Xorg.html-unknown- html,xorg +./usr/X11R7/man/html1/cvt.html-unknown- html,xorg +./usr/X11R7/man/html1/gtf.html-unknown- html,xorg +./usr/X11R7/man/html4/exa.html-unknown- html,xorg +./usr/X11R7/man/html4/kbd.html-unknown- html,xorg +./usr/X11R7/man/html4/mousedrv.html -unknown- html,xorg +./usr/X11R7/man/html4/nv.html-unknown- html,xorg +./usr/X11R7/man/html4/ws.html-unknown- html,xorg +./usr/X11R7/man/html4/wsfb.html-unknown- html,xorg +./usr/X11R7/man/html5/xorg.conf.html -unknown- html,xorg +./usr/X11R7/man/man1/Xorg.1-unknown- .man,xorg +./usr/X11R7/man/man1/cvt.1-unknown- .man,xorg +./usr/X11R7/man/man1/gtf.1-unknown- .man,xorg +./usr/X11R7/man/man4/exa.4-unknown- .man,xorg +./usr/X11R7/man/man4/kbd.4-unknown- .man,xorg +./usr/X11R7/man/man4/mousedrv.4-unknown- .man,xorg +./usr/X11R7/man/man4/nv.4-unknown- .man,xorg +./usr/X11R7/man/man4/ws.4-unknown- .man,xorg +./usr/X11R7/man/man4/wsfb.4-unknown- .man,xorg +./usr/X11R7/man/man5/xorg.conf.5 -unknown- .man,xorg +./usr/X11R7/share/aclocal/xorg-server.m4 -unknown- xorg
CVS commit: src/share/mk
Module Name:src Committed By: macallan Date: Sat Nov 10 01:40:47 UTC 2018 Modified Files: src/share/mk: bsd.own.mk Log Message: more Xorg on iyonix building goop To generate a diff of this commit: cvs rdiff -u -r1.1078 -r1.1079 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1078 src/share/mk/bsd.own.mk:1.1079 --- src/share/mk/bsd.own.mk:1.1078 Sat Oct 6 18:52:59 2018 +++ src/share/mk/bsd.own.mk Sat Nov 10 01:40:46 2018 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1078 2018/10/06 18:52:59 martin Exp $ +# $NetBSD: bsd.own.mk,v 1.1079 2018/11/10 01:40:46 macallan Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -980,7 +980,7 @@ MKCOMPATMODULES:= no # These platforms use softfloat by default. # .if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" -MKSOFTFLOAT?= yes +MKSOFTFLOAT?= no .endif # @@ -1206,6 +1206,7 @@ MKSLJIT= yes ${MACHINE} == "hpcsh" || \ ${MACHINE} == "i386" || \ ${MACHINE} == "ibmnws" || \ +${MACHINE} == "iyonix" || \ ${MACHINE} == "luna68k" || \ ${MACHINE} == "mac68k" || \ ${MACHINE} == "macppc" || \
CVS commit: src/share/mk
Module Name:src Committed By: macallan Date: Sat Nov 10 01:40:47 UTC 2018 Modified Files: src/share/mk: bsd.own.mk Log Message: more Xorg on iyonix building goop To generate a diff of this commit: cvs rdiff -u -r1.1078 -r1.1079 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/mit/xorg/server
Module Name:src Committed By: macallan Date: Sat Nov 10 01:38:02 UTC 2018 Modified Files: src/external/mit/xorg/server/drivers: Makefile src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos: Makefile Log Message: build Xorg with nv and wsfb drivers on iyonix To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/external/mit/xorg/server/drivers/Makefile cvs rdiff -u -r1.45 -r1.46 \ src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/drivers/Makefile diff -u src/external/mit/xorg/server/drivers/Makefile:1.95 src/external/mit/xorg/server/drivers/Makefile:1.96 --- src/external/mit/xorg/server/drivers/Makefile:1.95 Sat Dec 23 10:15:52 2017 +++ src/external/mit/xorg/server/drivers/Makefile Sat Nov 10 01:38:02 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.95 2017/12/23 10:15:52 nakayama Exp $ +# $NetBSD: Makefile,v 1.96 2018/11/10 01:38:02 macallan Exp $ .include @@ -212,6 +212,12 @@ SUBDIR+= \ xf86-video-s3 .endif # ${MACHINE} == "ibmnws" +.if ${MACHINE} == "iyonix" +SUBDIR+= \ + xf86-video-nv \ + xf86-video-wsfb +.endif # ${MACHINE} == "iyonix" + .if ${MACHINE} == "luna68k" SUBDIR+= \ xf86-video-wsfb Index: src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile diff -u src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile:1.45 src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile:1.46 --- src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile:1.45 Tue Aug 16 19:09:48 2016 +++ src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile Sat Nov 10 01:38:02 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.45 2016/08/16 19:09:48 mrg Exp $ +# $NetBSD: Makefile,v 1.46 2018/11/10 01:38:02 macallan Exp $ .include "../../../Makefile.serverlib" .include "../../../Makefile.servermod" @@ -71,6 +71,7 @@ CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DPCVT .if ${MACHINE} == "cats" || \ ${MACHINE} == "evbarm" || \ ${MACHINE} == "hpcarm" || \ +${MACHINE} == "iyonix" || \ ${MACHINE} == "shark" || \ ${MACHINE} == "netwinder" || \ ${MACHINE} == "zaurus"
CVS commit: src/external/mit/xorg/server
Module Name:src Committed By: macallan Date: Sat Nov 10 01:38:02 UTC 2018 Modified Files: src/external/mit/xorg/server/drivers: Makefile src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos: Makefile Log Message: build Xorg with nv and wsfb drivers on iyonix To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/external/mit/xorg/server/drivers/Makefile cvs rdiff -u -r1.45 -r1.46 \ src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/fdt
Module Name:src Committed By: jmcneill Date: Sat Nov 10 01:24:06 UTC 2018 Modified Files: src/sys/arch/arm/fdt: gicv3_fdt.c Log Message: Initialize gic softc dma tag To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/fdt/gicv3_fdt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/fdt
Module Name:src Committed By: jmcneill Date: Sat Nov 10 01:24:06 UTC 2018 Modified Files: src/sys/arch/arm/fdt: gicv3_fdt.c Log Message: Initialize gic softc dma tag To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/fdt/gicv3_fdt.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/arm/fdt/gicv3_fdt.c diff -u src/sys/arch/arm/fdt/gicv3_fdt.c:1.3 src/sys/arch/arm/fdt/gicv3_fdt.c:1.4 --- src/sys/arch/arm/fdt/gicv3_fdt.c:1.3 Sat Sep 29 18:27:36 2018 +++ src/sys/arch/arm/fdt/gicv3_fdt.c Sat Nov 10 01:24:06 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: gicv3_fdt.c,v 1.3 2018/09/29 18:27:36 jmcneill Exp $ */ +/* $NetBSD: gicv3_fdt.c,v 1.4 2018/11/10 01:24:06 jmcneill Exp $ */ /*- * Copyright (c) 2015-2018 Jared McNeill @@ -29,7 +29,7 @@ #define _INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: gicv3_fdt.c,v 1.3 2018/09/29 18:27:36 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gicv3_fdt.c,v 1.4 2018/11/10 01:24:06 jmcneill Exp $"); #include #include @@ -136,6 +136,7 @@ gicv3_fdt_attach(device_t parent, device sc->sc_phandle = phandle; sc->sc_gic.sc_dev = self; sc->sc_gic.sc_bst = faa->faa_bst; + sc->sc_gic.sc_dmat = faa->faa_dmat; error = gicv3_fdt_map_registers(sc); if (error) {
CVS commit: src/sys/arch/arm/acpi
Module Name:src Committed By: jmcneill Date: Fri Nov 9 23:36:59 UTC 2018 Modified Files: src/sys/arch/arm/acpi: gicv3_acpi.c Log Message: Add GICv3 ITS support To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/acpi/gicv3_acpi.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/arm/acpi/gicv3_acpi.c diff -u src/sys/arch/arm/acpi/gicv3_acpi.c:1.1 src/sys/arch/arm/acpi/gicv3_acpi.c:1.2 --- src/sys/arch/arm/acpi/gicv3_acpi.c:1.1 Sun Oct 21 21:18:41 2018 +++ src/sys/arch/arm/acpi/gicv3_acpi.c Fri Nov 9 23:36:58 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: gicv3_acpi.c,v 1.1 2018/10/21 21:18:41 jmcneill Exp $ */ +/* $NetBSD: gicv3_acpi.c,v 1.2 2018/11/09 23:36:58 jmcneill Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #define _INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: gicv3_acpi.c,v 1.1 2018/10/21 21:18:41 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gicv3_acpi.c,v 1.2 2018/11/09 23:36:58 jmcneill Exp $"); #include #include @@ -47,12 +47,15 @@ __KERNEL_RCSID(0, "$NetBSD: gicv3_acpi.c #include #include +#include #include #define GICD_SIZE 0x1 #define GICR_SIZE 0x2 +#define GITS_SIZE 0x2 extern struct bus_space arm_generic_bs_tag; +extern struct arm32_bus_dma_tag arm_generic_dma_tag; struct gicv3_acpi_softc { struct gicv3_softc sc_gic; @@ -65,6 +68,7 @@ static void gicv3_acpi_attach(device_t, static int gicv3_acpi_map_dist(struct gicv3_acpi_softc *); static int gicv3_acpi_map_redist(struct gicv3_acpi_softc *); +static int gicv3_acpi_map_its(struct gicv3_acpi_softc *); CFATTACH_DECL_NEW(gicv3_acpi, sizeof(struct gicv3_acpi_softc), gicv3_acpi_match, gicv3_acpi_attach, NULL, NULL); @@ -99,6 +103,7 @@ gicv3_acpi_attach(device_t parent, devic sc->sc_gic.sc_dev = self; sc->sc_gic.sc_bst = _generic_bs_tag; + sc->sc_gic.sc_dmat = _generic_dma_tag; sc->sc_madt_gicd = gicd; aprint_naive("\n"); @@ -122,6 +127,8 @@ gicv3_acpi_attach(device_t parent, devic return; } + gicv3_acpi_map_its(sc); + arm_fdt_irq_set_handler(gicv3_irq_handler); } @@ -264,3 +271,36 @@ gicv3_acpi_map_redist(struct gicv3_acpi_ return 0; } + +static ACPI_STATUS +gicv3_acpi_map_gits(ACPI_SUBTABLE_HEADER *hdrp, void *aux) +{ + struct gicv3_acpi_softc * const sc = aux; + ACPI_MADT_GENERIC_TRANSLATOR *gits; + bus_space_handle_t bsh; + + if (hdrp->Type != ACPI_MADT_TYPE_GENERIC_TRANSLATOR) + return AE_OK; + + gits = (ACPI_MADT_GENERIC_TRANSLATOR *)hdrp; + + if (bus_space_map(sc->sc_gic.sc_bst, gits->BaseAddress, GITS_SIZE, 0, ) != 0) { + aprint_error_dev(sc->sc_gic.sc_dev, "failed to map ITS at 0x%" PRIx64 " len %#x\n", + gits->BaseAddress, GITS_SIZE); + return AE_OK; + } + + aprint_normal_dev(sc->sc_gic.sc_dev, "ITS #%#x at 0x%" PRIx64 "\n", gits->TranslationId, gits->BaseAddress); + + gicv3_its_init(>sc_gic, bsh, gits->BaseAddress, gits->TranslationId); + + return AE_OK; +} + +static int +gicv3_acpi_map_its(struct gicv3_acpi_softc *sc) +{ + acpi_madt_walk(gicv3_acpi_map_gits, sc); + + return 0; +}
CVS commit: src/sys/arch/arm/acpi
Module Name:src Committed By: jmcneill Date: Fri Nov 9 23:36:59 UTC 2018 Modified Files: src/sys/arch/arm/acpi: gicv3_acpi.c Log Message: Add GICv3 ITS support To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/acpi/gicv3_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: jmcneill Date: Fri Nov 9 23:36:24 UTC 2018 Modified Files: src/sys/arch/arm/cortex: files.cortex gic_reg.h gicv3.c gicv3.h Added Files: src/sys/arch/arm/cortex: gicv3_its.c gicv3_its.h Log Message: Add support for GICv3 Locality-specific Periphal Interrupts (LPIs) and the Interrupt Translation Service (ITS). To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/cortex/files.cortex cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/cortex/gic_reg.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/cortex/gicv3.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/cortex/gicv3.h cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/cortex/gicv3_its.c \ src/sys/arch/arm/cortex/gicv3_its.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/arm/cortex/files.cortex diff -u src/sys/arch/arm/cortex/files.cortex:1.9 src/sys/arch/arm/cortex/files.cortex:1.10 --- src/sys/arch/arm/cortex/files.cortex:1.9 Sun Oct 21 00:42:05 2018 +++ src/sys/arch/arm/cortex/files.cortex Fri Nov 9 23:36:24 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.cortex,v 1.9 2018/10/21 00:42:05 jmcneill Exp $ +# $NetBSD: files.cortex,v 1.10 2018/11/09 23:36:24 jmcneill Exp $ defflag opt_cpu_in_cksum.h NEON_IN_CKSUM @@ -20,6 +20,7 @@ file arch/arm/cortex/gic_v2m.c armgic & # ARM Generic Interrupt Controller v3+ device gicvthree: pic, pic_splfuncs file arch/arm/cortex/gicv3.c gicvthree +file arch/arm/cortex/gicv3_its.c gicvthree # ARM PL310 L2 Cache Controller(initially on Cortex-A9) device arml2cc Index: src/sys/arch/arm/cortex/gic_reg.h diff -u src/sys/arch/arm/cortex/gic_reg.h:1.7 src/sys/arch/arm/cortex/gic_reg.h:1.8 --- src/sys/arch/arm/cortex/gic_reg.h:1.7 Wed Aug 8 19:01:54 2018 +++ src/sys/arch/arm/cortex/gic_reg.h Fri Nov 9 23:36:24 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: gic_reg.h,v 1.7 2018/08/08 19:01:54 jmcneill Exp $ */ +/* $NetBSD: gic_reg.h,v 1.8 2018/11/09 23:36:24 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -149,6 +149,12 @@ #define GICD_CTRL_EnableGrp1NS __BIT(1) // GICv3 #define GICD_CTRL_Enable __BIT(0) +#define GICD_TYPER_No1N __BIT(25) // GICv3 +#define GICD_TYPER_A3V __BIT(24) // GICv3 +#define GICD_TYPER_IDbits __BITS(23,19) // GICv3 +#define GICD_TYPER_DVIS __BIT(18) // GICv3 +#define GICD_TYPER_LPIS __BIT(17) // GICv3 +#define GICD_TYPER_MBIS __BIT(16) // GICv3 #define GICD_TYPER_LSPI __BITS(15,11) #define GICD_TYPER_SecurityExtn __BIT(10) #define GICD_TYPER_CPUNumber __BITS(7,5) @@ -190,7 +196,7 @@ #define GICD_IROUTER_Aff1 __BITS(15,8) #define GICD_IROUTER_Aff0 __BITS(7,0) -#define GICR_CTRL 0x // Redistributor Control Register +#define GICR_CTLR 0x // Redistributor Control Register #define GICR_IIDR 0x0004 // Implementor Identification Register #define GICR_TYPER 0x0008 // Redistributor Type Register #define GICR_STATUSR 0x0010 // Error Reporting Status Register, optional @@ -215,12 +221,12 @@ #define GICR_IGRPMODR0 0x10D00 // Interrupt Group Modifier Register 0 #define GICR_NSACR 0x10E00 // Non-Secure Access Control Register -#define GICR_CTRL_UWP __BIT(31) -#define GICR_CTRL_DPG1S __BIT(26) -#define GICR_CTRL_DPG1NS __BIT(25) -#define GICR_CTRL_DPG0 __BIT(24) -#define GICR_CTRL_RWP __BIT(3) -#define GICR_CTRL_Enable_LPIs __BIT(0) +#define GICR_CTLR_UWP __BIT(31) +#define GICR_CTLR_DPG1S __BIT(26) +#define GICR_CTLR_DPG1NS __BIT(25) +#define GICR_CTLR_DPG0 __BIT(24) +#define GICR_CTLR_RWP __BIT(3) +#define GICR_CTLR_Enable_LPIs __BIT(0) #define GICR_TYPER_Affinity_Value __BITS(63,32) #define GICR_TYPER_Affinity_Value_Aff3 __BITS(63,56) @@ -238,6 +244,40 @@ #define GICR_WAKER_ChildrenAsleep __BIT(2) #define GICR_WAKER_ProcessorSleep __BIT(1) +#define GICR_PROPBASER_OuterCache __BITS(58,56) +#define GICR_PROPBASER_Physical_Address __BITS(51,12) +#define GICR_PROPBASER_Shareability __BITS(11,10) +#define GICR_PROPBASER_InnerCache __BITS(9,7) +#define GICR_PROPBASER_IDbits __BITS(4,0) + +#define GICR_PENDBASER_PTZ __BIT(62) +#define GICR_PENDBASER_OuterCache __BITS(58,56) +#define GICR_PENDBASER_Physical_Address __BITS(51,16) +#define GICR_PENDBASER_Shareability __BITS(11,10) +#define GICR_PENDBASER_InnerCache __BITS(9,7) + +#define GICR_Shareability_NS 0 // Non-shareable +#define GICR_Shareability_IS 1 // Inner Shareable +#define GICR_Shareability_OS 2 // Outer Shareable + +#define GICR_Cache_DEVICE_nGnRnE 0 // Device-nGnRnE +#define GICR_Cache_NORMAL_NC 1 // Non-cacheable +#define GICR_Cache_NORMAL_RA_WT 2 // Cacheable Read-allocate, Write-through +#define GICR_Cache_NORMAL_RA_WB 3 // Cacheable Read-allocate, Write-back +#define GICR_Cache_NORMAL_WA_WT 4 // Cacheable Write-allocate, Write-through +#define GICR_Cache_NORMAL_WA_WB 5 // Cacheable Write-allocate, Write-back +#define GICR_Cache_NORMAL_RA_WA_WT 6 //
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: jmcneill Date: Fri Nov 9 23:36:24 UTC 2018 Modified Files: src/sys/arch/arm/cortex: files.cortex gic_reg.h gicv3.c gicv3.h Added Files: src/sys/arch/arm/cortex: gicv3_its.c gicv3_its.h Log Message: Add support for GICv3 Locality-specific Periphal Interrupts (LPIs) and the Interrupt Translation Service (ITS). To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/cortex/files.cortex cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/cortex/gic_reg.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/cortex/gicv3.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/cortex/gicv3.h cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/cortex/gicv3_its.c \ src/sys/arch/arm/cortex/gicv3_its.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/fdt
Module Name:src Committed By: jmcneill Date: Fri Nov 9 23:35:06 UTC 2018 Modified Files: src/sys/arch/arm/fdt: fdt_intr.h Log Message: Increase max PIC sources To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/fdt/fdt_intr.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/arm/fdt/fdt_intr.h diff -u src/sys/arch/arm/fdt/fdt_intr.h:1.4 src/sys/arch/arm/fdt/fdt_intr.h:1.5 --- src/sys/arch/arm/fdt/fdt_intr.h:1.4 Wed Sep 5 10:20:47 2018 +++ src/sys/arch/arm/fdt/fdt_intr.h Fri Nov 9 23:35:06 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_intr.h,v 1.4 2018/09/05 10:20:47 jmcneill Exp $ */ +/* $NetBSD: fdt_intr.h,v 1.5 2018/11/09 23:35:06 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -36,8 +36,8 @@ #define __HAVE_PIC_SET_PRIORITY #define __HAVE_PIC_PENDING_INTRS -#define PIC_MAXSOURCES 480 -#define PIC_MAXMAXSOURCES (PIC_MAXSOURCES + 32) +#define PIC_MAXSOURCES 8192 +#define PIC_MAXMAXSOURCES (PIC_MAXSOURCES * 2 + 32) void arm_fdt_irq_set_handler(void (*)(void *)); void arm_fdt_irq_handler(void *);
CVS commit: src/sys/arch/arm/fdt
Module Name:src Committed By: jmcneill Date: Fri Nov 9 23:35:06 UTC 2018 Modified Files: src/sys/arch/arm/fdt: fdt_intr.h Log Message: Increase max PIC sources To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/fdt/fdt_intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/pic
Module Name:src Committed By: jmcneill Date: Fri Nov 9 23:34:20 UTC 2018 Modified Files: src/sys/arch/arm/pic: picvar.h Log Message: Increase size of is_irq and pic_irqbase To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/pic/picvar.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/arm/pic/picvar.h diff -u src/sys/arch/arm/pic/picvar.h:1.20 src/sys/arch/arm/pic/picvar.h:1.21 --- src/sys/arch/arm/pic/picvar.h:1.20 Fri Oct 12 21:46:32 2018 +++ src/sys/arch/arm/pic/picvar.h Fri Nov 9 23:34:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: picvar.h,v 1.20 2018/10/12 21:46:32 jmcneill Exp $ */ +/* $NetBSD: picvar.h,v 1.21 2018/11/09 23:34:20 jmcneill Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -117,7 +117,7 @@ struct intrsource { struct pic_softc *is_pic; /* owning PIC */ uint8_t is_type; /* IST_xxx */ uint8_t is_ipl;/* IPL_xxx */ - uint16_t is_irq; /* local to pic */ + uint32_t is_irq; /* local to pic */ uint8_t is_iplidx; bool is_mpsafe; char is_source[16]; @@ -145,7 +145,7 @@ struct pic_softc { size_t pic_maxsources; percpu_t *pic_percpu; uint8_t pic_id; - int16_t pic_irqbase; + int pic_irqbase; char pic_name[14]; };
CVS commit: src/sys/arch/arm/pic
Module Name:src Committed By: jmcneill Date: Fri Nov 9 23:34:20 UTC 2018 Modified Files: src/sys/arch/arm/pic: picvar.h Log Message: Increase size of is_irq and pic_irqbase To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/pic/picvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: maya Date: Fri Nov 9 21:57:09 UTC 2018 Modified Files: src/sys/dev/usb: if_urndis.c if_urndisreg.h Log Message: Set and check NDIS version. Throw away length 1 packets without a warning: we already throw away messages with (len < sizeof(*msg)) a short while after, but print a warning. Hardware is allowed to pad USB packets which % wMaxPacketSize length with such packets for hardware implementation simplicity reasons. This is described in https://docs.microsoft.com/en-us/windows-hardware/drivers/network/usb-short-packets >From Artturi Alm in tech-net, with amendment from pgoyette. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/dev/usb/if_urndis.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/if_urndisreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: maya Date: Fri Nov 9 21:57:09 UTC 2018 Modified Files: src/sys/dev/usb: if_urndis.c if_urndisreg.h Log Message: Set and check NDIS version. Throw away length 1 packets without a warning: we already throw away messages with (len < sizeof(*msg)) a short while after, but print a warning. Hardware is allowed to pad USB packets which % wMaxPacketSize length with such packets for hardware implementation simplicity reasons. This is described in https://docs.microsoft.com/en-us/windows-hardware/drivers/network/usb-short-packets >From Artturi Alm in tech-net, with amendment from pgoyette. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/dev/usb/if_urndis.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/if_urndisreg.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/dev/usb/if_urndis.c diff -u src/sys/dev/usb/if_urndis.c:1.18 src/sys/dev/usb/if_urndis.c:1.19 --- src/sys/dev/usb/if_urndis.c:1.18 Tue Jun 26 06:48:02 2018 +++ src/sys/dev/usb/if_urndis.c Fri Nov 9 21:57:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urndis.c,v 1.18 2018/06/26 06:48:02 msaitoh Exp $ */ +/* $NetBSD: if_urndis.c,v 1.19 2018/11/09 21:57:09 maya Exp $ */ /* $OpenBSD: if_urndis.c,v 1.31 2011/07/03 15:47:17 matthew Exp $ */ /* @@ -21,7 +21,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.18 2018/06/26 06:48:02 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.19 2018/11/09 21:57:09 maya Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -289,7 +289,18 @@ urndis_ctrl_handle_init(struct urndis_so return RNDIS_STATUS_FAILURE; } - sc->sc_lim_pktsz = le32toh(msg->rm_pktmaxsz); + if (le32toh(msg->rm_ver_major) != RNDIS_MAJOR_VERSION || + le32toh(msg->rm_ver_minor) != RNDIS_MINOR_VERSION) { + printf("%s: version not %u.%u (current version: %u.%u)\n", + DEVNAME(sc), RNDIS_MAJOR_VERSION, RNDIS_MINOR_VERSION, + le32toh(msg->rm_ver_major), le32toh(msg->rm_ver_minor)); + + return RNDIS_STATUS_FAILURE; + } + + sc->sc_maxppt = le32toh(msg->rm_pktmaxcnt); + sc->sc_maxtsz = le32toh(msg->rm_pktmaxsz); + sc->sc_palign = 1U << le32toh(msg->rm_align); return le32toh(msg->rm_status); } @@ -402,8 +413,8 @@ urndis_ctrl_init(struct urndis_softc *sc msg->rm_type = htole32(REMOTE_NDIS_INITIALIZE_MSG); msg->rm_len = htole32(sizeof(*msg)); msg->rm_rid = htole32(0); - msg->rm_ver_major = htole32(1); - msg->rm_ver_minor = htole32(1); + msg->rm_ver_major = htole32(RNDIS_MAJOR_VERSION); + msg->rm_ver_minor = htole32(RNDIS_MINOR_VERSION); msg->rm_max_xfersz = htole32(RNDIS_BUFSZ); DPRINTF(("%s: urndis_ctrl_init send: type %u len %u rid %u ver_major %u " @@ -743,7 +754,7 @@ urndis_decap(struct urndis_softc *sc, st ifp = GET_IFP(sc); offset = 0; - while (len > 0) { + while (len > 1) { msg = (struct urndis_packet_msg *)((char*)c->sc_buf + offset); m = c->sc_mbuf; Index: src/sys/dev/usb/if_urndisreg.h diff -u src/sys/dev/usb/if_urndisreg.h:1.3 src/sys/dev/usb/if_urndisreg.h:1.4 --- src/sys/dev/usb/if_urndisreg.h:1.3 Sun Dec 4 10:12:35 2016 +++ src/sys/dev/usb/if_urndisreg.h Fri Nov 9 21:57:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urndisreg.h,v 1.3 2016/12/04 10:12:35 skrll Exp $ */ +/* $NetBSD: if_urndisreg.h,v 1.4 2018/11/09 21:57:09 maya Exp $ */ /* $OpenBSD: if_urndisreg.h,v 1.14 2010/07/08 18:22:01 ckuethe Exp $ */ /* @@ -47,8 +47,10 @@ struct urndis_softc { struct ethercom sc_ec; /* RNDIS device info */ - uint32_t sc_lim_pktsz; uint32_t sc_filter; + uint32_t sc_maxppt; + uint32_t sc_maxtsz; + uint32_t sc_palign; /* USB goo */ struct usbd_device * sc_udev; @@ -122,6 +124,9 @@ struct urndis_softc { #define RNDIS_MEDIUM_802_3 0x +#define RNDIS_MAJOR_VERSION 0x0001U +#define RNDIS_MINOR_VERSION 0xU + /* Device flags */ #define RNDIS_DF_CONNECTIONLESS 0x0001 #define RNDIS_DF_CONNECTION_ORIENTED 0x0002
CVS commit: src
Module Name:src Committed By: abs Date: Fri Nov 9 21:33:50 UTC 2018 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/misc: mi src/etc/mtree: NetBSD.dist.base src/usr.sbin/sliplogin: Makefile Log Message: Install the sample slip.login to share/examples/slip/slip.login To generate a diff of this commit: cvs rdiff -u -r1.1192 -r1.1193 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.208 -r1.209 src/distrib/sets/lists/misc/mi cvs rdiff -u -r1.179 -r1.180 src/etc/mtree/NetBSD.dist.base cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sliplogin/Makefile 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/base/mi diff -u src/distrib/sets/lists/base/mi:1.1192 src/distrib/sets/lists/base/mi:1.1193 --- src/distrib/sets/lists/base/mi:1.1192 Thu Oct 11 15:41:07 2018 +++ src/distrib/sets/lists/base/mi Fri Nov 9 21:33:50 2018 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1192 2018/10/11 15:41:07 christos Exp $ +# $NetBSD: mi,v 1.1193 2018/11/09 21:33:50 abs Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -2249,6 +2249,7 @@ ./usr/share/examples/racoon/roadwarrior/client base-netutil-examples ./usr/share/examples/racoon/roadwarrior/server base-netutil-examples ./usr/share/examples/rtadvd base-router-examples +./usr/share/examples/slip base-slip-examples ./usr/share/examples/smbfs base-sysutil-examples ./usr/share/examples/supfiles base-sup-examples ./usr/share/examples/syslogd base-sysutil-examples Index: src/distrib/sets/lists/misc/mi diff -u src/distrib/sets/lists/misc/mi:1.208 src/distrib/sets/lists/misc/mi:1.209 --- src/distrib/sets/lists/misc/mi:1.208 Sun Sep 23 07:24:19 2018 +++ src/distrib/sets/lists/misc/mi Fri Nov 9 21:33:50 2018 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.208 2018/09/23 07:24:19 maxv Exp $ +# $NetBSD: mi,v 1.209 2018/11/09 21:33:50 abs Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1603,6 +1603,7 @@ ./usr/share/examples/racoon/roadwarrior/server/racoon.conf misc-netutil-examples share ./usr/share/examples/racoon/roadwarrior/server/racoon.conf-radius misc-netutil-examples share ./usr/share/examples/rtadvd/rtadvd.conf misc-router-examples use_inet6,share +./usr/share/examples/slip/slip.login misc-slip-examples share ./usr/share/examples/smbfs/dot.nsmbrc misc-sysutil-examples share ./usr/share/examples/supfiles/ftp.cs.umn.edu misc-obsolete obsolete ./usr/share/examples/supfiles/skarven.itea.unit.no misc-obsolete obsolete Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.179 src/etc/mtree/NetBSD.dist.base:1.180 --- src/etc/mtree/NetBSD.dist.base:1.179 Thu Oct 11 18:04:06 2018 +++ src/etc/mtree/NetBSD.dist.base Fri Nov 9 21:33:50 2018 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.179 2018/10/11 18:04:06 christos Exp $ +# $NetBSD: NetBSD.dist.base,v 1.180 2018/11/09 21:33:50 abs Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -392,6 +392,7 @@ ./usr/share/examples/racoon/roadwarrior/client ./usr/share/examples/racoon/roadwarrior/server ./usr/share/examples/rtadvd +./usr/share/examples/slip ./usr/share/examples/smbfs ./usr/share/examples/supfiles ./usr/share/examples/syslogd Index: src/usr.sbin/sliplogin/Makefile diff -u src/usr.sbin/sliplogin/Makefile:1.6 src/usr.sbin/sliplogin/Makefile:1.7 --- src/usr.sbin/sliplogin/Makefile:1.6 Wed Jul 13 13:10:04 2016 +++ src/usr.sbin/sliplogin/Makefile Fri Nov 9 21:33:50 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2016/07/13 13:10:04 shm Exp $ +# $NetBSD: Makefile,v 1.7 2018/11/09 21:33:50 abs Exp $ # from: @(#)Makefile 8.1 (Berkeley) 7/19/93 USE_FORT?= yes # setuid @@ -7,4 +7,11 @@ MAN= sliplogin.8 BINOWN= root BINMODE=4555 +.include + +.if ${MKSHARE} != "no" +FILESDIR= /usr/share/examples/slip +FILES= slip.login +.endif + .include
CVS commit: src
Module Name:src Committed By: abs Date: Fri Nov 9 21:33:50 UTC 2018 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/misc: mi src/etc/mtree: NetBSD.dist.base src/usr.sbin/sliplogin: Makefile Log Message: Install the sample slip.login to share/examples/slip/slip.login To generate a diff of this commit: cvs rdiff -u -r1.1192 -r1.1193 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.208 -r1.209 src/distrib/sets/lists/misc/mi cvs rdiff -u -r1.179 -r1.180 src/etc/mtree/NetBSD.dist.base cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sliplogin/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Fri Nov 9 15:20:36 UTC 2018 Modified Files: src/usr.sbin/sysinst: disks.c target.c Log Message: Fix test for active root partition when booting from a wedge To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/target.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Fri Nov 9 15:20:36 UTC 2018 Modified Files: src/usr.sbin/sysinst: disks.c target.c Log Message: Fix test for active root partition when booting from a wedge To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/target.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.22 src/usr.sbin/sysinst/disks.c:1.23 --- src/usr.sbin/sysinst/disks.c:1.22 Thu Nov 8 20:29:37 2018 +++ src/usr.sbin/sysinst/disks.c Fri Nov 9 15:20:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.22 2018/11/08 20:29:37 martin Exp $ */ +/* $NetBSD: disks.c,v 1.23 2018/11/09 15:20:36 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -619,7 +619,8 @@ get_disks_helper(void *arg, const char * * Exclude a disk mounted as root partition, * in case of install-image on a USB memstick. */ - if (is_active_rootpart(state->dd->dd_name, 0)) + if (is_active_rootpart(state->dd->dd_name, + state->dd->dd_no_part ? -1 : 0)) return true; if (!state->dd->dd_no_part) { Index: src/usr.sbin/sysinst/target.c diff -u src/usr.sbin/sysinst/target.c:1.3 src/usr.sbin/sysinst/target.c:1.4 --- src/usr.sbin/sysinst/target.c:1.3 Sun Oct 18 09:21:55 2015 +++ src/usr.sbin/sysinst/target.c Fri Nov 9 15:20:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: target.c,v 1.3 2015/10/18 09:21:55 martin Exp $ */ +/* $NetBSD: target.c,v 1.4 2018/11/09 15:20:36 martin Exp $ */ /* * Copyright 1997 Jonathan Stone @@ -71,7 +71,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: target.c,v 1.3 2015/10/18 09:21:55 martin Exp $"); +__RCSID("$NetBSD: target.c,v 1.4 2018/11/09 15:20:36 martin Exp $"); #endif /* @@ -186,8 +186,12 @@ is_active_rootpart(const char *dev, int if (strcmp(dev, rootdev) != 0) return 0; + if (ptn < 0) + return 1; /* device only check, or wedge */ + mib[1] = KERN_ROOT_PARTITION; varlen = sizeof rootptn; + rootptn = -1; if (sysctl(mib, 2, , , NULL, 0) < 0) return 1;
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Fri Nov 9 14:39:51 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_mmc.c Log Message: Enable new timings and HS200 mode on A64 eMMC To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/sunxi/sunxi_mmc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Fri Nov 9 14:39:51 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_mmc.c Log Message: Enable new timings and HS200 mode on A64 eMMC To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/sunxi/sunxi_mmc.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/arm/sunxi/sunxi_mmc.c diff -u src/sys/arch/arm/sunxi/sunxi_mmc.c:1.27 src/sys/arch/arm/sunxi/sunxi_mmc.c:1.28 --- src/sys/arch/arm/sunxi/sunxi_mmc.c:1.27 Mon Sep 3 16:29:24 2018 +++ src/sys/arch/arm/sunxi/sunxi_mmc.c Fri Nov 9 14:39:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_mmc.c,v 1.27 2018/09/03 16:29:24 riastradh Exp $ */ +/* $NetBSD: sunxi_mmc.c,v 1.28 2018/11/09 14:39:51 jmcneill Exp $ */ /*- * Copyright (c) 2014-2017 Jared McNeill @@ -29,7 +29,7 @@ #include "opt_sunximmc.h" #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.27 2018/09/03 16:29:24 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.28 2018/11/09 14:39:51 jmcneill Exp $"); #include #include @@ -254,7 +254,9 @@ static const struct sunxi_mmc_config sun .idma_xferlen = 0x2000, .dma_ftrglevel = 0x20070008, .delays = NULL, - .flags = SUNXI_MMC_FLAG_CALIB_REG, + .flags = SUNXI_MMC_FLAG_CALIB_REG | + SUNXI_MMC_FLAG_NEW_TIMINGS | + SUNXI_MMC_FLAG_HS200, }; static const struct sunxi_mmc_config sun50i_h6_mmc_config = {
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: jmcneill Date: Fri Nov 9 14:39:20 UTC 2018 Modified Files: src/sys/dev/sdmmc: ld_sdmmc.c Log Message: Defer DIOCCACHESYNC to the sdmmc task queue so they are serialized with other requests. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/dev/sdmmc/ld_sdmmc.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/sdmmc/ld_sdmmc.c diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.34 src/sys/dev/sdmmc/ld_sdmmc.c:1.35 --- src/sys/dev/sdmmc/ld_sdmmc.c:1.34 Sun Aug 20 15:58:43 2017 +++ src/sys/dev/sdmmc/ld_sdmmc.c Fri Nov 9 14:39:19 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ld_sdmmc.c,v 1.34 2017/08/20 15:58:43 mlelstv Exp $ */ +/* $NetBSD: ld_sdmmc.c,v 1.35 2018/11/09 14:39:19 jmcneill Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.34 2017/08/20 15:58:43 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.35 2018/11/09 14:39:19 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -78,6 +78,11 @@ struct ld_sdmmc_task { struct buf *task_bp; int task_retries; /* number of xfer retry */ struct callout task_restart_ch; + + kmutex_t task_lock; + kcondvar_t task_cv; + + uintptr_t task_data; }; struct ld_sdmmc_softc { @@ -91,6 +96,7 @@ struct ld_sdmmc_softc { struct evcnt sc_ev_discard; /* discard counter */ struct evcnt sc_ev_discarderr; /* discard error counter */ struct evcnt sc_ev_discardbusy; /* discard busy counter */ + struct evcnt sc_ev_cachesyncbusy; /* cache sync busy counter */ }; static int ld_sdmmc_match(device_t, cfdata_t, void *); @@ -153,6 +159,8 @@ ld_sdmmc_attach(device_t parent, device_ task = >sc_task[i]; task->task_sc = sc; callout_init(>task_restart_ch, CALLOUT_MPSAFE); + mutex_init(>task_lock, MUTEX_DEFAULT, IPL_NONE); + cv_init(>task_cv, "ldsdmmctask"); pcq_put(sc->sc_freeq, task); } @@ -224,8 +232,11 @@ ld_sdmmc_detach(device_t dev, int flags) return rv; ldenddetach(ld); - for (i = 0; i < __arraycount(sc->sc_task); i++) + for (i = 0; i < __arraycount(sc->sc_task); i++) { callout_destroy(>sc_task[i].task_restart_ch); + mutex_destroy(>sc_task[i].task_lock); + cv_destroy(>sc_task[i].task_cv); + } pcq_destroy(sc->sc_freeq); evcnt_detach(>sc_ev_discard); @@ -379,15 +390,56 @@ ld_sdmmc_discard(struct ld_softc *ld, st return 0; } +static void +ld_sdmmc_docachesync(void *arg) +{ + struct ld_sdmmc_task *task = arg; + struct ld_sdmmc_softc *sc = task->task_sc; + const bool poll = (bool)task->task_data; + + task->task_data = sdmmc_mem_flush_cache(sc->sc_sf, poll); + + mutex_enter(>task_lock); + cv_signal(>task_cv); + mutex_exit(>task_lock); +} + +static int +ld_sdmmc_cachesync(struct ld_softc *ld, bool poll) +{ + struct ld_sdmmc_softc *sc = device_private(ld->sc_dv); + struct ld_sdmmc_task *task = pcq_get(sc->sc_freeq); + int error = 0; + + if (task == NULL) { + sc->sc_ev_cachesyncbusy.ev_count++; + return EBUSY; + } + + sdmmc_init_task(>task, ld_sdmmc_docachesync, task); + task->task_data = poll; + + mutex_enter(>task_lock); + sdmmc_add_task(sc->sc_sf->sc, >task); + error = cv_wait_sig(>task_cv, >task_lock); + mutex_exit(>task_lock); + + if (error == 0) + error = (int)task->task_data; + + pcq_put(sc->sc_freeq, task); + + return error; +} + static int ld_sdmmc_ioctl(struct ld_softc *ld, u_long cmd, void *addr, int32_t flag, bool poll) { - struct ld_sdmmc_softc *sc = device_private(ld->sc_dv); switch (cmd) { case DIOCCACHESYNC: - return sdmmc_mem_flush_cache(sc->sc_sf, poll); + return ld_sdmmc_cachesync(ld, poll); default: return EPASSTHROUGH; }
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: jmcneill Date: Fri Nov 9 14:39:20 UTC 2018 Modified Files: src/sys/dev/sdmmc: ld_sdmmc.c Log Message: Defer DIOCCACHESYNC to the sdmmc task queue so they are serialized with other requests. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/dev/sdmmc/ld_sdmmc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: jmcneill Date: Fri Nov 9 14:38:37 UTC 2018 Modified Files: src/sys/dev/sdmmc: sdmmc_mem.c Log Message: Wait for data ready after eMMC flush cache commands To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/dev/sdmmc/sdmmc_mem.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/sdmmc/sdmmc_mem.c diff -u src/sys/dev/sdmmc/sdmmc_mem.c:1.65 src/sys/dev/sdmmc/sdmmc_mem.c:1.66 --- src/sys/dev/sdmmc/sdmmc_mem.c:1.65 Mon Sep 3 16:29:33 2018 +++ src/sys/dev/sdmmc/sdmmc_mem.c Fri Nov 9 14:38:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc_mem.c,v 1.65 2018/09/03 16:29:33 riastradh Exp $ */ +/* $NetBSD: sdmmc_mem.c,v 1.66 2018/11/09 14:38:36 jmcneill Exp $ */ /* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */ /* @@ -45,7 +45,7 @@ /* Routines for SD/MMC memory cards. */ #include -__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.65 2018/09/03 16:29:33 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.66 2018/11/09 14:38:36 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -1640,7 +1640,7 @@ sdmmc_mem_mmc_switch(struct sdmmc_functi if (error) return error; - if (index == EXT_CSD_HS_TIMING && value >= 2) { + if (index == EXT_CSD_FLUSH_CACHE || (index == EXT_CSD_HS_TIMING && value >= 2)) { do { memset(, 0, sizeof(cmd)); cmd.c_opcode = MMC_SEND_STATUS; @@ -1661,7 +1661,7 @@ sdmmc_mem_mmc_switch(struct sdmmc_functi if (error) { aprint_error_dev(sc->sc_dev, - "error waiting for high speed switch: %d\n", + "error waiting for data ready after switch command: %d\n", error); return error; }
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: jmcneill Date: Fri Nov 9 14:38:37 UTC 2018 Modified Files: src/sys/dev/sdmmc: sdmmc_mem.c Log Message: Wait for data ready after eMMC flush cache commands To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/dev/sdmmc/sdmmc_mem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netinet
Module Name:src Committed By: maya Date: Fri Nov 9 11:46:28 UTC 2018 Modified Files: src/sys/netinet: in.h Log Message: Use the same type redefinition guards as stdint.h since rev1.8 PR pkg/53713 To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/sys/netinet/in.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/netinet/in.h diff -u src/sys/netinet/in.h:1.107 src/sys/netinet/in.h:1.108 --- src/sys/netinet/in.h:1.107 Wed Aug 22 01:05:24 2018 +++ src/sys/netinet/in.h Fri Nov 9 11:46:28 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: in.h,v 1.107 2018/08/22 01:05:24 msaitoh Exp $ */ +/* $NetBSD: in.h,v 1.108 2018/11/09 11:46:28 maya Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -42,14 +42,14 @@ #include #include -#ifndef uint8_t +#ifndef _BSD_UINT8_T_ typedef __uint8_t uint8_t; -#define uint8_t __uint8_t +#define _BSD_UINT8_T_ #endif -#ifndef uint32_t +#ifndef _BSD_UINT32_T_ typedef __uint32_t uint32_t; -#define uint32_t __uint32_t +#define _BSD_UINT32_T_ #endif #include
CVS commit: src/sys/netinet
Module Name:src Committed By: maya Date: Fri Nov 9 11:46:28 UTC 2018 Modified Files: src/sys/netinet: in.h Log Message: Use the same type redefinition guards as stdint.h since rev1.8 PR pkg/53713 To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/sys/netinet/in.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: sborrill Date: Fri Nov 9 11:29:12 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1648 To generate a diff of this commit: cvs rdiff -u -r1.1.2.11 -r1.1.2.12 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.11 src/doc/CHANGES-7.3:1.1.2.12 --- src/doc/CHANGES-7.3:1.1.2.11 Tue Oct 30 19:54:56 2018 +++ src/doc/CHANGES-7.3 Fri Nov 9 11:29:12 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.11 2018/10/30 19:54:56 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.12 2018/11/09 11:29:12 sborrill Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -169,3 +169,35 @@ sys/net/npf/npf_ctl.c1.47 (partial, to be loaded. [sborrill, ticket #1646] +sys/dev/mii/inbmphyreg.h 1.11 +sys/dev/pci/if_wm.c1.586-1.588, 1.590-1.596 via patch +sys/dev/pci/if_wmreg.h1.108 + + - rename tu event counter to txunderrun. + - Try m_defrag() to reduce the number of DMA segment if + bus_dmamap_load_mbuf() returned EFBIG. When m_defrag() + is called, txqNNdefrag event counter is incremented. + If the 2nd try of bus_dmamap_load_mbuf() failed, + txqNNtoomanyseg event counter is incremented. + - Reduce the max number of DMA segments from 256 to 64 (it's + the same value as other BSD's (EM_MAX_SCATTER) and more + than before if_wm.c rev. 1.75's value (40)) because we do + m_defrag() now. + - 82574 and newer document says the status field has neither EC + (Excessive Collision) bit nor LC (Late Collision) bit + (reserved), so don't check the bit. + - Add workaround for DMA hang problem which result in TX device + timeout on PCH_LPT with I218. Same as FreeBSD and Linux. This + workaround is only for device ID 0x155a, 0x15a2, 0x1559 and 0x15a3. + - Fix a PCH2 specific bug that wrong PHY register value can be read + when boot. Same as FreeBSD and Linux. + - After writing MDIC register, don't read quickly the same register + but do delay(50). Same as other OSes. + - Add missing wm_gate_hw_phy_config_ich8lan(false) in + wm_phy_post_reset() on PCH2. wm_gate_hw_phy_config_ich8lan(true) + is called in wm_reset(), so wm_gate_hw_phy_config_ich8lan(false) + should be called after reset in wm_phy_post_reset(). + - On PCH2, set the phy config counter to 50msec after (PHY) reset. + - KNF & Use macro. + [msaitoh, ticket #1648] +
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: sborrill Date: Fri Nov 9 11:29:12 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1648 To generate a diff of this commit: cvs rdiff -u -r1.1.2.11 -r1.1.2.12 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/dev
Module Name:src Committed By: sborrill Date: Fri Nov 9 11:28:39 UTC 2018 Modified Files: src/sys/dev/mii [netbsd-7]: inbmphyreg.h src/sys/dev/pci [netbsd-7]: if_wm.c if_wmreg.h Log Message: Pull up the following revisions(s) (requested by msaitoh in ticket #1648): sys/dev/mii/inbmphyreg.h1.11 sys/dev/pci/if_wm.c 1.586-1.588, 1.590-1.596 via patch sys/dev/pci/if_wmreg.h 1.108 - rename tu event counter to txunderrun. - Try m_defrag() to reduce the number of DMA segment if bus_dmamap_load_mbuf() returned EFBIG. When m_defrag() is called, txqNNdefrag event counter is incremented. If the 2nd try of bus_dmamap_load_mbuf() failed, txqNNtoomanyseg event counter is incremented. - Reduce the max number of DMA segments from 256 to 64 (it's the same value as other BSD's (EM_MAX_SCATTER) and more than before if_wm.c rev. 1.75's value (40)) because we do m_defrag() now. - 82574 and newer document says the status field has neither EC (Excessive Collision) bit nor LC (Late Collision) bit (reserved), so don't check the bit. - Add workaround for DMA hang problem which result in TX device timeout on PCH_LPT with I218. Same as FreeBSD and Linux. This workaround is only for device ID 0x155a, 0x15a2, 0x1559 and 0x15a3. - Fix a PCH2 specific bug that wrong PHY register value can be read when boot. Same as FreeBSD and Linux. - After writing MDIC register, don't read quickly the same register but do delay(50). Same as other OSes. - Add missing wm_gate_hw_phy_config_ich8lan(false) in wm_phy_post_reset() on PCH2. wm_gate_hw_phy_config_ich8lan(true) is called in wm_reset(), so wm_gate_hw_phy_config_ich8lan(false) should be called after reset in wm_phy_post_reset(). - On PCH2, set the phy config counter to 50msec after (PHY) reset. - KNF & Use macro. To generate a diff of this commit: cvs rdiff -u -r1.3.30.2 -r1.3.30.3 src/sys/dev/mii/inbmphyreg.h cvs rdiff -u -r1.289.2.16 -r1.289.2.17 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.60.2.9 -r1.60.2.10 src/sys/dev/pci/if_wmreg.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/dev/mii/inbmphyreg.h diff -u src/sys/dev/mii/inbmphyreg.h:1.3.30.2 src/sys/dev/mii/inbmphyreg.h:1.3.30.3 --- src/sys/dev/mii/inbmphyreg.h:1.3.30.2 Sat Aug 11 13:34:21 2018 +++ src/sys/dev/mii/inbmphyreg.h Fri Nov 9 11:28:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: inbmphyreg.h,v 1.3.30.2 2018/08/11 13:34:21 martin Exp $ */ +/* $NetBSD: inbmphyreg.h,v 1.3.30.3 2018/11/09 11:28:39 sborrill Exp $ */ /*** Copyright (c) 2001-2005, Intel Corporation All rights reserved. @@ -104,6 +104,10 @@ POSSIBILITY OF SUCH DAMAGE. #define HV_PM_CTRL BME1000_REG(770, 17) #define HV_PM_CTRL_K1_ENA __BIT(14) +#define I217_INBAND_CTRL BME1000_REG(770, 18) +#define I217_INBAND_CTRL_LINK_STAT_TX_TIMEOUT_MASK 0x3f00 +#define I217_INBAND_CTRL_LINK_STAT_TX_TIMEOUT_SHIFT 8 + #define IGP3_KMRN_DIAG BME1000_REG(770, 19) #define IGP3_KMRN_DIAG_PCS_LOCK_LOSS (1 << 1) Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.289.2.16 src/sys/dev/pci/if_wm.c:1.289.2.17 --- src/sys/dev/pci/if_wm.c:1.289.2.16 Tue Oct 30 08:35:56 2018 +++ src/sys/dev/pci/if_wm.c Fri Nov 9 11:28:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.289.2.16 2018/10/30 08:35:56 sborrill Exp $ */ +/* $NetBSD: if_wm.c,v 1.289.2.17 2018/11/09 11:28:39 sborrill Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -84,7 +84,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.289.2.16 2018/10/30 08:35:56 sborrill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.289.2.17 2018/11/09 11:28:39 sborrill Exp $"); #include #include @@ -163,11 +163,12 @@ int wm_debug = WM_DEBUG_TX | WM_DEBUG_RX * of packets, and we go ahead and manage up to 64 (16 for the i82547) * of them at a time. * - * We allow up to 256 (!) DMA segments per packet. Pathological packet + * We allow up to 64 (!) DMA segments per packet. Pathological packet * chains containing many small mbufs have been observed in zero-copy - * situations with jumbo frames. + * situations with jumbo frames. If a mbuf chain has more than 64 DMA segments, + * m_defrag() is called to reduce it. */ -#define WM_NTXSEGS 256 +#define WM_NTXSEGS 64 #define WM_IFQUEUELEN 256 #define WM_TXQUEUELEN_MAX 64 #define WM_TXQUEUELEN_MAX_82547 16 @@ -366,9 +367,10 @@ struct wm_softc { struct evcnt sc_ev_txtsopain; /* painful header manip. for TSO */ struct evcnt sc_ev_txseg[WM_NTXSEGS]; /* Tx packets w/ N segments */ - struct evcnt sc_ev_txdrop; /* Tx packets dropped(too many segs) */ - - struct evcnt sc_ev_tu; /* Tx underrun */ + struct evcnt sc_ev_txdrop; /* Tx packets dropped(other than txtoomanysegs) */ + struct evcnt sc_ev_txtoomanysegs; /* Tx
CVS commit: [netbsd-7] src/sys/dev
Module Name:src Committed By: sborrill Date: Fri Nov 9 11:28:39 UTC 2018 Modified Files: src/sys/dev/mii [netbsd-7]: inbmphyreg.h src/sys/dev/pci [netbsd-7]: if_wm.c if_wmreg.h Log Message: Pull up the following revisions(s) (requested by msaitoh in ticket #1648): sys/dev/mii/inbmphyreg.h1.11 sys/dev/pci/if_wm.c 1.586-1.588, 1.590-1.596 via patch sys/dev/pci/if_wmreg.h 1.108 - rename tu event counter to txunderrun. - Try m_defrag() to reduce the number of DMA segment if bus_dmamap_load_mbuf() returned EFBIG. When m_defrag() is called, txqNNdefrag event counter is incremented. If the 2nd try of bus_dmamap_load_mbuf() failed, txqNNtoomanyseg event counter is incremented. - Reduce the max number of DMA segments from 256 to 64 (it's the same value as other BSD's (EM_MAX_SCATTER) and more than before if_wm.c rev. 1.75's value (40)) because we do m_defrag() now. - 82574 and newer document says the status field has neither EC (Excessive Collision) bit nor LC (Late Collision) bit (reserved), so don't check the bit. - Add workaround for DMA hang problem which result in TX device timeout on PCH_LPT with I218. Same as FreeBSD and Linux. This workaround is only for device ID 0x155a, 0x15a2, 0x1559 and 0x15a3. - Fix a PCH2 specific bug that wrong PHY register value can be read when boot. Same as FreeBSD and Linux. - After writing MDIC register, don't read quickly the same register but do delay(50). Same as other OSes. - Add missing wm_gate_hw_phy_config_ich8lan(false) in wm_phy_post_reset() on PCH2. wm_gate_hw_phy_config_ich8lan(true) is called in wm_reset(), so wm_gate_hw_phy_config_ich8lan(false) should be called after reset in wm_phy_post_reset(). - On PCH2, set the phy config counter to 50msec after (PHY) reset. - KNF & Use macro. To generate a diff of this commit: cvs rdiff -u -r1.3.30.2 -r1.3.30.3 src/sys/dev/mii/inbmphyreg.h cvs rdiff -u -r1.289.2.16 -r1.289.2.17 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.60.2.9 -r1.60.2.10 src/sys/dev/pci/if_wmreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libm/noieee_src
Module Name:src Committed By: martin Date: Fri Nov 9 10:19:47 UTC 2018 Modified Files: src/lib/libm/noieee_src: n_fmod.c Log Message: Add modfl alias. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libm/noieee_src/n_fmod.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/noieee_src/n_fmod.c diff -u src/lib/libm/noieee_src/n_fmod.c:1.10 src/lib/libm/noieee_src/n_fmod.c:1.11 --- src/lib/libm/noieee_src/n_fmod.c:1.10 Sat Jan 16 21:31:38 2016 +++ src/lib/libm/noieee_src/n_fmod.c Fri Nov 9 10:19:47 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: n_fmod.c,v 1.10 2016/01/16 21:31:38 christos Exp $ */ +/* $NetBSD: n_fmod.c,v 1.11 2018/11/09 10:19:47 martin Exp $ */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -70,6 +70,7 @@ extern int isnan(),finite(); && DBL_MIN_EXP == LDBL_MIN_EXP #ifdef __weak_alias __weak_alias(fmodl, fmod); +__weak_alias(modfl, fmod); #endif #endif
CVS commit: src/lib/libm/noieee_src
Module Name:src Committed By: martin Date: Fri Nov 9 10:19:47 UTC 2018 Modified Files: src/lib/libm/noieee_src: n_fmod.c Log Message: Add modfl alias. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libm/noieee_src/n_fmod.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.