OpenBSD cvs log

created 2020-04-11T17:59:15Z
begin 2020-04-06T00:00:00Z
end 2020-04-07T00:00:00Z
path src/sys
commits 17

date 2020-04-06T00:01:08Z
author pirofti
files src/sys/arch/amd64/amd64/tsc.c log diff annotate
src/sys/arch/loongson/dev/kb3310var.h log diff annotate
src/sys/arch/octeon/dev/octrng.c log diff annotate
src/sys/dev/acpi/acpipwrres.c log diff annotate
src/sys/dev/acpi/acpisony.c log diff annotate
src/sys/dev/acpi/acpivideo.c log diff annotate
src/sys/dev/acpi/acpivout.c log diff annotate
src/sys/dev/mii/brswphy.c log diff annotate
message Update my email address.

date 2020-04-06T01:28:58Z
author jmatthew
files src/sys/dev/pci/if_mcx.c log diff annotate
message Add a helper function for writing physical addresses for queues into
command queue mailboxes, and use this for all queue setup commands.
Previously we just assumed the addresses would fit in the first mailbox,
which is currently true but may not be for much longer.

ok dlg@

date 2020-04-06T02:10:33Z
author visa
files src/sys/arch/sgi/conf/RAMDISK-IP22 log diff annotate
src/sys/arch/sgi/conf/RAMDISK-IP26 log diff annotate
src/sys/arch/sgi/conf/RAMDISK-IP27 log diff annotate
src/sys/arch/sgi/conf/RAMDISK-IP28 log diff annotate
src/sys/arch/sgi/conf/RAMDISK-IP30 log diff annotate
src/sys/arch/sgi/stand/boot/conf.c log diff annotate
src/sys/arch/sgi/stand/boot/filesystem.c log diff annotate
src/sys/arch/sgi/stand/boot32/Makefile log diff annotate
src/sys/arch/sgi/stand/libsa/Makefile log diff annotate
message Enable FFS2 in sgi bootblocks and ramdisks.

Tested with boot64 on IP30. State of boot32 and bootecoff is unknown.

OK otto@, deraadt@

date 2020-04-06T02:44:31Z
author cheloha
files src/sys/kern/sys_futex.c log diff annotate
message futex(2): FUTEX_WAIT: rwsleep_nsec(9) at least one nanosecond

mpi@ and I added a warning log to *sleep_nsec(9) last year to smoke
out division-to-zero bugs when converting kernel code from *sleep(9)
to the new interfaces. It whines if you tell it to sleep for zero
nanoseconds.

Now that rwsleep_nsec(9) is exposed to userspace via futex(2), though,
it is possible to get a legitimate zero-nanosecond timeout from the
user. This can cause a lot of logging, which apparently can cause
hiccups and hangs in Mesa.

As a quick fix we can round the timeout up to one nanosecond and
silence the warning. No logs, no delays, no hiccups or hangs.

--

Aside: it is unclear what we are supposed to do in the FUTEX_WAIT
zero-nanosecond timeout case: block for a tick or return ETIMEDOUT
immediately. The Linux futex(2) manpage does not mention the case.
It'd be nice to knew what the proper behavior is.

--

Prompted by matthieu@. Input from kettenis@ and deraadt@.

Tested by matthieu@, ajacoutot@.

In snaps since Mar 27 2020.

ok ajacoutot@, deraadt@, kettenis@.

date 2020-04-06T07:52:12Z
author claudio
files src/sys/kern/kern_synch.c log diff annotate
src/sys/sys/proc.h log diff annotate
message Fix single thread behaviour in sleep_setup_signal(). If a thread needs to
suspend (SINGLE_SUSPEND or SINGLE_PTRACE) it needs to do this in
sleep_setup_signal(). This way the case where single_thread_clear() is
called before the sleep gets its wakeup call can be correctly handled and
the thread is put back to sleep in sleep_finish(). If the wakeup happens
before unsuspend then p_wchan is 0 and the thread will not go to sleep again.
In case of a unwind an error is returned causing the thread to return
immediatly with that error.
With and OK mpi@ kettenis@

date 2020-04-06T08:31:04Z
author mpi
files src/sys/dev/pci/if_ix.c log diff annotate
src/sys/dev/pci/if_ix.h log diff annotate
message Make it possible to use ix(4) with MSI-X, currently disabled by default.

