CVS commit: src/usr.bin/make

2021-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  5 05:53:40 UTC 2021

Modified Files:
src/usr.bin/make: job.c

Log Message:
make: remove unnecessary assignment in Job_Start, clean up comments


To generate a diff of this commit:
cvs rdiff -u -r1.417 -r1.418 src/usr.bin/make/job.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2021-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  5 05:48:19 UTC 2021

Modified Files:
src/usr.bin/make: dir.c dir.h

Log Message:
make: add const to SearchPath_Print


To generate a diff of this commit:
cvs rdiff -u -r1.269 -r1.270 src/usr.bin/make/dir.c
cvs rdiff -u -r1.42 -r1.43 src/usr.bin/make/dir.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2021-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  5 05:46:27 UTC 2021

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make: clean up a few comments in parse.c


To generate a diff of this commit:
cvs rdiff -u -r1.548 -r1.549 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2021-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  5 05:42:39 UTC 2021

Modified Files:
src/usr.bin/make: make.h var.c

Log Message:
make: improve documentation about variable scopes

In an experiment, I tried to separate the concepts of a GNode and a
variable scope.  The global variables SCOPE_GLOBAL, SCOPE_INTERNAL and
SCOPE_CMDLINE are implemented as GNode even though they only need the
members 'name' and 'vars'.  All their other members are unused.
Therefore it seemed natural to extract this part of the GNode into a
separate type called Scope.

The resulting code was harder to read though since it had split the
namespace of the functions into several parts that were not obviously
related: The Var_ functions, the Scope_ functions, and the short-cut
Global_ functions.  Because of this, I threw away the experiment.

All that is left are a few updated comments.


To generate a diff of this commit:
cvs rdiff -u -r1.254 -r1.255 src/usr.bin/make/make.h
cvs rdiff -u -r1.806 -r1.807 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2021-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  5 05:19:58 UTC 2021

Modified Files:
src/usr.bin/make: var.c

Log Message:
make: rename remaining ctx to scope

One less small inconsistency.  Everywhere else, that variable had been
named ctxt, not ctx.


To generate a diff of this commit:
cvs rdiff -u -r1.805 -r1.806 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2021-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  5 05:15:13 UTC 2021

Modified Files:
src/usr.bin/make: arch.c compat.c cond.c job.c main.c make.c meta.c
nonints.h parse.c suff.c trace.c var.c

Log Message:
make: in the Var_ functions, move the scope to the front

This change provides for a more natural reading order in the code.
Placing the scope first makes it immediately clear in which context the
remaining parameters are interpreted.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.196 -r1.197 src/usr.bin/make/arch.c
cvs rdiff -u -r1.223 -r1.224 src/usr.bin/make/compat.c
cvs rdiff -u -r1.255 -r1.256 src/usr.bin/make/cond.c
cvs rdiff -u -r1.416 -r1.417 src/usr.bin/make/job.c
cvs rdiff -u -r1.531 -r1.532 src/usr.bin/make/main.c
cvs rdiff -u -r1.241 -r1.242 src/usr.bin/make/make.c
cvs rdiff -u -r1.175 -r1.176 src/usr.bin/make/meta.c
cvs rdiff -u -r1.201 -r1.202 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.547 -r1.548 src/usr.bin/make/parse.c
cvs rdiff -u -r1.344 -r1.345 src/usr.bin/make/suff.c
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/make/trace.c
cvs rdiff -u -r1.804 -r1.805 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2021-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb  5 04:41:17 UTC 2021

Modified Files:
src/usr.bin/make: dir.c main.c nonints.h parse.c var.c

Log Message:
make: add shortcut Global_Delete for deleting a global variable


To generate a diff of this commit:
cvs rdiff -u -r1.268 -r1.269 src/usr.bin/make/dir.c
cvs rdiff -u -r1.530 -r1.531 src/usr.bin/make/main.c
cvs rdiff -u -r1.200 -r1.201 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.546 -r1.547 src/usr.bin/make/parse.c
cvs rdiff -u -r1.803 -r1.804 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/doc

2021-02-04 Thread Takahiro Kambe
Module Name:src
Committed By:   taca
Date:   Fri Feb  5 03:27:59 UTC 2021

Modified Files:
src/doc: 3RDPARTY

