OpenBSD cvs log

created 2020-11-19T18:57:25Z
begin 2020-06-22T00:00:00Z
end 2020-06-23T00:00:00Z
path src/sys
commits 54

date 2020-06-22T00:33:28Z
author dlg
files src/sys/arch/i386/conf/GENERIC log diff annotate
src/sys/arch/i386/conf/RAMDISK_CD log diff annotate
message enable nvme on i386.

ok deraadt@

date 2020-06-22T02:23:21Z
author dlg
files src/sys/dev/fdt/if_dwge.c log diff annotate
src/sys/dev/fdt/if_dwxe.c log diff annotate
src/sys/dev/fdt/if_fec.c log diff annotate
src/sys/dev/fdt/if_mvneta.c log diff annotate
message use ifiq_input and use it's return value to apply backpressure to rxrs.

this is a step toward deprecating softclock based livelock detection.

kettenis@ tested fec(4) on armv7 and dwge(4) on arm64
jmatthew@ tested dwxe(4) on armv7 and noted rings shrinking under load.

date 2020-06-22T02:27:04Z
author dlg
files src/sys/dev/ic/bcmgenet.c log diff annotate
src/sys/dev/ic/gem.c log diff annotate
src/sys/dev/ic/hme.c log diff annotate
src/sys/dev/ic/re.c log diff annotate
src/sys/dev/ic/xl.c log diff annotate
message use ifiq_input and use it's return value to apply backpressure to rxrs.

this is a step toward deprecating softclock based livelock detection.

date 2020-06-22T02:31:32Z
author dlg
files src/sys/dev/pci/if_bge.c log diff annotate
src/sys/dev/pci/if_bnx.c log diff annotate
src/sys/dev/pci/if_bnxt.c log diff annotate
src/sys/dev/pci/if_bwfm_pci.c log diff annotate
src/sys/dev/pci/if_em.c log diff annotate
src/sys/dev/pci/if_nep.c log diff annotate
src/sys/dev/pci/if_oce.c log diff annotate
src/sys/dev/pci/if_sis.c log diff annotate
message use ifiq_input and use it's return value to apply backpressure to rxrs.

this is a step toward deprecating softclock based livelock detection.

date 2020-06-22T02:31:33Z
author dlg
files src/sys/dev/pci/if_sk.c log diff annotate
src/sys/dev/pci/if_vic.c log diff annotate
src/sys/dev/pci/if_vr.c log diff annotate
src/sys/dev/pv/if_vio.c log diff annotate
message use ifiq_input and use it's return value to apply backpressure to rxrs.

this is a step toward deprecating softclock based livelock detection.

date 2020-06-22T02:45:18Z
author dlg
files src/sys/kern/kern_sysctl.c log diff annotate
message there's not going to be any whole kernel wide network livelocks soon.

date 2020-06-22T03:07:57Z
author dlg
files src/sys/net/if.c log diff annotate
message deprecate network livelock detection using the softclock.

livelock detection used to rely on code running at softnet blocking
the softclock handling at a lower interrupt priority level. if the
hard clock interrupt count diverged from one kept by a timeout, we
assumed the network stack was doing too much work and we should
apply backpressure to the receptions of packets.

the network stack doesnt really block timeouts from firing anymore
though. this is especially true on MP systems, because timeouts
fire on cpu0 and the nettq thread could be somewhere else entirely.
this means network activity doesn't make the softclock lose ticks,
which means we aren't scaling rx ring activity like we think we
are.

the alternative way to detect livelock is when a driver queues
packets for the stack to process, if there's too many packets built
up then the input routine return value tells the driver to slow
down. this enables finer grained livelock detection too. the rx
ring accounting is done per rx ring, and each rx ring is tied to a
specific nettq. if one of them is going too fast it shouldn't affect
the others. the tick based detection was done system wide and
punished all the drivers.