The current implementation still uses a single queue but already establishes
a different handler for link interrupts. This is done in preparation for
multi-queues support.

The performance and i386 regression exposed by the last version of this
diff have been fixed thanks to the help of Hrvoje Popovski.

Based on a bigger diff from haesbaert@ and on the FreeBSD code.

Tested by Sigi Rudzio, Hrvoje Popovski and jmatthew@, ok jmatthew@

date 2020-04-06T11:27:23Z
author jmatthew
files src/sys/dev/pci/if_mcx.c log diff annotate
message fix previous: use the correct offset for sq/rq creation, and don't
reset the mbox counter to 0 after calculating it.

date 2020-04-06T12:31:30Z
author claudio
files src/sys/net/if_pppx.c log diff annotate
src/sys/net/pipex.c log diff annotate
src/sys/net/pipex_local.h log diff annotate
message Pass struct pipex_iface_context pointer down to pipex ioctl functions.
This way pppx(4) and pppac(4) can be further unified. This is an
intermediary step that does not introduce any behaviour change.
From Vitaliy Makkoveev

date 2020-04-06T13:01:36Z
author kettenis
files src/sys/arch/armv7/omap/omgpio.c log diff annotate
message Register controller with the gpio "framework".

ok jsg@

date 2020-04-06T13:03:02Z
author kettenis
files src/sys/arch/armv7/omap/ommmc.c log diff annotate
message Add support for the cd-gpios property.

ok jsg@

date 2020-04-06T13:14:04Z
author claudio
files src/sys/net/pipex.c log diff annotate
message use LIST_FOERACH_SAFE() instead of manual rolling the loop.
From Vitaliy Makkoveev

date 2020-04-06T16:23:44Z
author visa
files src/sys/arch/sgi/stand/bootecoff/Makefile log diff annotate
message Build bootecoff with divdi3.c. bootecoff needs __divdi3,
but the linker does not complain about missing symbols.

Prompted by miod@

date 2020-04-06T16:29:53Z
author visa
files src/sys/dev/softraid.c log diff annotate
message Remove redundant VOP_CLOSE() and vput(). The fail branch will close
the vnode because `open' is true.

OK deraadt@, anton@

date 2020-04-06T17:54:50Z
author cheloha
files src/sys/dev/isa/pcppi.c log diff annotate
src/sys/dev/isa/spkr.c log diff annotate
message pcppi(4), spkr(4): ticks -> milliseconds

In pcppi(4), convert from ticks to milliseconds.

While we're doing this, we can also convert spkr(4), too.

The spkr(4) conversion from ticks to milliseconds is trickier because
the driver is written with musical intervals (whole notes, quarter
notes, etc.), not the typical units (seconds, milliseconds, etc.) used
in most software.

I think the conversion is correct... but the code is a challenging
read, so it might be subtly incorrect.

ratchov@ intends to move spkr(4) into the attic sometime soon so I
doubt it matters much if I got it wrong.

Input from schwarze@, jsg@, and ratchov@.

Tested by schwarze@.

ok ratchov@

date 2020-04-06T19:03:09Z
author cheloha
files src/sys/dev/sun/sunkbd.c log diff annotate
message sunkbd(4): timeout_add(9) -> timeout_add_msec(9); ok kettenis@

date 2020-04-06T19:45:47Z
author cheloha
files src/sys/dev/ic/if_wi.c log diff annotate
message wi(4): tsleep(9) -> tsleep_nsec(9); ok stsp@

date 2020-04-06T23:16:50Z
author cheloha
files src/sys/dev/acpi/dsdt.c log diff annotate
message acpi(4): acpi_sleep(): tsleep(9) -> tsleep_nsec(9)

kettenis@ notes that ACPI integers are supposed to be unsigned, but
ours are signed. This is a much deeper problem than what I'm looking
to change with this conversion. To work around the issue for now we
can round the sleep interval up to 1 millisecond.

There is a very nasty-looking rwsleep(9) call elsewhere in
dev/acpi/dsdt.c that I'm going to leave as-is for now to avoid
breaking something.

With input from pirofti@, kettenis@, and mortimer@.

Tested by Lucas Raab, Moises Simon, mortimer@, and gkoehler@.

ok kettenis@