summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2019-08-12Remlve command mutex. It is unnecessary since commands are alreadyMark Kettenis
serialized by the use of a taskq and it prevents sendmsg/endmsg from being able to sleep. This hurts when implementing SSIF since some i2c controllers sleep while waiting for transactions on the i2c bus to complete. ok jmatthew@, deraadt@
2019-08-12regenanton
2019-08-12Unlock lseek(2) since the file offset is MP-safe by now. Callinganton
VOP_GETATTR() must still be serialized using the kernel lock since the underlying file system implementation is not MP-safe. no objection from deraadt@ and ok mpi@ visa@
2019-08-11Add clock support to sxirtc(4); needed by newer Linux DTs.Mark Kettenis
ok patrick@
2019-08-11Add battery sensors for the AXP803. A somewhat recent Linux DT is neededMark Kettenis
to expose these sensors. Heavily based on a diff from Krystian Lewandowski.
2019-08-11Add sxisyscon(4) a driver for the system controller found on variousMark Kettenis
Allwinner SoCs. This is basically a stripped down syscon(4) and is needed because the Linux device trees dropped the "syscon" compatible. ok patrick@
2019-08-11The "phy-names" property has been dropped from the Linux device trees soMark Kettenis
make initialization of the PHYs work without it. Simply initialize all the PHYs; there should only be one anyway. ok patrick@
2019-08-11Fix an issue where output gets stuck when a machine is under load. AlsoMark Kettenis
make sure Tx interrupts are counted. ok deraadt@
2019-08-10udcf(4): tvtohz(9)+timeout_add(9) -> timeout_add_msec(9); ok kettenis@cheloha
2019-08-10gpiodcf(4): tvtohz(9)+timeout_add(9) -> timeout_add_msec(9)cheloha
"looks fine" kettenis@, ok deraadt@
2019-08-10Make sure fdt_get_reg() looks beyond its parent to establish the correctMark Kettenis
#address-cells and #size-cells for the bus it sits on. This makes sure the glass console works since the framebuffer shows up as a child of /chosen which typically doesn't have these properties. This makes us look at the root node instead. ok patrick@
2019-08-10Fix pixel formats. Turns out the order in the device tree description isMark Kettenis
exactly the opposite of the order in the enum used by UEFI. Makes console output come out white-on-blue instead of white-on-red. ok patrick@
2019-08-10really crank to 6.6-betaChristian Weisgerber
2019-08-10move to 6.6-betaTheo de Raadt
2019-08-09Add TSC synchronization for multiprocessor machines.Paul Irofti
CPU0 is the reference clock and all others are skewed. During CPU initialization the clocks synchronize by keeping a registry of each CPU clock skewness and adapting the TSC read routine accordingly. This commit also re-enables TSC as the default time source. Future work includes MSR-based synchronization via IA32_TSC_ADJUST and perhaps adding a task that is executed periodically to keep the clocks in sync in case they drift apart. Inspired from NetBSD. Tested by many and thoroughly reviewed by kettenis@, thank you! OK kettenis@, deraadt@
2019-08-09don't #define DEBUG, breaks building kernel with option DEBUGJonathan Gray
reported by 'mujo' on bugs@
2019-08-09match radeon/atom.c rev 1.4 and #undef DEBUG before DEBUG macroJonathan Gray
2019-08-08Support WPA2 CCMP encryption/decryption in hardware with iwm(4).Stefan Sperling
We offload crypto operations for unicast data frames only. Based on an initial diff from procter@ Tested in snaps for almost a week. ok procter@ deraadt@
2019-08-08softraid(4): tsleep(9) -> tsleep_nsec(9); ok kn@cheloha
2019-08-08wskbd, wsmouse(4): tsleep(9) -> tsleep_nsec(9); ok mpi@ kn@cheloha
2019-08-07Handle VF resets. When the PF changes VF settings, the VF will be reset,Jonathan Matthew
which means the driver has to set everything up again from scratch. When we detect a reset (identified by an interrupt with ICR 0xdeadbeef), schedule a task that sets up the admin queue, establishes communication with the PF, and configures the rx/tx queues again. The interface is taken down during the reset process.
2019-08-07Process admin queue responses in the interrupt handler, rather thanJonathan Matthew
deferring to a task, so we can run sequences of admin commands using tasks. The only part of this that can't be done in interrupt context is allocating new admin response buffers, so make that the responsibility of the admin command issuer.
2019-08-07recognize the Realtek ALC285Joshua Stein
2019-08-07The pathname in unveil(2) allocated 1024 bytes on the stack duringAlexander Bluhm
the system call. Better use namei pool like sys___realpath() does. OK semarie@ deraadt@
2019-08-07Mitigate CVE-2019-1125: block speculation past conditional jump to mis-skipPhilip Guenther
or mis-take swapgs in interrupt path and in trap/fault/exception path. The latter is improved to have no conditionals around this when Meltdown mitigation is in effect. Codepatch out the fences based on the description of CPU bugs in the (well written) Linux commit message. feedback from kettenis@ ok deraadt@
2019-08-07Add codepatch_jmp(), like codepath_call() but inserting a jmp instead of a call.Philip Guenther
tweaked based on feedback from kettenis@ ok deraadt@
2019-08-07avoid large MAXPATHLEN object on the stack in coredump(), by allocatingTheo de Raadt
it from the pool. ok bluhm visa
2019-08-07Add support for integrated USB cameras with two functions, asPatrick Wildt
seen on a Lenovo X395 which combines normal webcam functionality with another IR camera, by parsing the USB interface association descriptors. This fixes the symptom of uvideo(4) complaining about too many headers and not providing any functionality at all. ok jan@
2019-08-07Add support for the KSMedia 8-bit IR format, a greyscale format,Patrick Wildt
as seen on the IR camera of my Lenovo X395. ok jan@
2019-08-06When we needed the kernel lock for local IP packet delivery, mpi@Alexander Bluhm
introduced a queue to grab the lock for multiple packets. Now we have only netlock for both IP and protocol input. So the queue is not necessary anymore. It just switches CPU and decreases performance. So remove the inet and inet6 ip queue for local packets. To get TCP running on loopback, we have to queue once between TCP input and output of the two sockets. So use the loopback queue in looutput() unconditionally. OK visa@
2019-08-06Fix white spaces.Alexander Bluhm
2019-08-06The vio(4) interface did not recover from mbuf shortage. The logicAlexander Bluhm
to start the rx tick did not work since we use if_rxr_get(). An easy fix is to start the rx timeout every second unconditionally. OK dlg@
2019-08-06Block interrupts while (attempting to) send an IPI on sun4v just like weMark Kettenis
do on sun4u. Appears to fix random kernel hangs (often involving fpusave_proc()) on the new ports cluster machines. ok deraadt@
2019-08-06remove some debug cruft i should have removed before the last commit.David Gwynne
2019-08-06have a go at using msi interrupts.David Gwynne
vmx has an interesting feature where config in the hypervisor can say what type of interrupts the guest should configure for the nic, with the options of auto, msix, msi, and intx. depending on this, the driver should try to map the type specified and fall back from there. also interesting is that my guest gets "auto" from the hypervisor, which i fall through to msi with, but an msi interrupt cannot be mapped. i cannot see any msi interrupts in this guest actually. there must be something funky at the platform level that we don't like, and that prevents msi from being mapped. if msi does get mapped, we should be able to avoid a register read on every interrupt. that should probably provide a noticable performance improvement if we can ever take advantage of it.
2019-08-06i replaced a misplaced tab with g, not a space. make this work again.David Gwynne
2019-08-06if the rx ring gets empty and can't be filled, retry in the futureDavid Gwynne
there have been several reports that vmx gets stuck sometimes and only comes good after it's taken down and up again. hopefully this fixes that issue.
2019-08-06use ifiq_input so we can call if_rxr_livelocked to apply backpressureDavid Gwynne
2019-08-06Resolve some minor nits in diskmapioctl():anton
* Favor ENOTTY for unknown ioctl commands * Return the actual error from copyinstr and copyoutstr, removes the need to initialize the local error variable * Do not use parens around return expressions consistently ok visa@
2019-08-06Read the fifo depths from the appropriate configuration register andMark Kettenis
update the values if they are non-zero and smaller than the current hardcoded depths. Fixes dwiic(4) on Ampere eMAG. ok patrick@, jcs@
2019-08-05Kernel realpath(3) and unveil(2) did not work correctly if the rootAlexander Bluhm
directory was written as "//". If there is no non-slash character in the path name, use the spacial case for root. found by gmake regression tests; OK naddy@ benno@
2019-08-05Kernel realpath(3) had the same vnode leakage bug like unveil(2).Alexander Bluhm
If parent and lookup vnode are equal, namei(9) locks them once but reference counts twice. from Moritz Buhl
2019-08-05Remove the unused function parameter rootvnode from unveil_add_vnode().Alexander Bluhm
2019-08-05try to be more compliant with the spec by implementing marker responses.David Gwynne
i hope, i didn't test this that hard.
2019-08-05Favor vn_close() in the error path of diskmapioctl() since side-effectsanton
caused by calling vn_open() with write permissions must be reverted. Otherwise, the vfs subsystem could panic while releasing the last vnode reference if the writecount is still positive. ok visa@ Reported-by: syzbot+4724df09d9ab0fdca28a@syzkaller.appspotmail.com Reported-by: syzbot+a430606fd528645559db@syzkaller.appspotmail.com
2019-08-05Allow concurrent reads of the f_offset field of struct file byanton
serializing both read/write operations using the existing file mutex. The vnode lock still grants exclusive write access to the offset; the mutex is only used to make the actual write atomic and prevent any concurrent reader from observing intermediate values. ok mpi@ visa@
2019-08-05sis(4) calls mii_phy_reset(); add explicit dependency on mii_phy in configStefan Sperling
from grunk@
2019-08-05run pf against ip packets coming in and out of the two ports.David Gwynne
the idea and a good chunk of the implementation is copied from bridge(4). note that IP packets inside "service delimited" traffic, ie, vlan, svlan, or bpe encapsulated traffic, are not considered IP and will therefore not be given to pf to look at. if you want to filter that you'll need to configure vlan/svlan/bpe interfaces to get past their headers, and then configure them with their own tpmrs. hopefully the interface input handlers were established in the right order.
2019-08-05pay some lip service to TPMR compliance according to 802.1Q-2018David Gwynne
the spec says we should filter packets destined to a list of ethernet addresses. im currently interpreting "filter" as meaning dropping, which this diff does. however, one of the addresses to filter is the one lacp uses by default and not a lot of lacp implementations (read switches) support the configuration of a different address. i still need lacp to go over tpmr, and because i can't change the address, this diff also has a way to configure tpmr to still allow the packets through.
2019-08-04Fix a typo I noticed reviewing the smbios code cleanup diff.kmos
(stirng -> string) ok kettenis@ who pointed out I should fix the new arm64 smbiosvar.h too