Log Message:
Latest acpica version is 20210105.


To generate a diff of this commit:
cvs rdiff -u -r1.1775 -r1.1776 src/doc/3RDPARTY

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/powerpc

2021-02-04 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Feb  5 00:06:12 UTC 2021

Modified Files:
src/sys/arch/powerpc/powerpc: openfirm.c

Log Message:
s/bootspec/bstr/g to avoid shadowing a global.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/powerpc/powerpc/openfirm.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/acpi

2021-02-04 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Feb  4 23:59:46 UTC 2021

Modified Files:
src/sys/dev/acpi: dwiic_acpi.c

Log Message:
Use acpi_compatible_match().


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/acpi/dwiic_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/x86/acpi

2021-02-04 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Feb  4 23:54:48 UTC 2021

Modified Files:
src/sys/arch/x86/acpi: acpi_machdep.c

Log Message:
Call acpi_device_register() as appropriate.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/x86/acpi/acpi_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2021-02-04 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Feb  4 23:29:16 UTC 2021

Modified Files:
src/sys/kern: subr_device.c
src/sys/sys: device.h

Log Message:
Add device_attached_to_iattr(), which return true if the device
attached to the specified interface attribute.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/kern/subr_device.c
cvs rdiff -u -r1.164 -r1.165 src/sys/sys/device.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/amlogic

2021-02-04 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb  4 22:55:36 UTC 2021

Modified Files:
src/sys/arch/arm/amlogic: mesong12_clkc.c

Log Message:
Fix C&P error in G12_CLK_vid_pll


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/amlogic/mesong12_clkc.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

2021-02-04 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Feb  4 22:36:54 UTC 2021

Modified Files:
src/sys/arch/arm/acpi: acpi_platform.c
src/sys/arch/arm/altera: cycv_platform.c
src/sys/arch/arm/amlogic: meson_platform.c
src/sys/arch/arm/broadcom: bcm283x_platform.c
src/sys/arch/arm/fdt: arm_platform.c
src/sys/arch/arm/nvidia: tegra_platform.c
src/sys/arch/arm/nxp: imx6_platform.c
src/sys/arch/arm/rockchip: rk_platform.c
src/sys/arch/arm/samsung: exynos_platform.c
src/sys/arch/arm/sunxi: sunxi_platform.c
src/sys/arch/arm/ti: omap3_platform.c
src/sys/arch/arm/vexpress: vexpress_platform.c
src/sys/arch/arm/virt: virt_platform.c
src/sys/arch/arm/xilinx: zynq_platform.c

Log Message:
Call acpi_device_register() / fdtbus_device_register() as approrpriate.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/acpi/acpi_platform.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/altera/cycv_platform.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/amlogic/meson_platform.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/arm/broadcom/bcm283x_platform.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/fdt/arm_platform.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/nvidia/tegra_platform.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/nxp/imx6_platform.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/rockchip/rk_platform.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arm/samsung/exynos_platform.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/arm/sunxi/sunxi_platform.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/ti/omap3_platform.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/vexpress/vexpress_platform.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/virt/virt_platform.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/xilinx/zynq_platform.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/fdt

2021-02-04 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Feb  4 22:14:08 UTC 2021

Modified Files:
src/sys/dev/fdt: fdtbus.c fdtvar.h

Log Message:
Add fdtbus_device_register().  Just a placeholder for now.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/fdt/fdtbus.c
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/fdt/fdtvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2021-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Feb  4 21:50:39 UTC 2021

Modified Files:
src/usr.bin/make: make.h nonints.h var.c

Log Message:
make: rename Var_ValueDirect to GNode_ValueDirect


To generate a diff of this commit:
cvs rdiff -u -r1.253 -r1.254 src/usr.bin/make/make.h
cvs rdiff -u -r1.199 -r1.200 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.802 -r1.803 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2021-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Feb  4 21:42:47 UTC 2021

Modified Files:
src/usr.bin/make: arch.c compat.c make.1 make.c make.h parse.c suff.c
targ.c var.c
src/usr.bin/make/unit-tests: envfirst.mk vardebug.mk varmisc.mk
varmod-loop.mk varname-dot-shell.mk varparse-dynamic.mk

Log Message:
make: rename context and ctxt to scope

