summaryrefslogtreecommitdiffstats
path: root/sys (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* regenjcs2019-06-072-4/+9
|
* add Keyspan USA-19HSjcs2019-06-071-1/+2
|
* Introduce acpi_getsta() and use it to eliminate some duplicated code.kettenis2019-06-072-24/+28
| | | | ok patrick@
* make struct mcx_cq_entry a bit closer to realitydlg2019-06-071-8/+9
| | | | | | this puts the timestamp, rx drops, and hash fields in the right place. ok jmatthew@
* have mcx_process_rx return the number of slots it made freedlg2019-06-071-8/+10
| | | | | | | | | | this is instead of passing a pointer to the counter. while here use byte swapping loads and stores, which is mostly a nop cos i dont think we have an LE arch with swapping memory operations. ok jmatthew@
* enable mcx(4) on arm64, found in Packet's g2.large.arm servers.jmatthew2019-06-072-2/+4
| | | | tested by and ok patrick@
* Stop promoting the TSC as a high quality timecounter on MULTIPROCESSORkettenis2019-06-061-1/+5
| | | | | | | | | systems. There is no guarantee that the TSCs on different cores are synchronized when the OpenBSD kernel boots and we don't have code to synchronize them ourselves. This affects both AMD and Intel CPUs and even cores on the same socket can by out of sync. ok deraadt@, sthen@
* Restore missing newline.visa2019-06-061-1/+3
|
* ConnectX-5 cards work toojmatthew2019-06-061-1/+3
|
* Set up the interrupt handler before creating the event queue.jmatthew2019-06-061-20/+21
| | | | | | Apparently the boot rom on some cards leaves an interrupt vector set up, which will be run on completion of the first command after we set up the event queue, causing kernel crashes. chris@ reported this a while ago.
* Remove workaround and return EINVAL when userland sends routing messagesclaudio2019-06-051-10/+3
| | | | | with bad address flags. OK bluhm@ sthen@
* We know which flow table entries are actually in use, so we can justjmatthew2019-06-051-11/+13
| | | | | | delete those rather than blindly deleting everything, which also means we don't need to check against a specific syndrome code to ignore errors we get deleting entries that aren't there.
* this can support 64BIT DVA for iodlg2019-06-051-2/+3
|
* if_netisr(): trade NET_LOCK() for NET_RLOCK()sashan2019-06-041-5/+5
| | | | OK mpi@
* pfsync_sendout() requires PF_LOCK()sashan2019-06-041-1/+7
| | | | OK mpi@
* Add missing NULL check for the protocol control block (pcb) pointer inanton2019-06-042-1/+7
| | | | | | | | | | mrt{6,}_ioctl. Calling shutdown(2) on the socket prior to the ioctl command can cause it to be NULL. ok bluhm@ claudio@ Reported-by: syzbot+bdc489ecb509995a21ed@syzkaller.appspotmail.com Reported-by: syzbot+156405fdea9f2ab15d40@syzkaller.appspotmail.com
* Let SP kernel work with WITNESS. The necessary instrumentation wasvisa2019-06-041-1/+5
| | | | | | | missing from the SP variant of mtx_enter() and mtx_enter_try(). mtx_leave() was correct already. Prompted by and OK patrick@
* Remove the unused pvh_attrs attribute from struct vm_page_md.patrick2019-06-041-4/+2
| | | | ok kettenis@
* Bump MAXCPUS to 32 so that we can use all cores on the Ampere eMAG.patrick2019-06-041-2/+2
| | | | ok kettenis@
* Move a function used as a callback out of a header so there will only bejsg2019-06-042-61/+63
| | | | one function with a single address.
* use htolemXX and lemtohXX instead of htoleXX and letohXXdlg2019-06-041-25/+26
| | | | | | this makes the generated code a lot shorter on sparc64, and has no effect on little endian archs. this has been in my tree for well over a year without issue.
* tx and rx descriptors work fine with 64bit dvadlg2019-06-041-4/+6
| | | | ok jmatthew@
* Implement mcx_media_change(). This disables the port, sets the media type tojmatthew2019-06-041-65/+158
| | | | | | | | | | the requested type (or all available types, if none specified), then re-enables it to start negotiation. While here, only set up the available media types during attach, rather than on every mcx_media_status() call, as they don't reflect the type of module or cable present so they won't change over time. ok dlg@
* sort struct declarationsanton2019-06-031-5/+5
|
* Prevent corruption of the pckbc command queue. If multiple synchronousanton2019-06-031-9/+27
| | | | | | | | | | | | | | commands are in flight and all corresponding threads are sleeping waiting for a response, the first command to timeout will clear the command queue. The remaining threads once awake will then try to remove a dequeued command from the queue, leading to corruption. Instead, remove commands from the queue before waking up the sleeping thread. A quirk is still needed to handle the case where tsleep() returns successfully during suspend. ok mpi@ visa@ Reported-by: syzbot+fe74fc50c630bfa26302@syzkaller.appspotmail.com
* Map the raw bus space operations to the regular ones.patrick2019-06-031-1/+15
| | | | ok kettenis@
* Fix priorities of LIPs to match the other changes made in rev 1.17.kettenis2019-06-031-2/+2
| | | | | | Makes MSI/MSI-X actually work reliably on machines with agintc(4). ok patrick@
* Implement rx filtering using the flow table. Now we have three flow groups,jmatthew2019-06-031-72/+263
| | | | | | | | | | | one that will match any packet, used in promisc mode; one that matches on the low bit of the first byte of the destination mac address, used to receive all multicast packets; and one that matches on the whole destination mac address, used to receive unicast, broadcast and specific multicast addresses. As we add multicast addresses, we create flow entries to match them, but if we run out, we create an all-multicast flow entry. ok dlg@
* - Remove a redundant check within alc_mii_readreg_813x().kevlo2019-06-031-5/+1
| | | | | | | | The PHY address is already checked within alc_miibus_readreg(). - Remove redundant call to alc_stop_queue(). First thing alc_stop_mac() does is call alc_stop_queue(). From Brad
* Switch from bintime_add() et al. to bintimeadd(9).cheloha2019-06-033-62/+55
| | | | | | | | | | | | | | | Basically just make all the bintime routines look and behave more like the timeradd(3) macros. Switch to three-argument forms for structure math, introduce and use bintimecmp(9), and rename the structure conversion routines to resemble e.g. TIMEVAL_TO_TIMESPEC(3). Document all of this in a new bintimeadd.9 page. Code input from mpi@, manpage input from schwarze@. code ok mpi@, docs ok schwarze@, docs probably still ok jmc@
* Change pci_intr_handle_t into a struct and replace duplicated code thatkettenis2019-06-032-169/+38
| | | | | | | | implements mapping of MSI and MSI-X interrupts with new generic functions. Fixes a use-after-free in sone PCI device drivers that call pci_intr_string(9) after pci_intr_establish(9). ok deraadt@
* Change pci_intr_handle_t into a struct and replace duplicated code thatkettenis2019-06-024-183/+102
| | | | | | | | implements mapping of MSI and MSI-X interrupts with new generic functions. Fixes a use-after-free in sone PCI device drivers that call pci_intr_string(9) after pci_intr_establish(9). ok deraadt@
* Repair state and flag bitmasks to match RFC, from Mitchell Kromederaadt2019-06-021-3/+3
| | | | ok claudio
* Move initialization of limit0 into a dedicated function. This newvisa2019-06-023-24/+28
| | | | | | | | | function is also a proper place for setting up the plimit pool. While here, raise the IPL of the plimit pool to IPL_MPFLOOR, needed in upcoming MP work. OK claudio@
* Refactor the MAP_STACK feature, and introduce another similar variation:deraadt2019-06-0113-225/+160
| | | | | | | | | Lookup the address that a syscall instruction is executed from, and kill the process if that page is writeable. This brings an aspect of W^X behaviour to W|X mappings (in JITs not yet adapted to W^X). The goal is to remove simple attack methods and force use of ret2libc or other more complicated means. ok kettenis stefan visa
* Bump VM_MAX_KERNEL_ADDRESS so that we have about 16G of KVA. Sincepatrick2019-06-011-2/+2
| | | | | | | | | we need KVA to keep track of all the RAM pages, machines with a lot of memory easily exhaust our KVA space. We need about 1G of KVA per 32G of memory, so with 16G of KVA we can maintain close to 512G of memory. ok kettenis@
* Revert to using the SCHED_LOCK() to protect time accounting.mpi2019-06-0114-101/+54
| | | | | | | | | It currently creates a lock ordering problem because SCHED_LOCK() is taken by hardclock(). That means the "priorities" of a thread should be moved out of the SCHED_LOCK() first in order to make progress. Reported-by: syzbot+8e4863b3dde88eb706dc@syzkaller.appspotmail.com via anton@ as well as by kettenis@
* On machines with large amounts of physical memory we fail to initialize uvmkettenis2019-06-012-13/+66
| | | | | | | | | | because we don't have enough kernel memory available in the early bootstrap phase to allocate the vm_page structures. Fix this by making uvm_growkernel() work before uvm is initialized like we do on other architectures that don't use a direct map and explicitly call it after enumerating the available physical memory with an estimate of how much KVA we need to initialize uvm. ok patrick@
* Fix warnings when building zlib with ZLIB_CONST definedjca2019-06-013-8/+8
| | | | | Probably not very useful (given the lack of feedback) but feels more correct. Kernel part tested with option ZLIB_CONST.
* Recognise Cortex-A65.jsg2019-06-011-1/+4
| | | | ok kettenis@
* drm: Wake up next in drm_read() chain if we are forced to putback the eventjsg2019-06-011-0/+1
| | | | | | From Chris Wilson 00734a9e7329acc48e575f697ee4118998c1dac0 in linux 4.19.y/4.19.47 60b801999c48b6c1dd04e653a38e2e613664264e in mainline linux
* drm/amd/display: Set stream->mode_changed when connectors changejsg2019-05-311-2/+1
| | | | | | From Nicholas Kazlauskas 62e79f4c6bc05c32be43e2532fe12c082429af27 in linux 4.19.y/4.19.47 b9952f93cd2cf5fca82b06a8179c0f5f7b769e83 in mainline linux
* drm/amd/display: Fix Divide by 0 in memory calculationsjsg2019-05-311-5/+15
| | | | | | From Murton Liu fc5293ab6c48710eed5df3b40e808e3a3c560e2d in linux 4.19.y/4.19.47 59979bf8be1784ebfc44215031c6c88ca22ae65d in mainline linux
* drm/amd/display: fix releasing planes when exiting odmjsg2019-05-311-2/+4
| | | | | | From Dmytro Laktyushkin 70611b1b81c4ec8ce99d3c00107e89697ec1f495 in linux 4.19.y/4.19.47 bc2193992b00488f5734613ac95b78ef2d2803ab in mainline linux
* drm/amdgpu: fix old fence check in amdgpu_fence_emitjsg2019-05-311-7/+17
| | | | | | From Christian Koenig d8a36f8418034bacef0b5b73c0822f41646d77ba in linux 4.19.y/4.19.47 3d2aca8c8620346abdba96c6300d2c0b90a1d0cc in mainline linux
* Add MSI-X support.kettenis2019-05-311-28/+39
| | | | ok patrick@
* Use a per-process mutex to protect time accounting instead of SCHED_LOCK().mpi2019-05-3114-54/+101
| | | | | | | Note that hardclock(9) still increments p_{u,s,i}ticks without holding a lock. ok visa@, cheloha@
* Deimos is Cortex-A77.kettenis2019-05-311-4/+4
|
* Revert my "Repair the 'ifconfig mode' command" commit.stsp2019-05-312-57/+26
| | | | | The "recursion in end_scan()" problem is apparently still present in the committed version of the diff (reported by krw@).
* remove duplicate page tablejsg2019-05-312-37/+0
| | | | a holdover from when the allocation wasn't done in ttm