OpenBSD cvs log

created 2023-03-05T14:49:25Z
begin 2023-02-26T00:00:00Z
end 2023-02-27T00:00:00Z
path src/sys
commits 6

date 2023-02-26T12:37:58Z
author kettenis
files src/sys/dev/fdt/rkgpio.c log diff annotate
message Modern Rockchip SoCs, such as the RK356x and RK3588, use a different
register layout where the upper 16 bits decide which of the lower 16 bits
apply when writing to a register. Handle this new variant.

ok patrick@

date 2023-02-26T12:39:07Z
author kettenis
files src/sys/dev/fdt/rkclock.c log diff annotate
src/sys/dev/fdt/rkclock_clocks.h log diff annotate
message RK3588 support.

ok patrick@

date 2023-02-26T12:39:48Z
author kettenis
files src/sys/dev/fdt/rkpinctrl.c log diff annotate
message RK3588 support.

ok patrick@

date 2023-02-26T13:28:12Z
author kettenis
files src/sys/dev/fdt/if_dwge.c log diff annotate
message Defragment mbufs in the tx path to work around a (not fully understood)
issue on the StarFive JH7100 SoC where packets spanning multiple mbufs
are corrupted. Makes ethernet work reliably on the StarFive VisionFive 1
board.

ok patrick@

date 2023-02-26T15:09:53Z
author miod
files src/sys/dev/wscons/wsemul_vt100.c log diff annotate
src/sys/dev/wscons/wsemul_vt100_subr.c log diff annotate
message Add a few missing bounds checks when processing terminal escape sequences.
Without them, the kernel could be made to crash or reboot after receiving some
specially crafted terminal escape sequences.

Reported by David Leadbeater (dgl, dgl dot cx)

date 2023-02-26T23:00:42Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
src/sys/sys/clockintr.h log diff annotate
message clockintr: add a kernel-facing API

We need an API for creating, scheduling, and rescheduling clock
interrupts.

- Add struct clockintr, a schedulable clock interrupt callback.

- Add clockintr_establish(). Allocates a new struct clockintr and
binds it to the given clockintr_queue.

- Add clockintr_expiration(). Returns the clockintr's absolute
expiration uptime.

- Add clockintr_nsecuptime(). Returns the clockintr's parent queue's
cached uptime. Using a cached timestamp is cheaper than calling
nsecuptime(9) repeatedly when we don't absolutely need to.

- Add clockintr_schedule(). Schedules the clock interrupt to run at
or after the given absolute uptime.

- Add clockintr_advance(). Reschedules the clock interrupt in the
future on the given period relative to the parent queue's cached
uptime.

With the above pieces in place we can push most of the scheduling
code for hardclock()/statclock()/schedclock() from clockintr_dispatch()
into the wrapper functions clockintr_hardclock(), clockintr_statclock(),
and clockintr_schedclock(). These wrappers are temporary. I don't
want to muck up the wrapped functions while things are still moving
around.

For the moment these interfaces are internal to kern_clockintr.c. In
a later patch we will move the prototypes into <sys/clockintr.h> so
anyone can use them. We first need to add a data structure for
sorting the clockintr structs. We also need to add a mutex to
clockintr_queue to allow arbitrary threads to safely manipulate clock
interrupts established on other CPUs.

Shown on hackers@. Tweaked by mlarkin@.

ok mlarkin@, "no objections" kettenis@