summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2023-09-05vmm(4): switch the APMI CPUID mask to an include maskMike Larkin
dv points out that there are other bits there that imply the existence of other MSRs, so switching this to an include list is a better idea.
2023-09-05stop putting multicast addresses into the Receive Address RegistersChristian Weisgerber
Hash them all into the Multicast Table Array. This matches what FreeBSD does. This fixes a problem where the I217-LM would fail to receive packets for some of the programmed addresses. Approach agreed by jmatthew@ dlg@ OK claudio@
2023-09-05Make ksmn(4) attach to 19h/4x devicesStefan Sperling
Tested on: cpu0: AMD Ryzen 5 PRO 6650U with Radeon Graphics, 2900.00 MHz, 19-44-01, patch 0a404102 ok mlarkin
2023-09-05Fix touchpad on newer device trees. The *gpio fields moved up one layer.Tobias Heider
The driver will work with both formats for now but we plan to remove the old one in the future. ok kettenis@
2023-09-05Address the case 2b version of inconsistent view across threads ofPhilip Guenther
a page undergoing copy-on-write faulting. We fixed the case 1b version in rev 1.125 (2022-02-01), but missed this other path. jsg@ noted that in NetBSD Chuck Silvers had a relevant commit, their rev 1.234 (2023-08-13), which looks like it fixed both cases due to their refactoring of common code into a uvmfault_promote() function. ok mpi@ jca@
2023-09-04Fix netstat output of uses of current SYN cache left.Alexander Bluhm
TCP syn cache variable scs_use is basically counting packet insertions into syn cache. Prefer type long to exclude overflow on fast machines. Due to counting downwards from a limit, it can become negative. Copy it out as tcps_sc_uses_left via sysctl, and print it as signed long long integer. OK mvs@
2023-09-04Protect ps_single, ps_singlecnt and ps_threadcnt by the process mutex.Claudio Jeker
The single thread API needs to lock the process to enter single thread mode and does not need to stop the scheduler. This code changes ps_singlecount from a count down to zero to ps_singlecnt which counts up until equal to ps_threadcnt (in which case all threads are properly asleep). Tested by phessler@, OK mpi@ cheloha@
2023-09-03Avoid a useless increment and decrement of the tcp syn cache refcountAlexander Bluhm
by unexpanding the SYN_CACHE_TIMER_ARM() macro in the timer callback. OK mvs@
2023-09-03vmm(4): Suppress AMD HwPstate visibility to guestsMike Larkin
On newer Ryzen/EPYC, we need to hide the HwPstate CPUID 80000007:EDX field for HwPstate, or guests will try to access the MSRs associated with those, and that will fail with #GP. ok deraadt
2023-09-03Adapt tlb flush calls following arm64/pmap.cJeremie Courreges-Anglas
1. in pmap_enter() no need to call tlb_flush_page() if we don't actually insert a pted 2. all callers of pmap_pte_remove() already call tlb_flush_page() This seems to result in some performance improvement (18mn -> 17mn15) while building libc on a Hifive Unmatched). Also zap whitespace and useless comments to further reduce the diff with arm64/pmap.c ok kettenis@
2023-09-03Inline PTED_* functions and actually use PTED_WIRED()Jeremie Courreges-Anglas
As noted by drahn@ the compiler did inline said functions, but it also provided them as unused symbols. ok miod@ mlarkin@ kettenis@
2023-09-03pmap_page_protect() should not unmap pages after making them readonly.Jeremie Courreges-Anglas
This brings riscv64/pmap.c in line with arm64/pmap.c, original fix by drahn@ ok miod@ kettenis@ mlarkin@
2023-09-02Avoid trying to remove keys if the station is not active in iwm firmware.Stefan Sperling
Same fix as applied to iwx(4) in March. Since iwm(4) does not use a task for key installation and removal the same race might not manifest here. However, trying to delete a key while the station is not in firmware is wrong in any case. And this code might get moved into a task later.
2023-09-02Make iwm(4) not crash when aircrack-ng attempts to inject frames viaStefan Sperling
bpf in monitor mode. Crash reported by brad and sthen. I reproduced the issue to verify my fix but I did not check whether aircrack-ng actually works with this.
2023-09-02Zap anon pages mappings in uvm_anon_release() instead of in the fault handler.Martin Pieuchot
This makes all code paths deactivating or freeing anons consistent. No objection from the usual suspects.
2023-09-01Implement drive strength tweaking for the YT8531. Needed on the v1.3bMark Kettenis
variant of the visionfive2 board. ok jsing@
2023-09-01Call rtm_send() with netlock held to protect dereference of sockaddrVitaliy Makkoveev
structure data returned by rtable_getsource(). Netlock can't be pushed within rtm_send() because we have paths where caller already holds it. tested by jca ok bluhm jca
2023-09-01Update with pin definitions from Linux 6.4.Mark Kettenis
ok patrick@
2023-08-31sched_cpu_init: remove unnecessary NULL-checks for clockintr pointersScott Soule Cheloha
sched_cpu_init() is only run once per cpu_info struct, so we don't need these NULL-checks. The NULL-checks are a vestige of clockintr_cpu_init(), which runs more than once per CPU and uses the checks to avoid leaking clockintr handles. Thread: https://marc.info/?l=openbsd-tech&m=169349579804340&w=2 ok claudio@
2023-08-31drm/display/dp: Fix the DP DSC Receiver cap sizeJonathan Gray
From Ankit Nautiyal 3bc9b0364a8c64d1bb1757b620ea3b9104e8054b in linux-6.1.y/6.1.50 5ad1ab30ac0809d2963ddcf39ac34317a24a2f17 in mainline linux
2023-08-31drm/i915/dgfx: Enable d3cold at s2idleJonathan Gray
From Anshuman Gupta 3abffee6091c5a2716963c229e192a36a9590a88 in linux-6.1.y/6.1.50 2872144aec04baa7e43ecd2a60f7f0be3aa843fd in mainline linux
2023-08-31drm/i915/gt: Support aux invalidation on all enginesJonathan Gray
From Andi Shyti 7e862cce34916458bf6af954d198cce103c1e13f in linux-6.1.y/6.1.50 6a35f22d222528e1b157c6978c9424d2f8cbe0a1 in mainline linux
2023-08-31drm/i915/gt: Poll aux invalidation register bit on invalidationJonathan Gray
From Jonathan Cavitt 8e3f138b96f64fde58d74f886acbfd4baca907fc in linux-6.1.y/6.1.50 0fde2f23516a00fd90dfb980b66b4665fcbfa659 in mainline linux
2023-08-31drm/i915/gt: Ensure memory quiesced before invalidationJonathan Gray
From Jonathan Cavitt 017d4404312ab94a61be218c0221cd0048a37896 in linux-6.1.y/6.1.50 78a6ccd65fa3a7cc697810db079cc4b84dff03d5 in mainline linux
2023-08-31drm/i915: Add the gen12_needs_ccs_aux_inv helperJonathan Gray
From Andi Shyti c23126f2c76a17b97520d306542cee32bb26fad8 in linux-6.1.y/6.1.50 b2f59e9026038a5bbcbc0019fa58f963138211ee in mainline linux
2023-08-31drm/aperture: Remove primary argumentJonathan Gray
From Daniel Vetter 437e99f2a1e933348c4cedb2c7ce6f0ad81b935e in linux-6.1.y/6.1.50 62aeaeaa1b267c5149abee6b45967a5df3feed58 in mainline linux
2023-08-30On JH7110, configure the tx clock according to the selected speed ifMark Kettenis
necessary. ok jsing@
2023-08-30Implement a few more clocks related to the GMAC.Mark Kettenis
ok jsing@
2023-08-30Preempt a running proc even if there is no other process/thread queuedClaudio Jeker
on that CPU's runqueue. This way mi_switch() is invoked which is necessary to a) signal srm that the cpu changed context b) runtime stats are updated c) requests to stop the CPU are checked. This should fix the issue reported by Eric Wong (e at 80x24 org) that RLIMIT_CPU is unreliable on idle systems. OK kettenis@ cheloha@
2023-08-30Add support for the upstream Linux device tree bindings. Support for theMark Kettenis
preliminary bindings will be removed in a couple of weeks. ok kevlo@, jsing@, jmatthew@
2023-08-30regenKevin Lo
2023-08-30Add Phison PS5021 device idKevin Lo
ok miod@, jsg@
2023-08-29fix handling of unknown error rate in mbim signal state infoDavid Gwynne
from gerhard@: > According to MBIM spec, table 10-58 (MBIM_SIGNAL_STATE_INFO) a value > of 99 means the error rate is "Unknown or undetectable". the code was using -99 before, but properly reports unknown/null now.
2023-08-29export mbim signal statsDavid Gwynne
tested by mbuhl@ gerhard@
2023-08-29Remove p_rtime from struct proc and replace it by passing the timespecClaudio Jeker
as argument to the tuagg_locked function. - Remove incorrect use of p_rtime in other parts of the tree. p_rtime was almost always 0 so including it in any sum did not alter the result. - In main() the update of time can be further simplified since at that time only the primary cpu is running. - Add missing nanouptime() call in cpu_hatch() for hppa - Rename tuagg_unlocked to tuagg_locked like it is done in the rest of the tree. OK cheloha@ dlg@
2023-08-29Enable dwiic(4) and axppmic(4).Mark Kettenis
2023-08-29Add FDT support for dwiic(4)Mark Kettenis
2023-08-28Introduce reference counting for TCP syn cache entries.Alexander Bluhm
The syn_cache_reaper() is a hack to serialize timeouts. Unfortunately it has a race and panics sometimes with pool_do_get: syncache free list modified. Add a reference counter for timeout and list of syn cache entries. Currently list refcout is not strictly necessary due to exclusive netlock, but will be needed when we continue unlocking. Checking timeout_initialized() is not MP friendly, better do proper initialization during object allocation. Refcount in btrace helps to find leaks. bug reported and fix tested by Peter J. Philipp OK claudio@
2023-08-26clockintr: add clockqueue_intrclock_install()Scott Soule Cheloha
At some point, clockintr_cpu_init() is going to go away. However, there will still need to be a way to add an intrclock to a struct clockintr_queue. Add a new internal interface, clockqueue_intrclock_install(). If the given clockintr_queue does not yet have an intrclock installed, it copies the contents of the given intrclock to the clockintr_queue's private intrclock (cq_intrclock) and sets CQ_INTRCLOCK in cq_flags. I'm using the verb "install" here instead of "attach" because an intrclock is really just a vtable that we copy into the clockintr_queue. The original intrclock is in no way "bound" or "affixed" to a particular clockintr_queue: it's more akin to a stamp that can be reused to initialize any number of individual clockintr_queue structs.
2023-08-26word fix in comment; from crystal kolipeJason McIntyre
2023-08-26umb can use p2p_input as an if_input handler.David Gwynne
umb(4) is a hardware p2p driver, it just has ip coming in, so we can do the same thing we do for the address family and input processing as other p2p interfaces. the short packet check that umb_input does is already done by the ip stacks, so we're not losing anything. tested by gerhard@ mbuhl@ ok gerhard@
2023-08-26Adapt glxclk(4) for clockintrVisa Hankala
Make glxclk(4) functional again. The MFGPT provides the CPU core an external clock interrupt. This interrupt enables a later change that reduces energy usage when the system is idle. Also, the use of the external clock fixes timekeeping when the core clock frequency is adjusted.
2023-08-26fix iwx scan command such that the driver selects an SSID during bgscanStefan Sperling
The driver was asking firmware to send probe requests during background scans without having any SSID selected, which doesn't make sense. With that fixed I see faster background scans that no longer display every AP in range in debug logs, while relevant APs always show up. This is a possible fix for fatal firmware error 0x20002806 which is known to be related to bad scan commands and appeared with our upgrade to the -77 firmware API. Not yet confirmed because it is difficult to trigger this error on purpose. Apparently this change also repairs stability issues on AX210. I have never seen such issues first-hand and have no clue how they might relate to this change. One plausible theory is that our bogus bgscan command would trigger bad side-effects in firmware. Tested: ax200: jmc@, stsp@ ax210: Laurence Tratt, sf@
2023-08-24drm/amdgpu: keep irq count in amdgpu_irq_disable_allJonathan Gray
From Guchun Chen ab63f883bfdcfffde60f18918d6c850700eac0fb in linux-6.1.y/6.1.47 8ffd6f0442674f32c048ec8dffdbc5ec67829beb in mainline linux
2023-08-24drm/amd/pm: skip the RLC stop when S0i3 suspend for SMU v13.0.4/11Jonathan Gray
From Tim Huang 8abce61273c2815ea2ca096ecfb030c4b9e4e686 in linux-6.1.y/6.1.47 730d44e1fa306a20746ad4a85da550662aed9daa in mainline linux
2023-08-24drm/amd/display: Implement workaround for writing to OTG_PIXEL_RATE_DIV registerJonathan Gray
From Saaem Rizvi 4bdfe20d85b32274234bbcd705d5547fd70a4ea1 in linux-6.1.y/6.1.47 74fa4c81aadf418341f0d073c864ea7dca730a2e in mainline linux
2023-08-24drm/amd/display: disable RCO for DCN314Jonathan Gray
From Daniel Miess d4008eadfce5d7791bf078f5e51ba5b735fd8c09 in linux-6.1.y/6.1.47 85e41f1ed5d94a26fe4e57003c399936d291ed70 in mainline linux
2023-08-24drm/amdgpu/pm: fix throttle_status for other than MP1 11.0.7Jonathan Gray
From Umio Yasuno 7de99bf5bcd6d04b2202dd908782cc05edca0340 in linux-6.1.y/6.1.47 6a92761a86817ad15c9a562e2a809386237fae3e in mainline linux
2023-08-24drm/amdgpu: skip fence GFX interrupts disable/enable for S0ixJonathan Gray
From Tim Huang 9c8c2cf9f9bce4fa4c4c4e821bdaa4e15762e403 in linux-6.1.y/6.1.47 f1740b1ab2703b2a057da7cf33b03297e0381aa0 in mainline linux
2023-08-24drm/amd: flush any delayed gfxoff on suspend entryJonathan Gray
From Mario Limonciello e1cbd5637f37e7facfd38d19cda4a36a85780613 in linux-6.1.y/6.1.47 a7b7d9e8aee4f71b4c7151702fd74237b8cef989 in mainline linux