OpenBSD cvs log

created 2022-11-13T02:36:26Z
begin 2022-11-05T00:00:00Z
end 2022-11-06T00:00:00Z
path src/sys
commits 10

date 2022-11-05T00:12:39Z
author jsg
files src/sys/dev/pci/azalia.c log diff annotate
message match on Intel 500 Series HD Audio (0x43c8)

on a Lenovo ThinkPad P1 Gen 4, the audio device is subclass audio not
hd audio, so azalia does not match

reported by John Browning
ok kettenis@ thfr@

date 2022-11-05T10:31:16Z
author deraadt
files src/sys/kern/exec_elf.c log diff annotate
message For textrel binaries, skipping immutability on text segments is not enough:
It needs to be all non-writeable segments, which really means rodata.
crt0 and ld.so will need to call mimmutable() later on these regions.
ok kettenis

date 2022-11-05T16:23:02Z
author cheloha
files src/sys/arch/powerpc64/include/timetc.h log diff annotate
src/sys/arch/powerpc64/powerpc64/clock.c log diff annotate
message powerpc64: TimeBase: add userspace timecounting support

Tested by gkoehler@.

ok gkoehler@

date 2022-11-05T18:56:09Z
author patrick
files src/sys/arch/arm64/stand/efiboot/fdt.c log diff annotate
src/sys/arch/armv7/stand/efiboot/fdt.c log diff annotate
src/sys/arch/riscv64/stand/efiboot/fdt.c log diff annotate
message Make sure fdt_find_node() returns NULL if it can't find the requested node.

ok kettenis@

date 2022-11-05T18:58:24Z
author patrick
files src/sys/arch/arm64/stand/efiboot/efiboot.c log diff annotate
message Activate the device tree we just loaded from disk. While this doesn't fix
any current bug, it might catch issues in the future.

ok kettenis@

date 2022-11-05T19:00:31Z
author patrick
files src/sys/arch/arm64/stand/efiboot/efiboot.c log diff annotate
message Not every device tree we're getting passed has an /aliases or /chosen node,
but our code assumes so. It's useful to have them, so create them if they
do not exist.

ok kettenis@

date 2022-11-05T19:01:51Z
author patrick
files src/sys/arch/arm64/stand/efiboot/conf.c log diff annotate
message Bump version number so that it's easier to see if the running version has
the bugfixes in.

ok kettenis@

date 2022-11-05T19:29:45Z
author cheloha
files src/sys/conf/files log diff annotate
src/sys/ddb/db_command.c log diff annotate
src/sys/ddb/db_interface.h log diff annotate
message clockintr(9): initial commit

clockintr(9) is a machine-independent clock interrupt scheduler. It
emulates most of what the machine-dependent clock interrupt code is
doing on every platform. Every CPU has a work schedule based on the
system uptime clock. For now, every CPU has a hardclock(9) and a
statclock(). If schedhz is set, every CPU has a schedclock(), too.

This commit only contains the MI pieces. All code is conditionally
compiled with __HAVE_CLOCKINTR. This commit changes no behavior yet.

At a high level, clockintr(9) is configured and used as follows:

1. During boot, the primary CPU calls clockintr_init(9). Global state
is initialized.
2. Primary CPU calls clockintr_cpu_init(9). Local, per-CPU state is
initialized. An "intrclock" struct may be installed, too.
3. Secondary CPUs call clockintr_cpu_init(9) to initialize their
local state.
4. All CPUs repeatedly call clockintr_dispatch(9) from the MD clock
interrupt handler. The CPUs complete work and rearm their local
interrupt clock, if any, during the dispatch.
5. Repeat step (4) until the system shuts down, suspends, or hibernates.
6. During resume, the primary CPU calls inittodr(9) and advances the
system uptime.
7. Go to step (2). This time around, clockintr_cpu_init(9) also
advances the work schedule on the calling CPU to skip events that
expired during suspend. This prevents a "thundering herd" of
useless work during the first clock interrupt.