This continues the previous commit, in which VAR_GLOBAL, VAR_INTERNAL
and VAR_CMDLINE were renamed.

Renaming the variable 'ctxt' was trivial since that word is used nowhere
else.  In the comments though, each occurrence of the word 'context' had
to be checked individually since the word 'context' was not only used
for referring to a variable scope.  It is also used to distinguish
different situations where characters are escaped in a certain way
('parsing context') and in a few other expressions.


To generate a diff of this commit:
cvs rdiff -u -r1.195 -r1.196 src/usr.bin/make/arch.c
cvs rdiff -u -r1.222 -r1.223 src/usr.bin/make/compat.c
cvs rdiff -u -r1.295 -r1.296 src/usr.bin/make/make.1
cvs rdiff -u -r1.240 -r1.241 src/usr.bin/make/make.c
cvs rdiff -u -r1.252 -r1.253 src/usr.bin/make/make.h
cvs rdiff -u -r1.545 -r1.546 src/usr.bin/make/parse.c
cvs rdiff -u -r1.343 -r1.344 src/usr.bin/make/suff.c
cvs rdiff -u -r1.164 -r1.165 src/usr.bin/make/targ.c
cvs rdiff -u -r1.801 -r1.802 src/usr.bin/make/var.c
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/envfirst.mk
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/vardebug.mk \
src/usr.bin/make/unit-tests/varname-dot-shell.mk
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/make/unit-tests/varmisc.mk
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/varmod-loop.mk
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/varparse-dynamic.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/acpi

2021-02-04 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Feb  4 21:39:00 UTC 2021

Modified Files:
src/sys/dev/acpi: acpi.c acpivar.h

Log Message:
Add acpi_device_register().  Just a placeholder for now.


To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.289 src/sys/dev/acpi/acpi.c
cvs rdiff -u -r1.84 -r1.85 src/sys/dev/acpi/acpivar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2021-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Feb  4 21:33:14 UTC 2021

Modified Files:
src/usr.bin/make: cond.c dir.c for.c job.c main.c make.h meta.c parse.c
targ.c trace.c var.c
src/usr.bin/make/unit-tests: varname-make_print_var_on_error-jobs.mk
varname-make_print_var_on_error.mk

Log Message:
make: rename some VAR constants to SCOPE

The word "context" does not fit perfectly to the variables that are
associate with a GNode, as the context is usually something from the
outside and the variables are more like properties inherent to the
GNode.

The term "global context" fits even less.  Since the thing where
variables are looked up is commonly named a scope, use that term
instead.

This commit only renames the global variables VAR_GLOBAL, VAR_INTERNAL
and VAR_CMDLINE, plus a few very closely related comments.  These are:

GNode.vars (because of line breaks)
GNode_Free (dito)
varname-make_print_var_on_error.mk
varname-make_print_var_on_error-jobs.mk

The debug message in Var_Stats is left as-is since there is no unit test
for it yet.

The other renamings (variable names "context", "ctxt", as well as
further comments) will be done in a follow-up commit.


To generate a diff of this commit:
cvs rdiff -u -r1.254 -r1.255 src/usr.bin/make/cond.c
cvs rdiff -u -r1.267 -r1.268 src/usr.bin/make/dir.c
cvs rdiff -u -r1.140 -r1.141 src/usr.bin/make/for.c
cvs rdiff -u -r1.415 -r1.416 src/usr.bin/make/job.c
cvs rdiff -u -r1.529 -r1.530 src/usr.bin/make/main.c
cvs rdiff -u -r1.251 -r1.252 src/usr.bin/make/make.h
cvs rdiff -u -r1.174 -r1.175 src/usr.bin/make/meta.c
cvs rdiff -u -r1.544 -r1.545 src/usr.bin/make/parse.c
cvs rdiff -u -r1.163 -r1.164 src/usr.bin/make/targ.c
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/make/trace.c
cvs rdiff -u -r1.800 -r1.801 src/usr.bin/make/var.c
cvs rdiff -u -r1.2 -r1.3 \
src/usr.bin/make/unit-tests/varname-make_print_var_on_error-jobs.mk
cvs rdiff -u -r1.5 -r1.6 \
src/usr.bin/make/unit-tests/varname-make_print_var_on_error.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2021-02-04 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Thu Feb  4 21:07:06 UTC 2021

