OpenBSD cvs log

created 2023-05-21T00:48:38Z
begin 2023-04-03T00:00:00Z
end 2023-04-04T00:00:00Z
path src/sys
commits 14

date 2023-04-03T00:20:24Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
src/sys/sys/clockintr.h log diff annotate
message clockintr: protect struct clockintr_queue with a mutex

Add a mutex (cq_mtx) to stuct clockintr_queue so that arbitrary CPUs
can manipulate clock interrupts established on arbitrary CPU queues.

Refactor the bulk of clockintr_schedule() into clockintr_schedule_locked()
so we can reuse it from within the mutex.

Tested by mlarkin@. Neat bug found by mlarkin@. With tweaks from
kettenis@.

ok kettenis@

date 2023-04-03T01:21:31Z
author dlg
files src/sys/dev/fdt/rkusbphy.c log diff annotate
message do actual init of the phy itself when needed.

turn the phy clock on and take the port out of suspend when something
(eg, xhci or ehci) wants to use the port.

before this the code just enabled power on the phy port regulators.

ok kettenis@

date 2023-04-03T01:30:32Z
author dlg
files src/sys/dev/ofw/ofw_misc.c log diff annotate
message add glue for network interfaces to be found by fdt/ofw node or phandle.

if we're going to support switch chips (eg, marvell link street
switches as found on a3700 boards like the espressobin), then the
device tree for switch ports identifies which network interface
they're connected by by a reference (phandle) across the device
tree. this lets network drivers register the ifnet struct with the
associated node and phandle so the switch can find it and configure
it for use with the switch.

ok kettenis@

date 2023-04-03T01:30:33Z
author dlg
files src/sys/dev/ofw/ofw_misc.h log diff annotate
message add glue for network interfaces to be found by fdt/ofw node or phandle.

if we're going to support switch chips (eg, marvell link street
switches as found on a3700 boards like the espressobin), then the
device tree for switch ports identifies which network interface
they're connected by by a reference (phandle) across the device
tree. this lets network drivers register the ifnet struct with the
associated node and phandle so the switch can find it and configure
it for use with the switch.

ok kettenis@

date 2023-04-03T01:34:06Z
author dlg
files src/sys/dev/ofw/ofw_misc.c log diff annotate
message special case phandle 0 and return NULL when looking up network interfaces.

not all interfaces will have a phandle (ie, it will be 0), so don't
let phandle 0 be used to find any of these.

discussed with miod@

date 2023-04-03T01:40:32Z
author dlg
files src/sys/dev/ofw/ofw_misc.c log diff annotate
src/sys/dev/ofw/ofw_misc.h log diff annotate
message add phy_enable_prop_idx() to work with phys under props other than "phy".

eg, the snps,dwc3 device tree bindings say that it uses a usb2 and
usb3 phy, and they can be listed either "usb2-phy" and "usb3-phy"
under the standard "phys" and "phy-names" properties supported by
phy_enable(), or as slots 0 and 1 under a "usb-phy" properties. the
latter would be supported by phy_enable_idx(), but it hardcodes
"phys" as the property it looks at. phy_enable_prop_idx() is the
same as phy_enable_prop_idx, but it lets you specify which property
you're indexing into.

ok kettenis@

date 2023-04-03T01:46:18Z
author dlg
files src/sys/dev/fdt/if_mvneta.c log diff annotate
message register mvneta so the interface can be found by node/phandle later.

date 2023-04-03T01:55:00Z
author dlg
files src/sys/dev/fdt/xhci_fdt.c log diff annotate
message add support for enabling both the usb2 and usb3 phys.

the code tried enabling the 0th phy in the usb-phy proplist, which
is the usb2 phy, and if that didn't exist it would try usb3-phy in
the standard phys/phy-names properties. it now tries to enable the
usb2 and usb3 phys independently.

further, support using standard phy drivers registered with the
ofw/fdt code, not just the ones handled inside the xhci driver.

ok kettenis@

date 2023-04-03T01:57:41Z
author dlg
files src/sys/dev/fdt/ehci_fdt.c log diff annotate
message try using a standard phy drivers registered with ofw/fdt first.

this allows ehci to enable rkusbphy(4), which in means the port and
port gets turned onto the port.

tested on a radxa e25 and nanopi r5s without any usb or usb phy
support in the boot loader.

ok kettenis@

date 2023-04-03T05:58:56Z
author dlg
files src/sys/arch/arm64/conf/GENERIC log diff annotate
src/sys/arch/arm64/conf/RAMDISK log diff annotate
message enable rkusbphy(4)

date 2023-04-03T11:57:50Z
author claudio
files src/sys/kern/kern_sig.c log diff annotate
message Reduce indent in single_thread_check_locked() by inverting initial
if () check which just returns.
OK mpi@

date 2023-04-03T13:38:18Z
author millert
files src/sys/dev/acpi/acpibtn.c log diff annotate
message acpibtn_notify: ignore duplicate ACPI lid transitions
A Dell Precision 5510 produces two _LID events when the lid is closed.
This results in acpibtn_notify() adding two sleep tasks. The laptop
suspends and resumes successfully, but on resume the second sleep
task runs and it goes right back to sleep. Making the lid transition
a no-op when the existing value matches new _LID value works around
the problem. OK miod@ jcs@

date 2023-04-03T17:40:51Z
author cheloha
files src/sys/kern/kern_clockintr.c log diff annotate
message clockintr: clockintr_cpu_init(): isolate struct clockintr_queue setup

We will always need to initialize the clockintr_queue struct.
However, the hardclock, schedclock, and statclock will not always be a
part of that struct. Move the clockintr_establish() calls in
clockintr_cpu_init() away from the other initialization steps to make
the dependency relationship more obvious. We need to intialize a
struct clockintr_queue before we can establish clock interrupts.

date 2023-04-03T18:59:47Z
author miod
files src/sys/dev/pci/sti_pci.c log diff annotate
message Fix stupid bug in previous.