summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2022-01-20drm/amd/display: explicitly set is_dsc_supported to false before useJonathan Gray
From Mario Limonciello ce258c74f8d95e81ce65f53775fcdcbc8ca090da in linux 5.15.y/5.15.16 63ad5371cd1e379519395c49a4b6a652c36c98e5 in mainline linux
2022-01-20dt: Add frame skip parameters for octeonVisa Hankala
OK mpi@
2022-01-20xa_pool is protected by xa_lock mtx so drop pool ipl to IPL_NONEJonathan Gray
2022-01-20initial support for drm sync files, fences associated with fileJonathan Gray
descriptors for explicit fencing tested with libdrm's amdgpu_test syncobj timeline tests and vkcube on intel broadwell with Mesa 21.3 (which hangs without sync file support after the 'anv: Assume syncobj support' Mesa commit) feedback and ok visa@
2022-01-19Only invoke the underlying cpuid instruction if the real CPU might supportPhilip Guenther
the leaf (<=cpuid_level) and always pass the subleaf. Delete the CPUID_LEAF() calls made superfluous by always passing the subleaf. ok mlarkin@
2022-01-19On SDHC version 3.0 controllers the divisor doesn't have to be a powerPatrick Wildt
of two, but can be a multiple of two. Make use of this to achieve card clock frequencies closer to the target frequency. ok visa@
2022-01-19Grab the kernel lock in uvm_wxcheck() when aborting the processKlemens Nanni
kern.wxabort=1 logs and kills programs after W^X violations. At least sigexit() -> coredump() as well as the non-atomic increment of ps_wxcounter require protection, so grab the big lock for the entire block. This is part of the effort to unlock mmap(2)'s MAP_ANON case. Feedback mvs claudio kettenis deraadt OK kettenis
2022-01-19Remove temporary verbose logging.Anton Lindqvist
2022-01-19go back to rev 1.5 of irq_work.h with tasks on system_wqJonathan Gray
this may further help people with recent gen intel machines
2022-01-19no longer need to disable -Wtautological-compare andJonathan Gray
-Wunneeded-internal-declaration when building drm with clang
2022-01-19move some unused functions under ifdefJonathan Gray
2022-01-19Comment out an incorrect lock assertion.Martin Pieuchot
The swap code path in uvm_aio_aiodone() is not holding the corresponding page lock and shouldn't as long as anons are locked inside uvm_page_unbusy() to handle the PG_RELEASED case. Reported by Ralf Horstmann on bugs@
2022-01-19__always_inline needs the inline keyword as well as the attributeJonathan Gray
2022-01-18Properly handle read-only clusters in m_pullup(9).Alexander Bluhm
If the first mbuf of a chain in m_pullup is a cluster, check if the cluster is read-only (shared or an external buffer). If so, don't touch it and create a new mbuf for the pullup data. This restores original 4.4BSD m_pullup, that not only returned contiguous mbuf data of the specified length, but also converted read-only clusters into writeable memory. The latter feature was lost during some refactoring. from ehrhardt@; tested by weerd@; OK stsp@ bluhm@ claudio@
2022-01-18Improve how quirks are handled on sdhc(4)-compatible drivers. So farPatrick Wildt
we have passed a modified version of the contents in the capabilities register if we wanted to override what sdhc(4) would otherwise read. Unfortunately there's a second capabilities register that we did not yet take into consideration, which is why to disable DDR50 support we created a quirk flag in the softc. The sdhc(4) ACPI nodes have a way to mask and set bits in both of the capabilities register, which is a flexible approach to solving that issue and using that for our sdhc(4) drivers even improves readability. ok kettenis@
2022-01-18return EIO, not ENXIO, when the interface underneath ifq_deq_sleep dies.David Gwynne
this is consistent with other drivers when they report their underlying device being detached.
2022-01-18a comment about bridges shouldnt list switch(4), but can have veb(4).David Gwynne
2022-01-18Add cdsdhc(4), a driver for the Cadence SD/SDIO/eMMC host controller.Visa Hankala
Tested on a PolarFire SoC.
2022-01-18plic: Fix cpuid handlingVisa Hankala
Make `cpu' signed so that the possible return value -1 from plic_get_cpuid() gets handled correctly in the (cpu < 0) condition. This prevents plic_attach() from updating sc_contexts[] out of bounds. When plic_get_cpuid() returns -1, ignore the entry and continue processing. The error is not fatal. It is normal that secondary CPUs are not found when running a non-MULTIPROCESSOR kernel on a multiprocessor machine. OK kettenis@
2022-01-17sfcc: Fix accidental spinningVisa Hankala
Adjust end condition so that sfcc_cache_wbinv_range() would not spin when (pa + len) is not cache line aligned. While here, fix parameter types of sfcc_cache_wbinv_range() as suggested by kettenis@. OK kettenis@ (earlier version), miod@
2022-01-17Call uvm_pglistfree(9) instead of uvm_pmr_freepageq().Martin Pieuchot
There is no functionnal change as the former is just a wrapper around the latter. However upper layer of UVM do not need to mess with the internals of the page allocator. This will also help when a page cache will be introduced to reduce contention on the global mutex serializing acess to pmemrange's data. ok kettenis@, kn@, tb@
2022-01-17change irq work from interrupt context back to process context likeJonathan Gray
our 5.10 drm used (via a task) by changing from timeout_set() to timeout_set_proc() irq work is supposed to be in interrupt context but some path used on inteldrm with gen 9 graphics sleeps. Reported by Agnosto Dvonik on kaby lake and jcs@ and aja@ on comet lake. For Agnosto Dvonik this occured when running firefox or mpv, for jcs@ when playing a video in firefox, for aja@ after 5 min of running gnome. aja@ has run gnome for many hours with this change without problem.
2022-01-17unstub dma_fence_chain_find_seqno() for non zero seqnoJonathan Gray
2022-01-17Allow more memory ranges in hibernateMike Larkin
The previous limit of VM_PHYSSEG_MAX ranges (16) was proving too small for newer machines. This diff reorganizes the hibernate signature block to allow for 22 ranges by removing the kernel version comparison and replacing it with a SHA of several unique kernel features (the version string and several addresses of functions not inside the same .o). Reported by claudio@, who also helped fix some issues in the diff. Input from deraadt@ as well. Tested by myself and claudio on a variety of machines. Only compile tested on i386 as I have no more S4-capable i386 hardware anymore. ok claudio@
2022-01-16remove "for all AArch64 platforms" from commentJonathan Gray
removed from other archs in 2020 before riscv64 was imported
2022-01-16drm/i915: Avoid bitwise vs logical OR warning in snb_wm_latency_quirk()Jonathan Gray
From Nathan Chancellor 48d56b00c35266b00ec92aaf0db5b71ce1f27702 in linux 5.15.y/5.15.15 2e70570656adfe1c5d9a29940faa348d5f132199 in mainline linux
2022-01-16Remove trailing whitespace in a few places. No code change.Mike Larkin
2022-01-16modernise pcn_start with m_defrag and the "new" ifq pattern.David Gwynne
aside from getting rid of a use of the ifq_deq_begin/commit/rollback stuff, it simplifies the code a lot. im also sick of having the diff in my tree.
2022-01-16activate/notify waiting kq kevents from bpf_wakeup directly.David Gwynne
this builds on the mpsafe kq/kevent work visa has been doing. normally kevents are notified by calling selwakeup, but selwakeup needs the KERNEL_LOCK. because bpf runs from all sorts of contexts that may or may not have the kernel lock, the call to selwakeup is deferred to the systq which already has the kernel lock. while this avoids spinning in bpf for the kernel lock, it still adds latency between when the buffer is ready for a program and when that program gets notified about it. now that bpf kevents are mpsafe and bpf_wakeup is already holding the necessary locks, we can avoid that latency. bpf_wakeup now checks if there are waiting kevents and notifies them immediately. if there are no other things to wake up, bpf_wakeup avoids the task_add (and associated reference counting) to defer the selwakeup call. selwakeup can still try to notify waiting kevents, so this uses the hint passed to knote() to differentiate between the notification from bpf_wakeup and selwakeup and returns early from the latter. ok visa@
2022-01-15Don't reset the controller on each transaction. Remove unecessary pollingMark Kettenis
loop and adjust another polling loop. This makes accessing the cs42l83 audio codec work. Probably removing the reset is enough to fix this but the other changes bring us in line with the Linux driver which had some decent RE done to it recently. ok patrick@
2022-01-15bring back spelling fix from rev 1.138 lost in rev 1.140Jonathan Gray
pointed out by Brad
2022-01-14We don't have 64-bit atomics on powerpc, but we don't really need them.Mark Kettenis
So don't provide atomic64_cmpxchg() on powerpc and on other architectures make its implementation similar to atomic64_xchg(). This makes the tree build again on macppc. suggested by & ok jsg@
2022-01-14update drm to linux 5.15.14Jonathan Gray
new hardware support includes Intel ehl/Elkhart Lake (embedded) jsl/Jasper Lake (atom) rkl/Rocket Lake (desktop) AMD van gogh APU (gfx1033) yellow carp / rembrandt APU (gfx1035?) Ryzen 6000 APU navy flounder / navi 22 (gfx1031) RX 6700, RX 6700 XT, RX 6700M, RX 6800M, RX 6850M XT dimgrey cavefish / navi 23 (gfx1032) Pro W6600, Pro W6600M, RX 6600, RX 6600 XT, RX 6600M, RX 6600S, RX 6650M, RX 6650M XT, RX 6700S, RX 6800S beige goby / navi 24 (gfx1034) RX 6500 XT, RX 6400, RX 6500M, RX 6300M Thanks to the OpenBSD Foundation for sponsoring this work niklas@ for helping with ttm and amdgpu and patrick@ for adapting rockchip drm.
2022-01-13Make bpf event filter MP-safeVisa Hankala
Use bd_mtx to serialize bpf knote handling. This allows calling the event filter without the kernel lock. OK mpi@
2022-01-13Return an error if bpfilter_lookup() fails in bpfkqfilter()Visa Hankala
The lookup should not fail because the kernel lock should prevent simultaneous detaching on the vnode layer. However, most other device kqfilter routines check the lookup's outcome anyway, which is maybe a bit more forgiving. OK mpi@
2022-01-13Implement powerdown. This involves writing a magic bit somewhere in theMark Kettenis
address space of the SPMI PMU to prevent the machine from immediately starting up again. The implementaton makes aplpmu(4) provide powerdownfn(), which sets the magic bit and then chains into cpuresetfn(). It also makes aplsmc(4) provide cpuresetfn() to reset the machine via the SMC. Resetting via the watchdog works as well (and will powerdown the machine if the magic bit is set) but letting the SMC handle things might do some other required steps. ok patrick@
2022-01-12fixup previous refactoringmbuhl
OK stsp@ (without assuming any responsibility for NFS)
2022-01-12Extend the verbose logging.Anton Lindqvist
2022-01-12toggle hw.power based on the ACDI SMR key if availableRobert Nagy
ok kettenis@
2022-01-12add three new SMC sensors to get information about the power supply statusRobert Nagy
and remaining time to battery full and empty and feed these values to apm(4) ok kettenis@
2022-01-12Fix array index. Spotted by robert@Mark Kettenis
2022-01-12Make acpi_getpropint() return uint64_t, as ACPI integers are in fact thatPatrick Wildt
wide and some _DSD properties depend on it. ok kettenis@
2022-01-12Remove ieee80211_find_node_for_beacon().Stefan Sperling
The original purpose of ieee80211_find_node_for_beacon() was to avoid storing duplicate nodes with the same source MAC address in a hash table. Later on, our node table data structure was changed from a hash table to an RB tree. The RB tree can only store a single node per MAC address. However, find_node_for_beacon() was kept regardless, now documented to serve a different purpose. Its new purpose is to tell apart different nodes which happen to use the same MAC address and hence cannot both be stored in the RB tree. The idea is to filter such duplicate nodes out during a scan. But colliding nodes are told apart by RSSI and channel, and either may change over time. So this does not really prevent duplicate MAC addresses from causing issues. The code which decides which node is "better" can erroneously match an AP against itself, in case the AP uses a hidden SSID. This caused workarounds for hidden SSID to pile up over time. Just a bit further down, the code looks up the same node again and performs all of the intended node state updates. Simply skipping the ieee80211_find_node_for_beacon() check makes such state updates work. ok tobhe@
2022-01-12maxumum -> maximumJonathan Gray
2022-01-12Remove -target riscv64-unknown-openbsd from CMACHFLAGS.Kevin Lo
ok kettenis@ deraadt@
2022-01-11spellingJonathan Gray
2022-01-11spellingJonathan Gray
2022-01-11Jasper Lake eMMC needs the same 0V quirk as Apollo Lake and Gemini LakeJonathan Gray
fixes accessing eMMC on Acer Swift 1 SF114-34 problem reported and fix tested by Sven Wolf
2022-01-11Make sure 'out' is initialized to 0 before adding flags.Tobias Heider
ok dv@ mlarkin@
2022-01-11Bump KVA space up to 512MB (and a bit).Mark Kettenis
ok phessler@, deraadt@, miod@