Modified Files:
src/sys/kern: vfs_init.c vfs_subr.c
src/sys/sys: mount.h

Log Message:
introduce vfs.generic.timestamp_precision sysctl to control precision
of the timer used for vfs_timestamp(); default stays the same
to use nanotime(9), but option is there to use the faster, albeit
less precise methods

code taken from FreeBSD

suggested by Mateusz Guzik in:
http://mail-index.netbsd.org/tech-kern/2020/07/19/msg026620.html


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/kern/vfs_init.c
cvs rdiff -u -r1.489 -r1.490 src/sys/kern/vfs_subr.c
cvs rdiff -u -r1.236 -r1.237 src/sys/sys/mount.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/ofw

2021-02-04 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Feb  4 20:19:09 UTC 2021

Modified Files:
src/sys/dev/ofw: files.ofw ofw_subr.c
Added Files:
src/sys/dev/ofw: ofw_i2c_subr.c ofw_spi_subr.c

Log Message:
Split the i2c and spi stuff out into their own files.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ofw/files.ofw
cvs rdiff -u -r0 -r1.1 src/sys/dev/ofw/ofw_i2c_subr.c \
src/sys/dev/ofw/ofw_spi_subr.c
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/ofw/ofw_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2021-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Feb  4 20:14:33 UTC 2021

Modified Files:
src/usr.bin/make: nonints.h

Log Message:
make: group shortcuts for manipulating global variables

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.198 -r1.199 src/usr.bin/make/nonints.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2021-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Feb  4 19:50:29 UTC 2021

Modified Files:
src/usr.bin/make: arch.c

Log Message:
make: merge duplicate code in Arch_FindLib

No functional change.  Furthermore, this only affects builds that
explicitly disable LIBRARIES in config.h.


To generate a diff of this commit:
cvs rdiff -u -r1.194 -r1.195 src/usr.bin/make/arch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2021-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Feb  4 19:43:00 UTC 2021

Modified Files:
src/usr.bin/make: var.c

Log Message:
make: merge SetVar into Var_SetWithFlags

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.799 -r1.800 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/doc

2021-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb  4 19:31:25 UTC 2021

Modified Files:
src/doc [netbsd-9]: CHANGES-9.2

Log Message:
Tickets #1191 - #1197


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.38 -r1.1.2.39 src/doc/CHANGES-9.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/sys/dev/usb

2021-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb  4 19:24:01 UTC 2021

Modified Files:
src/sys/dev/usb [netbsd-9]: usbdevs.h usbdevs_data.h