In the long term, we need an MI clock interrupt scheduler in order to
(1) provide control over the clock interrupt to MI subsystems like
timeout(9) and dt(4) to improve their accuracy, (2) provide drivers
like acpicpu(4) a means for slowing or stopping the clock interrupt on
idle CPUs to conserve power, and (3) reduce the amount of duplicated
code in the MD clock interrupt code.

Before we can do any of that, though, we need to switch every platform
over to using clockintr(9) and do some cleanup.

Prompted by "the vmm(4) time bug," among other problems, and a
discussion at a2k19 on the subject. Lots of design input from
kettenis@. Early versions reviewed by kettenis@ and mlarkin@.
Platform-specific help and testing from kettenis@, gkoehler@,
mlarkin@, miod@, aoyama@, visa@, and dv@. Babysitting and spiritual
guidance from mlarkin@ and kettenis@.

Link: https://marc.info/?l=openbsd-tech&m=166697497302283&w=2

ok kettenis@ mlarkin@

date 2022-11-05T19:29:46Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
src/sys/kern/kern_sysctl.c log diff annotate
src/sys/kern/subr_suspend.c log diff annotate
src/sys/sys/clockintr.h log diff annotate
src/sys/sys/sysctl.h log diff annotate
message clockintr(9): initial commit

clockintr(9) is a machine-independent clock interrupt scheduler. It
emulates most of what the machine-dependent clock interrupt code is
doing on every platform. Every CPU has a work schedule based on the
system uptime clock. For now, every CPU has a hardclock(9) and a
statclock(). If schedhz is set, every CPU has a schedclock(), too.

This commit only contains the MI pieces. All code is conditionally
compiled with __HAVE_CLOCKINTR. This commit changes no behavior yet.

At a high level, clockintr(9) is configured and used as follows:

1. During boot, the primary CPU calls clockintr_init(9). Global state
is initialized.
2. Primary CPU calls clockintr_cpu_init(9). Local, per-CPU state is
initialized. An "intrclock" struct may be installed, too.
3. Secondary CPUs call clockintr_cpu_init(9) to initialize their
local state.
4. All CPUs repeatedly call clockintr_dispatch(9) from the MD clock
interrupt handler. The CPUs complete work and rearm their local
interrupt clock, if any, during the dispatch.
5. Repeat step (4) until the system shuts down, suspends, or hibernates.
6. During resume, the primary CPU calls inittodr(9) and advances the
system uptime.
7. Go to step (2). This time around, clockintr_cpu_init(9) also
advances the work schedule on the calling CPU to skip events that
expired during suspend. This prevents a "thundering herd" of
useless work during the first clock interrupt.

In the long term, we need an MI clock interrupt scheduler in order to
(1) provide control over the clock interrupt to MI subsystems like
timeout(9) and dt(4) to improve their accuracy, (2) provide drivers
like acpicpu(4) a means for slowing or stopping the clock interrupt on
idle CPUs to conserve power, and (3) reduce the amount of duplicated
code in the MD clock interrupt code.

Before we can do any of that, though, we need to switch every platform
over to using clockintr(9) and do some cleanup.

Prompted by "the vmm(4) time bug," among other problems, and a
discussion at a2k19 on the subject. Lots of design input from
kettenis@. Early versions reviewed by kettenis@ and mlarkin@.
Platform-specific help and testing from kettenis@, gkoehler@,
mlarkin@, miod@, aoyama@, visa@, and dv@. Babysitting and spiritual
guidance from mlarkin@ and kettenis@.

Link: https://marc.info/?l=openbsd-tech&m=166697497302283&w=2

ok kettenis@ mlarkin@

date 2022-11-05T22:33:11Z
author jan
files src/sys/net/if_pfsync.c log diff annotate
src/sys/netinet/ip_ipsp.c log diff annotate
message Fix kernel build without IPSEC option.

ok deraadt@