Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (4h)  netbsd-8 (5d)  netbsd-10 (5d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (178d) 

2024-05-10 08:09:55 UTC Now

2021-02-05 22:23:30 UTC MAIN commitmail json YAML

mcx: Add if_transmit callback to enable more than one tx queue

(jmcneill)

2021-02-05 22:15:44 UTC MAIN commitmail json YAML

Job_TempFile: unlink while signals blocked

(sjg)

2021-02-05 21:48:52 UTC MAIN commitmail json YAML

Reenable threadsafe sqlite.

Do it properly and only enable thread-safety, but not the worker thread
support. The latter is what requires the whole libpthread dependency.
A potential compromis would be to use a weak pthread_create and only
enable worker threads if it is provided, but given that it is only
really used for large sorts, don't bother for now.

(joerg)

2021-02-05 21:45:24 UTC MAIN commitmail json YAML

2021-02-05 21:44:34 UTC MAIN commitmail json YAML

2021-02-05 21:43:21 UTC MAIN commitmail json YAML

Allow v9 assembly for AES code for 32bit compat build with clang.

(joerg)

2021-02-05 21:25:36 UTC MAIN commitmail json YAML

2021-02-05 20:45:38 UTC MAIN commitmail json YAML

Better reading of 4.1.3.1, it seems that using 32 bit reads/writes is
mandatory for non-legacy devices.

(reinoud)

2021-02-05 19:19:17 UTC MAIN commitmail json YAML

Avoid strdup in mkTempFile

Require caller to pass a buffer and size if they
want the tempfile not unlinked.

Add Job_TempFile to handle blocking signals around
call to mkTempFile, so that meta_open_filemon can use it
in jobs mode.

(sjg)

2021-02-05 19:18:23 UTC MAIN commitmail json YAML

Second round of cleaning up endian code. No more tailored code to maintain.

(reinoud)

2021-02-05 17:20:32 UTC MAIN commitmail json YAML

Assign device handles to devices that attach to the "fdt" interface attribute
in fdtbus_device_register().

(thorpej)

2021-02-05 17:17:59 UTC MAIN commitmail json YAML

OpenFirmware device handle implementation.

(thorpej)

2021-02-05 17:13:40 UTC MAIN commitmail json YAML

Assign device handles to "at acpi" and "at pci" devices in
acpi_device_register().

(thorpej)

2021-02-05 17:12:43 UTC MAIN commitmail json YAML

2021-02-05 17:03:35 UTC MAIN commitmail json YAML

Introduce a generalized "device handle", designed to abstract the handles
used by platform description mechanisms like OpenFirmware, Device Tree,
and ACPI.  In addition to encapsulating the handle's opaque value, the
handle also contains a pointer to an "implementation", which can be used
to invoke methods on a device / device handle.

Device handles are designed to be passed around by-value.  It is expected
that any other memory objects they refer to will be durable.  They are an
aggregate type that consumes 2 pointers worth of storage space.

When device_t's are created, they initially have an invalid device handle.
It is currently the responsibility of platform-specific code to assign
device handles to device_t's.

When necessary, platform-specific code can override a handle's implementation
in a way that resembles sub-classing, such that specific methods can by
intercepted, but others simply passed through.  This also allows platforms
that do not otherwise have a platform description mechanism to provide
handle implementations in specific circumstances to describe the hardware
to platform-independent code.

A general device method calling infrastructure is provided.  Method names
that begin with "device-" are reserved for / defined by the autoconfiguration
subsystem.  Define the "device-enumerate-children" method.  Other subsystems
are free to define their own device method calls and bindings.

Welcome to NetBSD 9.99.80.

(thorpej)

2021-02-05 16:06:25 UTC MAIN commitmail json YAML

PR/55975: Riccardo Mottola: Don't try to lock a mutex from an interrupt context.

(christos)

2021-02-05 08:07:14 UTC MAIN commitmail json YAML

2021-02-05 05:53:40 UTC MAIN commitmail json YAML

make: remove unnecessary assignment in Job_Start, clean up comments

(rillig)

2021-02-05 05:48:19 UTC MAIN commitmail json YAML

make: add const to SearchPath_Print

(rillig)

2021-02-05 05:46:27 UTC MAIN commitmail json YAML

make: clean up a few comments in parse.c

(rillig)

2021-02-05 05:42:39 UTC MAIN commitmail json YAML

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.

(rillig)

2021-02-05 05:19:58 UTC MAIN commitmail json YAML

make: rename remaining ctx to scope

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

(rillig)

2021-02-05 05:15:13 UTC MAIN commitmail json YAML

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.

(rillig)

2021-02-05 04:41:17 UTC MAIN commitmail json YAML

2021-02-05 03:27:59 UTC MAIN commitmail json YAML

Latest acpica version is 20210105.

(taca)

2021-02-05 00:06:12 UTC MAIN commitmail json YAML

s/bootspec/bstr/g to avoid shadowing a global.

(thorpej)

2021-02-04 23:59:46 UTC MAIN commitmail json YAML

Use acpi_compatible_match().

(thorpej)

2021-02-04 23:54:48 UTC MAIN commitmail json YAML

Call acpi_device_register() as appropriate.

(thorpej)

2021-02-04 23:29:16 UTC MAIN commitmail json YAML

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

(thorpej)

2021-02-04 22:55:36 UTC MAIN commitmail json YAML

Fix C&P error in G12_CLK_vid_pll

(joerg)

2021-02-04 22:36:54 UTC MAIN commitmail json YAML

2021-02-04 22:14:08 UTC MAIN commitmail json YAML

Add fdtbus_device_register().  Just a placeholder for now.

(thorpej)

2021-02-04 21:50:39 UTC MAIN commitmail json YAML

2021-02-04 21:42:47 UTC MAIN commitmail json YAML

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.

(rillig)

2021-02-04 21:39:00 UTC MAIN commitmail json YAML

Add acpi_device_register().  Just a placeholder for now.

(thorpej)

2021-02-04 21:33:14 UTC MAIN commitmail json YAML

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.

(rillig)

2021-02-04 21:07:06 UTC MAIN commitmail json YAML

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

(jdolecek)

2021-02-04 20:19:09 UTC MAIN commitmail json YAML

2021-02-04 20:14:33 UTC MAIN commitmail json YAML

make: group shortcuts for manipulating global variables

No functional change.

(rillig)

2021-02-04 19:50:29 UTC MAIN commitmail json YAML

make: merge duplicate code in Arch_FindLib

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

(rillig)

2021-02-04 19:43:00 UTC MAIN commitmail json YAML

make: merge SetVar into Var_SetWithFlags

No functional change.

(rillig)

2021-02-04 19:31:25 UTC netbsd-9 commitmail json YAML

2021-02-04 19:24:01 UTC netbsd-9 commitmail json YAML

2021-02-04 19:23:10 UTC netbsd-9 commitmail json YAML

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

(martin)

2021-02-04 19:16:02 UTC netbsd-9 commitmail json YAML

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.

(martin)

2021-02-04 19:15:13 UTC MAIN commitmail json YAML

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.

(rillig)

2021-02-04 19:05:01 UTC netbsd-9 commitmail json YAML

Fix editor mishap in previous merge

(martin)

2021-02-04 19:00:45 UTC MAIN commitmail json YAML

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.

(rillig)

2021-02-04 17:20:45 UTC netbsd-9 commitmail json YAML

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

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

Fix procfs environ node.

(martin)

2021-02-04 17:15:55 UTC netbsd-9 commitmail json YAML

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.

(martin)

2021-02-04 17:12:10 UTC netbsd-9 commitmail json YAML

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.

(martin)

2021-02-04 17:04:14 UTC netbsd-9 commitmail json YAML

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.

(martin)

2021-02-04 16:57:25 UTC netbsd-9 commitmail json YAML

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

(martin)

2021-02-04 15:08:45 UTC MAIN commitmail json YAML

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

(isaki)

2021-02-04 15:06:11 UTC MAIN commitmail json YAML

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.

(isaki)

2021-02-04 08:51:42 UTC MAIN commitmail json YAML

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

(skrll)

2021-02-04 07:39:39 UTC MAIN commitmail json YAML

lint: update message text for 259 in test

That's the one place that is not checked for matching the actual message
by my usual pre-commit checks.

(rillig)

2021-02-04 06:55:00 UTC MAIN commitmail json YAML

lint: add back "due to prototype" to message 259

That message is only supposed to warn about compatibility to traditional
C, in case the function should ever be compiled without its prototype
being in effect.  All other type checks are supposed to be in another
function, as documented, but that type check misses to report a few
error-prone type combinations (long to char, long to int).

30 years after the introduction of prototypes with C90, almost all
existing code uses prototypes.  The warning has thus lost most of its
usefulness and can rather be confusing since a conversion from 'char' to
'long' is not problematic with prototypes in action, and the probability
of the code being backported to a pre-C90 compiler is diminishingly
small.

The words "due to prototype" now serve as a hint again.  The proper fix
could be to suppress this warning in C99 mode since that's far enough
from traditional C.

(rillig)

2021-02-04 00:16:03 UTC MAIN commitmail json YAML

make: remove .PARSEDIR from test output of varname-empty

The .PARSEDIR has nothing to do with .CURDIR.  This wrong assumption
made the NetBSD test suite fail since the actual .PARSEDIR was not
replaced with "<curdir>".

(rillig)

2021-02-03 23:26:08 UTC MAIN commitmail json YAML

I have a cheap USB optical mouse (CHICONY product 0x0939, also known
as "PixArt USB Optical Mouse") that likes to disconnect after 60 seconds
and then reattach 2 seconds later (ad nauseum) unless it's kept open,
so use the "always open" quirk on that device as well.

(thorpej)

2021-02-03 23:24:08 UTC MAIN commitmail json YAML

Regen for addition of CHICONY optical mouse.

(thorpej)

2021-02-03 23:23:42 UTC MAIN commitmail json YAML

Add a CHICONY optical mouse product ID.

(thorpej)

2021-02-03 21:04:41 UTC MAIN commitmail json YAML

Oops, made a mistake in my last commit

(reinoud)

2021-02-03 20:28:00 UTC MAIN commitmail json YAML

Allocate enough space for the bus_dmamap_t arrays for rxq_hdr_dmamaps[] and
txq_hdr_maps[]

(reinoud)

2021-02-03 18:13:14 UTC MAIN commitmail json YAML

2021-02-03 17:10:13 UTC MAIN commitmail json YAML

2021-02-03 15:42:53 UTC MAIN commitmail json YAML

Do not use old-style backquotes and other old-style expressions.

Fix PR misc/55918.
Tested with pkgsrc/editors/emacs26 and emacs27.

(ryoon)

2021-02-03 15:13:49 UTC MAIN commitmail json YAML

Fix locking against myself.
trigger_output will be called with sc_intr_lock held.
>From source code review, not tested.

(isaki)

2021-02-03 15:08:17 UTC MAIN commitmail json YAML

make: rename Var_Delete to Var_DeleteExpand, Var_DeleteVar to Var_Delete

The function names now follow the naming scheme from the other functions
that handle variables.

There are several calls that remain syntactically unchanged but that
omit the call to strchr('$') now.  Since all these calls use constant
variable names, there is no functional change.

(rillig)

2021-02-03 14:44:32 UTC MAIN commitmail json YAML

Remove code no longer used.
The code that used sc->{halt_input,halt_output} function pointer
was removed in 2004. (see cs428x.c rev 1.7)

(isaki)

2021-02-03 14:33:09 UTC MAIN commitmail json YAML

make: split Var_Exists into plain Var_Exists and Var_ExistsExpand

Most previous calls to Var_Exists use constant variable names.  Only the
two calls in parse.c need to expand the variable name.

It may be a good idea to expand the variable name once in VarAssign_Eval
instead of repeating the expansion in each of its special cases.

No functional change.

(rillig)

2021-02-03 14:22:21 UTC MAIN commitmail json YAML

Remove a comment no longer correct.
Because halt_output is no longer called from an interrupt context,
but that does not mean it's better to put this back to halt_output.

(isaki)

2021-02-03 13:53:12 UTC MAIN commitmail json YAML

make: replace Global_AppendExpand with Global_Append

All callers with a variable name that is guaranteed to not contain a
dollar sign have been converted to call Global_Append instead of the
previous Global_AppendExpand.  After that, Global_AppendExpand was
unused, therefore it was effectively just renamed.

(rillig)

2021-02-03 13:44:39 UTC MAIN commitmail json YAML

make: split Var_Append into Var_Append and Var_AppendExpand

The plain Var_Append now does not expand the variable name anymore.  It
is used in situations where the variable name is known to not contain a
dollar sign.

This is a preparation for adding Global_Append, corresponding to
Global_AppendExpand.

(rillig)

2021-02-03 12:11:34 UTC MAIN commitmail json YAML

if_llc.h: Replace __packed with CTASSERT

(roy)

2021-02-03 11:53:43 UTC MAIN commitmail json YAML

2021-02-03 11:52:23 UTC MAIN commitmail json YAML

tcp_debug: restore __packed

(roy)

2021-02-03 10:37:05 UTC MAIN commitmail json YAML

Pull out constant definitions inside struct declaration.

Enable CTASSERT(9) for CPUSAVE_SIZE.

(rin)

2021-02-03 10:31:10 UTC MAIN commitmail json YAML

2021-02-03 08:40:47 UTC MAIN commitmail json YAML

2021-02-03 08:34:15 UTC MAIN commitmail json YAML

make: in the test varname-empty, keep more debug output

Filtering out the interesting lines based on the very specific pattern
"Var_Set" was surprising.

(rillig)

2021-02-03 08:08:18 UTC MAIN commitmail json YAML

2021-02-03 08:00:36 UTC MAIN commitmail json YAML

make: use shortcut functions Global_SetExpand and Global_AppendExpand

There are many places where global variables are set or appended to.  To
reduce clutter and code size, encode the VAR_GLOBAL in the function
name.

The word Expand in the function names says that the variable name is
expanded.  In most of the cases, this is not necessary, but there are no
corresponding functions Global_Set or Global_Append yet.

Encoding the information whether the name is expanded or not in the
function name will make inconsistencies obvious in future manual code
reviews. Letting the compiler check this by using different types for
unexpanded and expanded variable names is probably not worth the effort.
There are still a few bugs to be fixed, such as in SetVar, which expands
the variable name twice in a row.

(rillig)

2021-02-03 06:58:22 UTC MAIN commitmail json YAML

make: fix compiler warning about signedness in comparison

(rillig)

2021-02-03 06:51:26 UTC MAIN commitmail json YAML

tftp: no longer need packed member warning

(roy)

2021-02-03 06:50:08 UTC MAIN commitmail json YAML

rtadvd: no longer need packed member warning

(roy)

2021-02-03 06:49:18 UTC MAIN commitmail json YAML

traceroute: no longer need gcc packed member warning

(roy)

2021-02-03 06:46:27 UTC MAIN commitmail json YAML

ldpd: Discard warning about accessing packed member

I don't see a good way of fixing this right now.

(roy)

2021-02-03 06:42:50 UTC MAIN commitmail json YAML

2021-02-03 05:51:40 UTC MAIN commitmail json YAML

2021-02-02 21:45:39 UTC MAIN commitmail json YAML

Fix typo in the comments of local binutils patches: s/Servguard/Segvguard.

(fcambus)

2021-02-02 21:31:11 UTC MAIN commitmail json YAML

Ignore address of packed-member for clang too

(joerg)

2021-02-02 21:26:51 UTC MAIN commitmail json YAML

make: remove unused INTERNAL flag

It had been used for cached_realpaths, until this variable had its type
changed from GNode to HashTable in main.c 1.469 from 2020-11-14.

(rillig)

2021-02-02 17:56:31 UTC MAIN commitmail json YAML

make: remove overengineered Enum_ValueToString

For printing the status of a GNode, there was already made_name (now
renamed to GNodeMade_Name), which prints user-friendly text instead of
the bare enum constant names.

To do this change confidently, I first had to demonstrate that the
output really affects something other than just the word "UNMADE". There
had not been a test for that case before, and the test immediately
discovered a bug in the -dg2 and -dg3 options.  This bug is one of the
oldest in make, dating back to at least 1993.

(rillig)

2021-02-02 17:47:56 UTC MAIN commitmail json YAML

2021-02-02 17:27:35 UTC MAIN commitmail json YAML

2021-02-02 16:18:16 UTC MAIN commitmail json YAML

make: replace VarExprFlags with VarExprStatus

The combination of !VEF_UNDEF && VEF_DEF was not possible, which made it
rather strange to model this state as a bit set.

The only functional change is the renamed constants in the debug output.

Using ENUM_VALUE_RTTI_2 felt like overengineering since it's harder to
understand than a simple array of names.

(rillig)

2021-02-02 16:11:43 UTC MAIN commitmail json YAML

Also match Oxford Semiconductor Exsys EX-41098 PCI UARTs

(bouyer)

2021-02-02 15:41:14 UTC MAIN commitmail json YAML

make: replace enum bit-set with bit-field

No functional change.

The generated code from GCC 5.5 is very similar.  On x86_64, memory
access is no longer in 32-bit units but in 8-bit units since only the
first few bits are actually used.  The bit patterns are the same as
before, so if there is any difference in performance, GCC should have
chosen the more efficient variant all along.

In a previous experiment, the code size increased a lot, surprisingly.

(rillig)

2021-02-02 10:48:33 UTC MAIN commitmail json YAML

arp: Plug an mbuf leak

(yamt)

2021-02-02 10:46:18 UTC MAIN commitmail json YAML

if_urtwn.c: Plug a few leaks

Can be a cause of PR/55968

(yamt)

2021-02-02 08:18:42 UTC MAIN commitmail json YAML

Worakround for traps on invalid VAs:
uvm_fault() can not (currently) deal properly with invalid VAs (inside the
VA hole), so do not pass faults for such addresses to it, but instead
either panic (if fault is in kernel) or send a SIGSEGV to userland.

(martin)

2021-02-02 00:27:38 UTC MAIN commitmail json YAML

if_urtwn: Add a missing newline to an aprint_error_dev message

(yamt)

2021-02-01 22:36:28 UTC MAIN commitmail json YAML

2021-02-01 22:21:33 UTC MAIN commitmail json YAML

make: clean up comments in parse.c

(rillig)

2021-02-01 22:16:58 UTC MAIN commitmail json YAML

2021-02-01 22:06:05 UTC MAIN commitmail json YAML

make: simplify VarAssign_EvalSubst

No functional change.

(rillig)

2021-02-01 21:56:03 UTC MAIN commitmail json YAML

make: replace parse error "Need an operator" with better message

The previous error message is not easily understandable since it is
missing a crucial detail, the column where the operator is needed.
Without this information, the author of the makefile gets no useful
hint.  Furthermore, there are several types of operators in makefiles:

the dependency operators ':', '!', '::',
the variable assignment operators '=', '!=', '+=', '?=', ':=',
the conditional operators '&&', '||', '!',
the comparison operators '==', '!=', '>', '>=', '<', '<='.

This leaves too much ambiguity.

Replace this error message with "Invalid line type", which is more
generic, more accurate and thus less misleading.

(rillig)

2021-02-01 21:38:20 UTC MAIN commitmail json YAML

make: remove outdated comment about VarEvalFlags

The previous variable preserveUndefined is now the flag VARE_KEEP_UNDEF.

(rillig)

2021-02-01 21:34:42 UTC MAIN commitmail json YAML

make: document the syscalls that are not monitored by filemon_ktrace

(rillig)

2021-02-01 21:32:54 UTC MAIN commitmail json YAML

2021-02-01 21:09:25 UTC MAIN commitmail json YAML

make: indent preprocessor directives consistently

As seen in share/misc/style.

(rillig)

2021-02-01 21:04:11 UTC MAIN commitmail json YAML

make: always use vfork, never fork

Before compat.c 1.217, job.c 1.390 and main.c 1.504 from 2020-12-27, the
exported make variables were exported from each freshly forked child
process.  There was no practical difference though between exporting the
variables from the parent process or the child process since these two
processes share the same address space, except that the forked process
is very limited in what it may actually do.  This limitation was
violated on a regular basis.

When an exported variable referred to a variable that used the :sh
variable modifier, this led to a fork from within vfork, which is not
allowed.  Since 2020-12-27, exporting the variables is done from the
main process, which prevents this situation from ever occurring.

Since that day, there is no need anymore to distinguish between vfork
and fork, which removes any need for the macro.

(rillig)

2021-02-01 20:51:17 UTC MAIN commitmail json YAML

make: use bit shifts in enum constants for GNodeFlags

Same as in the other enum bit sets.  This makes it easier to spot the
gap between bit 6 and bit 12.

(rillig)

2021-02-01 20:42:13 UTC MAIN commitmail json YAML

make: remove unused return type of MakeBuildParent

(rillig)

2021-02-01 20:40:02 UTC MAIN commitmail json YAML

make: reduce indentation in MakeAddAllSrc

No functional change.

(rillig)

2021-02-01 20:31:41 UTC MAIN commitmail json YAML

2021-02-01 20:01:26 UTC MAIN commitmail json YAML

make: clean up main.c

(rillig)

2021-02-01 19:53:31 UTC MAIN commitmail json YAML

make: simplify MakeMode

(rillig)

2021-02-01 19:46:58 UTC MAIN commitmail json YAML

make: replace pre-increment with post-increment or simple addition

The rest of the code already prefers post-increment if there is no
actual difference.

(rillig)

2021-02-01 19:43:07 UTC MAIN commitmail json YAML

make: rename functions for parsing command line arguments

The function names now match the names around them.

(rillig)

2021-02-01 19:39:31 UTC MAIN commitmail json YAML

2021-02-01 19:31:34 UTC MAIN commitmail json YAML

2021-02-01 19:02:28 UTC MAIN commitmail json YAML

2021-02-01 18:55:16 UTC MAIN commitmail json YAML

make: remove unused Lst_Destroy

The code in job.c that seemed to use it is inside an '#if 0' block.

(rillig)

2021-02-01 18:46:38 UTC MAIN commitmail json YAML

make: clean up Job_CatchOutput

The switch statement was unnecessarily long since every branch needed to
be terminated with a break or with a comment explaining that it didn't
fall through to the next case label.

(rillig)

2021-02-01 18:36:32 UTC MAIN commitmail json YAML

2021-02-01 18:25:58 UTC MAIN commitmail json YAML

make: rename fd-related variables in job.c

In job.c 1.330 from 2020-11-28 I had renamed them because of naming
collisions.  At at time I apparently didn't know exactly what these
variables were used for since their new names were incorrect and
misleading.  Try better names this time.

(rillig)

2021-02-01 18:12:11 UTC MAIN commitmail json YAML

It is enough to make a page accessible instead of writable.
same fix as r1.76

(ryo)

2021-02-01 17:50:53 UTC MAIN commitmail json YAML

for fread(3) and fwrite(3) check for (size * nmemb) size_t overflow, and
error out with EOVERFLOW if it happens; this is less silly answer
to a silly call than returning some randomly wrapped length

change adapted from OpenBSD

FreeBSD has a similar check, but they return EINVAL instead, feel
free to adjust if SUS or other standard mandates specific value

suggested by Kamil Rytarowski

(jdolecek)

2021-02-01 17:49:29 UTC MAIN commitmail json YAML

make: clean up job.c

There used to be a time when Job_Init only ran the commands of the
special .BEGIN target, but that's several years ago.

The 'becomes' for echoTmpl was confusing since it referred to a time
where echoTmpl shared the same memory location as errOn, which was
really confusing since echoTmpl, as the name says, is a printf template
while errOn is a plain string.  All this confusion, just to save 4 or 8
bytes of memory, was not worth it.

Since shellArgv is only used for freeing it and no code is supposed to
ever interpret that memory, rename the variable.

(rillig)

2021-02-01 17:32:10 UTC MAIN commitmail json YAML

make: clean up comments in hash.c

(rillig)

2021-02-01 17:26:03 UTC MAIN commitmail json YAML

make(1): clean up variable names and comments in .for loop code

(rillig)

2021-02-01 17:10:23 UTC MAIN commitmail json YAML

Use sig_atomic_t for caught_sigchld

(sjg)

2021-02-01 06:59:37 UTC MAIN commitmail json YAML

urtwn(4): Check for allocation failure in urtwn_tx_beacon.

Candidate fix for PR kern/55968.

(riastradh)

2021-02-01 04:49:02 UTC MAIN commitmail json YAML

2021-02-01 04:46:33 UTC MAIN commitmail json YAML

add another TPLINK RTL8192EU variant

to avoid confusion use TP-Link's names for these variants, matching
FreeBSD

(nia)

2021-02-01 01:52:05 UTC MAIN commitmail json YAML

2021-01-31 23:17:21 UTC MAIN commitmail json YAML

sys/conf: remove useless dollars from Makefile.kern.inc

When parsing a variable modifier such as :C or :S, all '$' but the very
last are silently swallowed.

See usr.bin/make/unit-tests/varmod-subst.mk for details.

Since August 2020, make has a strict lint mode that is activated by
passing it the option -dL.  In that mode, these redundant '$' are not
accepted anymore.

(rillig)

2021-01-31 22:45:47 UTC MAIN commitmail json YAML

2021-01-31 22:19:24 UTC MAIN commitmail json YAML

sysinst: fix some more typos in the German translation

(rillig)

2021-01-31 21:28:16 UTC MAIN commitmail json YAML

sysinst: restore the few intentional line breaks in German

Marking a forced line break with a trailing space is a terrible idea.
Most of the lines that previously had trailing whitespace did so
unintentionally, destroying the auto-layout.

(rillig)

2021-01-31 21:00:43 UTC MAIN commitmail json YAML

sysinst: proofread German translation

It was a mixture of all possible styles, with several typos and
inconsistencies.

(rillig)

2021-01-31 20:51:04 UTC MAIN commitmail json YAML

sysinst: warp factor.c to the 21st century

That file contained some conditionally defined code that still used
old-style function definitions.

(rillig)

2021-01-31 19:08:05 UTC MAIN commitmail json YAML

sun4v: update TODO with analysis of sun4v crashes

(palle)

2021-01-31 18:31:59 UTC MAIN commitmail json YAML

sysinst: fix German translation, remove more trailing whitespace

(rillig)

2021-01-31 18:22:12 UTC MAIN commitmail json YAML

sysinst: remove trailing whitespace in German translation

(rillig)

2021-01-31 18:11:44 UTC MAIN commitmail json YAML

2021-01-31 18:05:38 UTC MAIN commitmail json YAML

urtwn(4): add TPLINK WN821N to the list of USB device ids

reported by kfmut on the unitedbsd forums.

(nia)

2021-01-31 16:18:22 UTC MAIN commitmail json YAML

for unbuffered I/O arrange for the destination buffer to be filled in one
go, instead of triggering long series of 1 byte read(2)s; this speeds up
fread() several order of magnitudes for this case, directly proportional
to the size of the supplied buffer

change adapted from OpenBSD rev. 1.19

fixes PR lib/55808 by Roland Illig

(jdolecek)

2021-01-31 16:00:05 UTC MAIN commitmail json YAML

lint: document that message 108 doesn't abort anymore

(rillig)

2021-01-31 14:57:28 UTC MAIN commitmail json YAML

lint: format tests in a common style

The lint tests do not focus on the whitespace since that is the most
boring part of code style.  Therefore, format the tests to be readable
by following share/misc/style as close as possible.

(rillig)

2021-01-31 14:39:31 UTC MAIN commitmail json YAML

lint: add common header for all tests

For those tests that didn't use GCC-style line markers such as "# 2",
the line numbers of the diagnostics stay the same.  This is purely
conincidental.  Before, the 3 lines came from lint's built-in
definitions (see 'builtins' in main1.c), and line number counting
continued as if nothing had happened, making the first line of the
actual file line 4.  These 3 built-in lines are now replaced with 3
lines of file header.

(rillig)

2021-01-31 14:17:48 UTC MAIN commitmail json YAML

Although the header structure can be smaller, the headers *are* indexed as if
they are full sized so allocate enough memory so the indexing works as
expected and we are not scribbling outside bounds.

(reinoud)

2021-01-31 14:05:00 UTC MAIN commitmail json YAML

2021-01-31 13:56:14 UTC MAIN commitmail json YAML

lint: make warning about function argument conversion more detailed

For every conversion it is useful to know both the source and the target
type since these are not always obvious from the code.

The only surprise is the warning in d_gcc_extension.  The conversion
there is from 'double' to 'long double', which is a lossless conversion.
This may be a bug in lint.

(rillig)

2021-01-31 13:33:11 UTC MAIN commitmail json YAML

lint: demonstrate wrong and misleading warnings about reachability

(rillig)

2021-01-31 13:11:08 UTC MAIN commitmail json YAML

lint: add test for lossy assignments to bit-fields (164, 166)

(rillig)

2021-01-31 12:44:34 UTC MAIN commitmail json YAML

2021-01-31 12:30:53 UTC MAIN commitmail json YAML

lint: add expectations to test for message 161

(rillig)

2021-01-31 12:29:16 UTC MAIN commitmail json YAML

lint: add tests for 'constant in conditional context'

One of these tests explains why 'do { } while (0)' is so usual that
there is no reason to warn about it.  That warning will not survive for
long.

(rillig)

2021-01-31 12:20:01 UTC MAIN commitmail json YAML

lint: fix strange message about nested '==' operators

If one of the nested subexpressions is parenthesized, the author
probably knew how these expressions are evaluated.  Therefore don't warn
in such a situation.

Maybe the original author once made a typo and tried to initialize
variables but instead compared them, like this:

int a, b, c;

a == b == c;

This would explain the text of the message, which still sounds strange.
At least it doesn't show up as often anymore.

(rillig)

2021-01-31 11:59:57 UTC MAIN commitmail json YAML

lint: add more test cases for strange '==' warning 160

(rillig)

2021-01-31 11:44:48 UTC MAIN commitmail json YAML

2021-01-31 11:23:02 UTC MAIN commitmail json YAML

2021-01-31 11:12:07 UTC MAIN commitmail json YAML

2021-01-31 09:48:47 UTC MAIN commitmail json YAML

2021-01-31 09:26:27 UTC MAIN commitmail json YAML

2021-01-31 09:21:24 UTC MAIN commitmail json YAML

2021-01-31 08:59:40 UTC MAIN commitmail json YAML

ftp(1): more $https_proxy documentation

Document $https_proxy in ENVIRONMENT.
(It was already documented elsewhere).

Fixes PR bin/51883

(lukem)

2021-01-31 08:47:07 UTC MAIN commitmail json YAML

Sort the EARLYCONS entries.  NFCI.

(skrll)

2021-01-31 08:27:49 UTC MAIN commitmail json YAML

ntpd: ignore errno EINTR on reads from the routing socket

(roy)

2021-01-31 08:26:47 UTC MAIN commitmail json YAML

ntpd: move route socket overflow message from LOG_ERR to LOG_DEBUG

While here stop caring about RTM_LOSING as that's purely informational.
If routing does change then we get RTM_ADD/DEL/CHANGE.
Also stop caring about RTM_IFANNOUNCE as we really only want addresses
and interface flag updates which we get by RTM_NEWADDR/DELADDR/CHGADDR and
RTM_IFINFO.

(roy)

2021-01-31 08:14:58 UTC MAIN commitmail json YAML

2021-01-31 08:07:25 UTC MAIN commitmail json YAML

Allow local builds to add configuration changes via GENERIC.local

(martin)

2021-01-31 07:07:53 UTC MAIN commitmail json YAML

Reduce unnecessary calls to waitpid

Set a flag when we catch SIGCHLD and
don't call waitpid if it is not set.
Clear it when we call waitpid.

(sjg)

2021-01-31 06:24:40 UTC MAIN commitmail json YAML

Remove duplicate EARLYCONS=imx entry (both are commented out)

(skrll)

2021-01-31 06:18:50 UTC MAIN commitmail json YAML

Fix (unused) PRRR_NOSn #define

(skrll)

2021-01-31 05:59:55 UTC MAIN commitmail json YAML

One #include "opt_cputypes.h" is enough for anyone

(skrll)

2021-01-31 04:51:29 UTC MAIN commitmail json YAML

implement pmap_remove_all().

The size of struct pv_entry has increased, but speed of kernel build has improved by about 1%
exec and exit should have been improved.

(ryo)

2021-01-30 23:15:32 UTC MAIN commitmail json YAML

lint: flatten has_side_effect

Since GCC performs tail call optimization, the generated code is
practically the same.

Replace redundant comments with open questions.

No functional change.

(rillig)

2021-01-30 23:05:08 UTC MAIN commitmail json YAML

2021-01-30 22:48:50 UTC MAIN commitmail json YAML

lint: extract has_side_effect from check_null_effect

No functional change.

(rillig)

2021-01-30 22:38:54 UTC MAIN commitmail json YAML

lint: add test for 129, possibly demonstrating a bug in lint

(rillig)

2021-01-30 22:07:31 UTC MAIN commitmail json YAML

lint: add test for message 259 about implicit conversions

(rillig)

2021-01-30 21:58:04 UTC MAIN commitmail json YAML

lint: add type information to message 275

Before: cast discards 'const' from pointer target type
After: cast discards 'const' from type 'pointer to const char'

Seen in sqlite3.c.

(rillig)

2021-01-30 21:49:08 UTC MAIN commitmail json YAML

lint: add type information to warning about troublesome casts

The previous warning text did not mention the actual types that are
involved in the type conversion.  These types can be hard to see from
the source code as soon as macros are involved, and even in plain code,
one would have to follow the declarations, which is an unnecessary
burden.  Lint already has all information about the involved types, so
there is no reason for omitting this crucial information.

Seen in external/mit/lua/dist/src/lvm.c and several other files.
Including the type information in the message immediately makes the
message scarier.

Before: pointer casts may be troublesome
After: pointer cast from 'pointer to struct TString' to 'pointer to
union GCUnion' may be troublesome

(rillig)

2021-01-30 21:26:33 UTC MAIN commitmail json YAML

Sync with OpenBSD r1.98. Lots of improvements including checksum offload,
hardware vlan tagging, and support for multiple receive queues.

(jmcneill)

2021-01-30 21:25:10 UTC MAIN commitmail json YAML

2021-01-30 21:24:46 UTC MAIN commitmail json YAML

2021-01-30 21:24:30 UTC MAIN commitmail json YAML

Add some more product IDs for mcx(4)

(jmcneill)

2021-01-30 21:23:08 UTC MAIN commitmail json YAML

Add symmetric toeplitz implementation with integration for NICs, from OpenBSD.

(jmcneill)

2021-01-30 21:18:14 UTC MAIN commitmail json YAML

make(1): remove __predict_false

The effect (at least on x86_64) is so minimal that it is not worth
cluttering the code.

(rillig)

2021-01-30 21:03:32 UTC MAIN commitmail json YAML

2021-01-30 20:59:29 UTC MAIN commitmail json YAML

make(1): only clean up the Buffer data in CLEANUP mode

Cleaning up the members is only useful during debugging but not during
use in production.

(rillig)

2021-01-30 20:53:29 UTC MAIN commitmail json YAML

make(1): split Buf_Destroy into Buf_Done and Buf_DoneData

In all cases except one, the boolean argument to Buf_Destroy was
constant.  Removing that argument by splitting the function into two
separate functions makes the intention clearer on the call site.  It
also removes the possibility for using the return value of Buf_Done,
which would have made no sense.

The function Buf_Done now pairs with Buf_Init, just as in HashTable and
Lst.

Even though Buf_Done is essentially a no-op, it is kept as a function,
both for symmetry with Buf_Init and for clearing the Buffer members
after use (this will be done only in CLEANUP mode, in a follow-up
commit).

(rillig)

2021-01-30 19:20:44 UTC MAIN commitmail json YAML

Add a few network interface offload feature initialisms

(jakllsch)

2021-01-30 18:16:45 UTC MAIN commitmail json YAML

2021-01-30 18:14:25 UTC MAIN commitmail json YAML

lint: fix type conversion for very large data types

Data types that are 4 GB or larger are an edge case.  Nevertheless,
compute their size correctly.

(rillig)

2021-01-30 18:12:07 UTC MAIN commitmail json YAML

lint: remove redundant parentheses

No functional change.

(rillig)