Log Message:
regen (for ticket #1197)


To generate a diff of this commit:
cvs rdiff -u -r1.760.4.6 -r1.760.4.7 src/sys/dev/usb/usbdevs.h \
src/sys/dev/usb/usbdevs_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/sys/dev/usb

2021-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb  4 19:23:10 UTC 2021

Modified Files:
src/sys/dev/usb [netbsd-9]: if_urtwn.c usbdevs

Log Message:
Pull up following revision(s) (requested by nia in ticket #1197):

sys/dev/usb/if_urtwn.c: revision 1.89,1.90
sys/dev/usb/usbdevs: revision 1.788,1.789

urtwn(4): add TPLINK WN821N to the list of USB device ids
reported by kfmut on the unitedbsd forums.

add another TPLINK RTL8192EU variant
to avoid confusion use TP-Link's names for these variants, matching
FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.71.2.3 -r1.71.2.4 src/sys/dev/usb/if_urtwn.c
cvs rdiff -u -r1.770.4.6 -r1.770.4.7 src/sys/dev/usb/usbdevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/sys/dev/usb

2021-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb  4 19:16:02 UTC 2021

Modified Files:
src/sys/dev/usb [netbsd-9]: uhid.c uhidev.c uhidev.h

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1196):

sys/dev/usb/uhid.c: revision 1.115
sys/dev/usb/uhidev.h: revision 1.21
sys/dev/usb/uhidev.c: revision 1.79
(all via patch)

usb: Overhaul uhid(4) and uhidev(4) locking.

- uhidev API rules:
  1. Call uhidev_open when you want exclusive use of a report id.
 After it succeeds, you will get interrupts.
  2. Call uhidev_close when done with exclusive use of a report id.
 After it returns, you will no longer get interrupts.
 => uhidev_open/close do not nest.
  3. uhidev_write no longer requires the caller to have exclusive
 access -- if there is a write in progress, it will block
 interruptibly until done.  This way drivers for individual
 report ids need not work separately to coordinate their writes.
  4. You must uhidev_stop to abort any pending writes on the same
 report id.  (uhidev_stop no longer does anything else -- to
 ensure no more interrupts, just use uhidev_close.)
- Fix uhidev_open/close locking -- uhidev now has an interruptible
  config lock held only on first open and last close by any report id
  in the device, to serialize the transition between zero and nonzero
  numbers of references which requires opening/closing pipes and
  allocating/freeing buffers.
- Make /dev/uhidN selnotify(POLLHUP) when the device is yanked.
- Factor uhid device lookup and reference counting and dying
  detection and so on into uhid_enter/exit.
- Nix struct uhid_softc::sc_access_lock.  This served no purpose but
  to confuse me when trying to understand the logic of this beast
  (and to ensure uhidev_write exclusion, but it was uninterruptible,
  which is wrong for something that implements userland operations,
  and didn't actually work because uhidev_write did nothing to
  coordinate between different report ids).
- Fix locking in select/poll.
- Use atomics to manage UHID_IMMED to keep it simple.  (sc_lock would
  be fine too but it makes the code more verbose.)
- Omit needless UHID_ASLP -- cv_broadcast already has this
  micro-optimization.

With these changes, my Pinebook survives

for i in `jot 100`; do
echo '###' $i
for j in `jot 16`; do
usbhidctl -rf /dev/uhid$j >/dev/null &
done
wait
done

while plugging and unplugging uhid(4) devices (U2F keys), and the U2F
keys still work as U2F keys.

ok nick, mrg

XXX pullup-9
XXX pullup-8?

Note on ABI and pullups: This changes the layout of struct
uhidev_softc, but with the sole exception of ucycom(4) -- which at
the moment is completely broken and unusable -- the only members that
USB HID drivers use are sc_udev and sc_iface, which haven't changed.
The layout of struct uhidev, which is allocated by each USB HID
driver in its own softc structure, is unchanged.


To generate a diff of this commit:
cvs rdiff -u -r1.108.2.2 -r1.108.2.3 src/sys/dev/usb/uhid.c
cvs rdiff -u -r1.75 -r1.75.2.1 src/sys/dev/usb/uhidev.c
cvs rdiff -u -r1.20 -r1.20.4.1 src/sys/dev/usb/uhidev.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2021-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Feb  4 19:15:13 UTC 2021

Modified Files:
src/usr.bin/make: nonints.h var.c

Log Message:
make: rename Var_SetWithFlags to Var_SetExpandWithFlags

Add back Var_SetWithFlags for the one call that doesn't need to expand
the name.

Now one of the flags is encoded in the function name while the others
are encoded in VarSetFlags.  This is inconsistent.  Maybe there is a
better way to model the different variants of setting a variable.


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.798 -r1.799 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/share/mk

2021-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb  4 19:05:01 UTC 2021

Modified Files:
src/share/mk [netbsd-9]: bsd.own.mk

Log Message:
Fix editor mishap in previous merge


To generate a diff of this commit:
cvs rdiff -u -r1.1149.2.5 -r1.1149.2.6 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/usr.bin/make

2021-02-04 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Feb  4 19:00:45 UTC 2021

Modified Files:
src/usr.bin/make: nonints.h parse.c var.c

Log Message:
make: rename Var_Set to Var_SetExpand

After doing the textual renaming across all files, I added a new
function Var_Set that does not expand the variable name.  I then undid
the renaming for all calls where the variable name cannot ever contain a
dollar sign.  I omitted the word "Expand" from the textual references in
the unit tests and in the debug logging messages since the focus is
usually on the "Set" part, not on the "Expand".

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.196 -r1.197 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.543 -r1.544 src/usr.bin/make/parse.c
cvs rdiff -u -r1.797 -r1.798 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/sys/miscfs/procfs

2021-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb  4 17:20:45 UTC 2021

Modified Files:
src/sys/miscfs/procfs [netbsd-9]: procfs_vfsops.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1195):