ive converted all the drivers to the new mechanism. let's see how
we go with it.

jmatthew@ confirms rings still shrink, so some backpressure is being
applied.

date 2020-06-22T04:11:37Z
author dlg
files src/sys/dev/pci/pci.c log diff annotate
src/sys/sys/pciio.h log diff annotate
message let userland read vpd info from a pci device.

reading vpd stuff is useful when you're trying to get support
information about a pci device, eg, if you want a serial number,
or firmware versions, or specific part name or number, it's likely
available via vpd. also, im sick of having the diff in my tree.

the vpd info is not accessed as bytes read from a capability, but
is read via a register in the capability. the same register also
supports updating or writing vpd info, which sounds like a bad idea
to let userland have raw access to.

this adds an ioctl so that userland can ask the kernel to read via
the vpd register on its behalf. this ensures that the only access
is read access, and it's sanity checked.

tested by hrvoje popovski on many devices.
ok jmatthew@

date 2020-06-22T05:19:26Z
author jsg
files src/sys/dev/pci/drm/include/linux/completion.h log diff annotate
message in wait_for_completion_* return 0 on timeout -ERESTARTSYS on signal

matches how the interfaces are documented

date 2020-06-22T07:15:28Z
author stsp
files src/sys/dev/pci/if_iwx.c log diff annotate
message Fix length specification for 2GHz band IE data in iwx(4) probe request
template.

This code path is not used yet because active scanning mode is still
disabled in this driver.

ok kn@

date 2020-06-22T07:25:49Z
author stsp
files src/sys/dev/pci/if_iwx.c log diff annotate
message Fix unconditional write to v1.scan_priority in iwx(4) scan command.

The data structure for the scan command contains a union which represents
various versions of the scan command. The driver wrote to the scan_priority
field in version 1 data regardless of the scan command version actually
expected by firmware.

Perform that write only for scan command version 1, as intended.
Testing suggests that this prevents occasional firmware errors during scans.

date 2020-06-22T07:31:32Z
author stsp
files src/sys/dev/pci/if_iwx.c log diff annotate
message Do not copy an SSID into the iwx(4) probe request template.

Firmware will add SSIDs specified via the scan command to its probe requests.
There is no need to copy an SSID into the template.

This code path is not used yet because active scanning mode is still
disabled in this driver.

date 2020-06-22T07:39:41Z
author stsp
files src/sys/dev/pci/if_iwx.c log diff annotate
src/sys/dev/pci/if_iwxreg.h log diff annotate
message Enable critical temperature detection in iwx(4) firmware.

The driver will turn the device off and print a message to dmesg if the
firmware signals critical temperature. It looks like the firmware will
also make use of a Tx-backoff mechanism to regulate device temperature.

date 2020-06-22T07:52:24Z
author stsp
files src/sys/dev/pci/if_iwx.c log diff annotate
message Update definition of the iwx_ac_to_tx_fifo map.

Compared to iwm(4) devices the BE and BK fifo numbers have been swapped
in iwx(4) hardware. This has no real consequences for us since we send
all frames at the same access category, but I'm fixing the mapping anyway.

date 2020-06-22T08:05:52Z
author stsp
files src/sys/dev/pci/if_iwx.c log diff annotate
src/sys/dev/pci/if_iwxreg.h log diff annotate
message Prepare for newer iwx(4) firmware scan command versions.

Add declarations of "version 2" scan flags from iwlwifi and prepare the
iwx_scan_channel_cfg_umac struct for life beyond version 1.