sys/miscfs/procfs/procfs_vfsops.c: revision 1.110

Fix procfs environ node.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.101.4.1 src/sys/miscfs/procfs/procfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] xsrc/external/mit/libXxf86dga/dist/src

2021-02-04 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Thu Feb  4 17:15:55 UTC 2021

Modified Files:
xsrc/external/mit/libXxf86dga/dist/src [netbsd-9]: XF86DGA.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1194):

external/mit/libXxf86dga/dist/src/XF86DGA.c: revision 1.3

Fix "no output of xdpyinfo(1) on redirect or pipe" problem.

XF86cleanup() in libXxf86dga invoked via atexit(3)
(or __attribute__((__destructor__)) in NetBSD xsrc)
calls _exit(2) directly so fflush(3) via normal exit(3)
is not called.  Analyzed by rin@, ryo@, and soda@:

 https://mail-index.netbsd.org/tech-x11/2021/01/20/msg002192.html

Should be pulled up to netbsd-9.

XXX1: The original XF86cleanup() is not async-signale-safe.
XXX2: XF86DGAGetVideo() implicitly overrides signal handlers.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.2.1 xsrc/external/mit/libXxf86dga/dist/src/XF86DGA.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/share/mk

2021-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb  4 17:12:10 UTC 2021

Modified Files:
src/share/mk [netbsd-9]: bsd.own.mk

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1193):

share/mk/bsd.own.mk: revision 1.1229

Switch alpha to USE_XZ_SETS=no, i.e. using gzip for installation sets.

Ok'ed by martin@ in PR/55751.  Maybe worth to pullup to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.1149.2.4 -r1.1149.2.5 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: [netbsd-9] src/sys/dev/hyperv

2021-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb  4 17:04:14 UTC 2021

Modified Files:
src/sys/dev/hyperv [netbsd-9]: hvkbd.c if_hvn.c vmbus.c

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #1192):

sys/dev/hyperv/if_hvn.c: revision 1.20 (via patch)
sys/dev/hyperv/hvkbd.c: revision 1.7 (via patch)
sys/dev/hyperv/vmbus.c: revision 1.12 (via patch)

hvkbd(4): Don't wait forever.
vmbus(4): Don't wait forever.
hvn(4): Don't wait forever.


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/dev/hyperv/hvkbd.c
cvs rdiff -u -r1.4.2.6 -r1.4.2.7 src/sys/dev/hyperv/if_hvn.c
cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/sys/dev/hyperv/vmbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/sys/kern

2021-02-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb  4 16:57:25 UTC 2021

Modified Files:
src/sys/kern [netbsd-9]: kern_event.c

Log Message:
Pullup the following (requested by jdolecek in ticket #1191):

sys/kern/kern_event.c   r1.110-1.115 (via patch)

fix a race in kqueue_scan() - when multiple threads check the same
kqueue, it could happen other thread seen empty kqueue while kevent
was being checked for re-firing and re-queued

make sure to keep retrying if there are outstanding kevents even
if no kevent is found on first pass through the queue, and only
kq_count when actually completely done with the kevent

PR kern/50094 by Christof Meerwal

Also fixes timer latency in Go, as reported in
https://github.com/golang/go/issues/42515 by Michael Pratt


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.104.4.1 src/sys/kern/kern_event.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/hppa/gsc

2021-02-04 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Thu Feb  4 15:08:45 UTC 2021

Modified Files:
src/sys/arch/hppa/gsc: harmony.c

Log Message:
Simplify harmony_speed_bits().
It no longer needs to write back the speed value.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/gsc/harmony.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/hppa/gsc

2021-02-04 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Thu Feb  4 15:06:11 UTC 2021

Modified Files:
src/sys/arch/hppa/gsc: harmony.c

Log Message:
Fix my mistakes in rev1.6.
- I had to merge the channel bit and the speed bits.
  Reported by macallan@.
- I also fix my indent, while I'm here.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hppa/gsc/harmony.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/mips/include

2021-02-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb  4 08:51:42 UTC 2021

Modified Files:
src/sys/arch/mips/include: asm.h

Log Message:
Use t9 instead of $25 in the SETUP_GP64 macro to hopefully make things
a bit clearer.  Same libc binary after.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/mips/include/asm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.