None of this is needed yet. But we will need this at some point and I've
already written the diff, hoping it would prevent firmware errors (which
of course it didn't).

date 2020-06-22T08:21:51Z
author stsp
files src/sys/dev/pci/if_iwxreg.h log diff annotate
message Fix two iwx(4) TX_CMD_OFFLD macros.

The IP_HDR and MH_SIZE fields represent byte offsets into the frame, rather
than flags. Make these macros require a parameter to prevent them from being
misunderstood as flag bits.

In iwlwifi these are defined via an enum, with most values being used as
parameters to BIT(). Yet these IP and MH ones are actually used to shift
length values to particular positions within the offloading parameters
of the Tx command.

Fortunately, these macros aren't used yet in our version of the driver.

date 2020-06-22T09:38:15Z
author mvs
files src/sys/net/pipex.c log diff annotate
message Prevent potencial `state_list' corruption while pppac(4) destroys pipex(4)
sessions by pipex_iface_fini() or by pipex_ioctl() with `PIPEXSMODE' command.

ok yasuoka@

date 2020-06-22T09:42:36Z
author jsg
files src/sys/dev/pci/drm/i915/gem/i915_gem_userptr.c log diff annotate
message gup: document and work around "COW can break either way" issue

From Linus Torvalds
8e45fdafdecc8436c5b6e1620c30726056e6b29c in linux 5.7.y/5.7.3
17839856fd588f4ab6b789f482ed3ffd7c403e1f in mainline linux

date 2020-06-22T09:45:13Z
author claudio
files src/sys/net/if.c log diff annotate
src/sys/net/if_wg.c log diff annotate
message The interface if_ioctl routine must be called with the NET_LOCK() held.
For example the bridge_ioctl() function calls NET_UNLOCK() unconditionally
and so calling if_ioctl() without netlock will trigger an assert because
of not holding the netlock. Make sure the ioctl handlers are called with
the netlock held and drop the lock for the wg(4) specific ioctls in the
wg_ioctl handler. This fixes a panic in bridge_ioctl() triggered by
ifconfig(8) issuing a SIOCGWG ioctl against bridge(4).
This is just a workaround this needs more cleanup but at least this way
the panic can not be triggered anymore.
OK stsp@, tested by semarie@

date 2020-06-22T09:46:20Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_gem.c log diff annotate
message drm/amdgpu: fix and cleanup amdgpu_gem_object_close v4

From Christian Koenig
ba90bed3ea632a6cff527dea080336666f36ab2b in linux 5.7.y/5.7.5
82c416b13cb7d22b96ec0888b296a48dff8a09eb in mainline linux

date 2020-06-22T09:49:24Z
author jsg
files src/sys/dev/pci/drm/amd/display/dc/dcn20/dcn20_hwseq.c log diff annotate
src/sys/dev/pci/drm/amd/display/dc/inc/hw/dchubbub.h log diff annotate
message drm/amd/display: Force watermark value propagation

From Joshua Aberback
3a16e9862faff68edb43c1ec3112d62f6a391037 in linux 5.7.y/5.7.5
868149c9a072cbdc22a73ce25a487f9fbfa171ef in mainline linux

date 2020-06-22T09:51:25Z
author jsg
files src/sys/dev/pci/drm/amd/display/dc/core/dc_link_hwss.c log diff annotate
message drm/amd/display: fix virtual signal dsc setup

From Dmytro Laktyushkin
b5d74af308d373668ec2d8f0f0a490207fcc5eda in linux 5.7.y/5.7.5
d5bef51f084fccafa984b114ff74a01a64a0e2e3 in mainline linux

date 2020-06-22T09:54:02Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_pm.c log diff annotate
message drm/amdgpu: Init data to avoid oops while reading pp_num_states.

From limingyu
4ceae1cf8ca686b64a68822677ef0fb69a917c4e in linux 5.7.y/5.7.5
6f81b2d047c59eb77cd04795a44245d6a52cdaec in mainline linux

date 2020-06-22T09:56:20Z
author jsg
files src/sys/dev/pci/drm/drm_dp_helper.c log diff annotate
message drm/dp: Lenovo X13 Yoga OLED panel brightness fix

From Mark Pearson
b846c5c78cf6365adf3b32645db39009c4710a2c in linux 5.7.y/5.7.5
0df3ff451287d71c620384eb7bb2cd3a8106412c in mainline linux

date 2020-06-22T09:58:17Z
author jsg
files src/sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_optc.c log diff annotate
message drm/amd/display: Revert to old formula in set_vtg_params

From Alvin Lee
719bdc4363637fa45b67c80259c6a72967cb4947 in linux 5.7.y/5.7.5
a1a0e61f3c43c610f0a3c109348c14ce930c1977 in mainline linux

date 2020-06-22T10:00:28Z
author jsg
files src/sys/dev/pci/drm/amd/display/dc/dcn21/dcn21_resource.c log diff annotate
message drm/amd/display: Correct updating logic of dcn21's pipe VM flags

From Dale Zhao
21b7c6033823d3888a195a24271cbea34279dd62 in linux 5.7.y/5.7.5
2a28fe92220a116735ef45939b7edcfee83cc6b0 in mainline linux

date 2020-06-22T10:01:03Z
author mvs
files src/sys/net/if_pppx.c log diff annotate
message Rework checks for `pppx_ifs' tree modification.
- There is no panic() condition while inserting `pxi' to tree so drop
RBT_FIND() to avoid two lookups.
- Modify text in panic() message in delete case.

ok yasuoka@ claudio@

date 2020-06-22T10:02:42Z
author jsg
files src/sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr_vbios_smu.c log diff annotate
message drm/amd/display: dmcu wait loop calculation is incorrect in RV

From Paul Hsieh
11bce5915166fd50a395716755db8c6a3d3f2eb0 in linux 5.7.y/5.7.5
7fc5c319efceaed1a23b7ef35c333553ce39fecf in mainline linux

date 2020-06-22T10:05:32Z
author jsg
files src/sys/dev/pci/drm/amd/display/dc/dcn20/dcn20_resource.c log diff annotate
message drm/amd/display: Do not disable pipe split if mode is not supported

From Sung Lee
dbf0a8fce6a9c867c315a400176f9f0e3a963d1e in linux 5.7.y/5.7.5
1dfedb39d38f813357885e19badd1971c17f79a7 in mainline linux

date 2020-06-22T10:09:13Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_pm.c log diff annotate
message drm/amd/powerpay: Disable gfxoff when setting manual mode on picasso and raven

From chen gong
4e88ff94dd359871f609da9f430712fcf7025164 in linux 5.7.y/5.7.5
cbd2d08c7463e78d625a69e9db27ad3004cbbd99 in mainline linux

date 2020-06-22T10:11:55Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_vm.c log diff annotate
message drm/amdgpu: Sync with VM root BO when switching VM to CPU update mode

From Felix Kuehling
8db9696c1fdfa3d80e29ee80d002f315e4e344a9 in linux 5.7.y/5.7.5
90ca78deb004abe75b5024968a199acb96bb70f9 in mainline linux

date 2020-06-22T11:30:23Z
author krw
files src/sys/netinet6/ip6_output.c log diff annotate
message Don't pass a pointer to an uninitialized variable as plenp to
ip6_hopopts(). The value is tested and non-zero values could cause a
packet to be discarded.

Initialize the pointed at variable to 0, tweaking variable names and
associated comments.

COVERITY 1453098

ok deraadt@ mpi@

date 2020-06-22T12:20:44Z
author jasper
files src/sys/net/if_wg.c log diff annotate
src/sys/net/if_wg.h log diff annotate
message add missing rcs id

date 2020-06-22T12:27:54Z
author pirofti
files src/sys/arch/amd64/amd64/tsc.c log diff annotate
message Change tsc_get_timecount return from uint to u_int per sys/timetc.h.

First brought up by naddy@ in the usertc thread, OK kettenis@.

date 2020-06-22T13:14:32Z
author mpi
files src/sys/kern/kern_event.c log diff annotate
src/sys/kern/tty_pty.c log diff annotate
src/sys/kern/uipc_socket.c log diff annotate
src/sys/sys/event.h log diff annotate
message Extend kqueue interface with EVFILT_EXCEPT filter.

This filter, already implemented in macOS and Dragonfly BSD, returns
exceptional conditions like the reception of out-of-band data.

The functionnality is similar to poll(2)'s POLLPRI & POLLRDBAND and
it can be used by the kqfilter-based poll & select implementation.

ok millert@ on a previous version, ok visa@

date 2020-06-22T13:38:47Z
author jsg
files src/sys/dev/pci/drm/include/linux/completion.h log diff annotate
message don't try to decrement if completion flag is UINT_MAX

date 2020-06-22T13:52:40Z
author kettenis
files src/sys/arch/powerpc64/include/cpu.h log diff annotate
message Provide working definitions of PROC_STACK() and PROC_PC().

date 2020-06-22T14:19:35Z
author jsg
files src/sys/dev/pci/drm/include/linux/completion.h log diff annotate
message apart from the lock wait_queue_head struct is unused so replace it

date 2020-06-22T14:26:23Z
author kettenis
files src/sys/dev/pci/drm/i915/i915_drv.c log diff annotate
message Some connectors attach late when the drm driver is registers. For
that reason we have to delay attaching Backlight properties to those
connectors until after drm driver registration. However the drm midlayer
code now warns about attaching new properties to connectors after
driver registration. So add some workarounds to suppress these
warning messages.

Figured out by jcs@

ok jsg@, jcs@

date 2020-06-22T15:49:37Z
author tobhe
files src/sys/dev/usb/usbdevs log diff annotate
message Add Ericsson F5521gw Mobile Broadband Modem.

ok sthen@

date 2020-06-22T15:52:39Z
author tobhe
files src/sys/dev/usb/usbdevs.h log diff annotate
src/sys/dev/usb/usbdevs_data.h log diff annotate
message regen

date 2020-06-22T15:54:55Z
author tobhe
files src/sys/dev/usb/umass_quirks.c log diff annotate
message Blacklist Ericsson F5521gw broadband modem.

ok sthen@

date 2020-06-22T16:09:33Z
author kettenis
files src/sys/arch/powerpc64/powerpc64/machdep.c log diff annotate
message Implement setregs().

date 2020-06-22T16:22:58Z
author kettenis
files src/sys/arch/powerpc64/powerpc64/locore.S log diff annotate
message Add magic offset to make the frames line up.

date 2020-06-22T16:25:55Z
author stsp
files src/sys/dev/pci/if_iwx.c log diff annotate
src/sys/dev/pci/if_iwxreg.h log diff annotate
src/sys/dev/pci/if_iwxvar.h log diff annotate
message Remove unused code for parsing non-volatile memory (NVM) from iwx(4).

date 2020-06-22T16:27:37Z
author stsp
files src/sys/dev/pci/if_iwx.c log diff annotate
src/sys/dev/pci/if_iwxvar.h log diff annotate
message Remove AMRR/MiRA support from iwx(4). Tx rate selection happens in firmware.

date 2020-06-22T16:47:10Z
author kettenis
files src/sys/arch/powerpc64/powerpc64/locore.S log diff annotate
message Fix previous commit; pasted instructed in the wrong spot.

date 2020-06-22T16:58:20Z
author kettenis
files src/sys/arch/powerpc64/include/cpu.h log diff annotate
src/sys/arch/powerpc64/include/pmap.h log diff annotate
src/sys/arch/powerpc64/include/proc.h log diff annotate
src/sys/arch/powerpc64/powerpc64/genassym.cf log diff annotate
src/sys/arch/powerpc64/powerpc64/locore.S log diff annotate
src/sys/arch/powerpc64/powerpc64/pmap.c log diff annotate
src/sys/arch/powerpc64/powerpc64/trap.c log diff annotate
src/sys/arch/powerpc64/powerpc64/trap_subr.S log diff annotate
src/sys/arch/powerpc64/powerpc64/vm_machdep.c log diff annotate
message Make return-to-user and kernel re-entry work. This adds a per-pmap SLB
cache. We might want to turn that in a per-proc cache at some point, but
this gets us to the point where we can sucessfully have init(1) do its
first system call.

date 2020-06-22T18:03:22Z
author kettenis
files src/sys/arch/powerpc64/include/pmap.h log diff annotate
src/sys/arch/powerpc64/powerpc64/pmap.c log diff annotate
src/sys/arch/powerpc64/powerpc64/trap.c log diff annotate
message Handle data storage and data segment interrupts from userland as well.

date 2020-06-22T18:15:50Z
author kettenis
files src/sys/arch/powerpc64/powerpc64/trap.c log diff annotate
message Enable interrupts when they were enabled before the trap (except when we
are handling "genuine" interrupts like the decrementer and hypervisor
virtualization interrupts).

date 2020-06-22T18:25:57Z
author cheloha
files src/sys/kern/kern_time.c log diff annotate
message inittodr(9): introduce dedicated flag to enable writes from resettodr(9)

We don't want resettodr(9) to write the RTC until inittodr(9) has
actually run. Until inittodr(9) calls tc_setclock() the system UTC
clock will contain a meaningless value and there's no sense in
overwriting a good value with a value we know is nonsense.

This is not an uncommon problem if you're debugging a problem in early
boot, e.g. a panic that occurs prior to inittodr(9).

Currently we use the following logic in resettodr(9) to inhibit writes:

if (time_second == 1)
return;

... this is too magical.

A better way to accomplish the same thing is to introduce a dedicated
flag set from inittodr(9). Hence, "inittodr_done".

Suggested by visa@.

ok kettenis@

date 2020-06-22T18:49:36Z
author kettenis
files src/sys/arch/powerpc64/powerpc64/db_trace.c log diff annotate
src/sys/arch/powerpc64/powerpc64/locore.S log diff annotate
src/sys/arch/powerpc64/powerpc64/trap_subr.S log diff annotate
message The minimum frame size for the ELFv2 ABI is 32 bytes. Using this value
instead of 48 in the trap setup functions makes it possible to get rid
of the magic offset in proc_trampoline.

Suggested by gkoehler@

date 2020-06-22T21:13:40Z
author kettenis
files src/sys/arch/powerpc64/conf/GENERIC log diff annotate
src/sys/arch/powerpc64/conf/files.powerpc64 log diff annotate
src/sys/arch/powerpc64/dev/opal.c log diff annotate
src/sys/arch/powerpc64/dev/opalcons.c log diff annotate
src/sys/arch/powerpc64/include/conf.h log diff annotate
src/sys/arch/powerpc64/powerpc64/conf.c log diff annotate
message Add opalcons(4), a driver for the OPAL console.

date 2020-06-22T21:16:07Z
author cheloha
files src/sys/kern/kern_tc.c log diff annotate
src/sys/sys/time.h log diff annotate
message timecounting: add gettime(9), getuptime(9)

time_second and time_uptime are used widely in the tree. This is a
problem on 32-bit platforms because time_t is 64-bit, so there is a
potential split-read whenever they are used at or below IPL_CLOCK.

Here are two replacement interfaces: gettime(9) and getuptime(9).
The "get" prefix signifies that they do not read the hardware
timecounter, i.e. they are fast and low-res. The lack of a unit
(e.g. micro, nano) signifies that they yield a plain time_t.

As an optimization on LP64 platforms we can just return time_second or
time_uptime, as a single read is atomic. On 32-bit platforms we need
to do the lockless read loop and get the values from the timecounter.

In a subsequent diff these will be substituted for time_second and
time_uptime almost everywhere in the kernel.

With input from visa@ and dlg@.

ok kettenis@