summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2019-11-02Move dead procs to the reaper queue immediately after context switch.Visa Hankala
This eliminates a forced context switch to the idle proc. In addition, sched_exit() no longer needs to sum proc runtime because mi_switch() will do it. OK mpi@ a while ago
2019-11-01Kill resched_proc() and instead call need_resched() when a thread isMartin Pieuchot
added to the runqueue of a CPU. This fix out-of-sync cases when the priority of a thread wasn't reflecting the runqueue it was sitting in leading to unnecessary context switch. ok visa@
2019-11-01Reduce BOOTRANDOM_MAX to 256. naddy pointed out there's no point havingTheo de Raadt
it larger than RC4STATE. A long discussion ensued. In conclusion all entropy inputs are either satisfactory enough, or just as shitty at 512.
2019-11-01Push the KERNEL_LOCK() down in uvm_map_inentry().Martin Pieuchot
The lookup in uvm_map_inentry_fix() is already serialized by the vm_map_lock and such lookup is already executed w/o the KERNEL_LOCK(). ok kettenis@, deraadt@
2019-11-01Keep local function definitions in C files.Martin Pieuchot
2019-11-01Document that p_{sp,pc}inentry are owned by the current thread.Martin Pieuchot
2019-11-01Fix an off-by-one in db_save_stack_trace().Martin Pieuchot
Save the PC after checking if it belongs to the kernel.
2019-11-01Flush the register windows before unwinding the stack.Martin Pieuchot
This makes db_save_stack_trace() and db_stack_dump() work. ok deraadt@, kettenis@
2019-10-31In 2013, when OpenBSD/armv7 was still rather early, improvements forPatrick Wildt
that platform have been trickling in bit by bit. One of those changes unfortunately introduced a regression in cache flushes. The check for the length in the cache-flush-loop was changed from the instruction bpl to bhi. This has the effect that it does not branch on zero anymore. Due to the length decrement at the beginning of the function, which was not removed, a length of (n * cacheline) + 1 means that the loop misses one run! This means it is possible that the last byte of a DMA transfer was incorrect, as one could see on network packets often enough. Remove that instruction, which makes it even more similar to the OpenBSD/arm64 code. ok deraadt@
2019-10-31Make background scans less frequent if we keep choosing the same AP.Stefan Sperling
This helps a bit in situations where a single AP is used and background scans are causing packet loss, as seen with Jesper Wellin's Broadcom-based AP and my Android phone in hotspot mode. This is not a proper fix but our background scan frequency against a single AP was much higher than needed anyway. Tested by jan, job, benno, Tracey Emery, Jesper Wallin
2019-10-30drm/amdgpu: Bail earlier when amdgpu.cik_/si_support is not set to 1Jonathan Gray
From Hans de Goede 4d5307c099afc9ce5fe89e8acf9b3c65104d0e08 in linux 4.19.y/4.19.81 984d7a929ad68b7be9990fc9c5cfa5d5c9fc7942 in mainline linux
2019-10-30drm/ttm: Restore ttm prefaultingJonathan Gray
From Thomas Hellstrom 11377c3e997eca9c9ff562fc4fc7a41a455bddf6 in linux 4.19.y/4.19.81 941f2f72dbbe0cf8c2d6e0b180a8021a0ec477fa in mainline linux
2019-10-30drm/edid: Add 6 bpc quirk for SDC panel in Lenovo G50Jonathan Gray
From Kai-Heng Feng 33af2a8ee304ee2deb618eebb534b52ce166467f in linux 4.19.y/4.19.81 11bcf5f78905b90baae8fb01e16650664ed0cb00 in mainline linux
2019-10-30Revert "drm/radeon: Fix EEH during kexec"Jonathan Gray
From Alex Deucher 0933b0db7fb239be01270b25bf73884870d8c1e6 in linux 4.19.y/4.19.81 8d13c187c42e110625d60094668a8f778c092879 in mainline linux
2019-10-29syncJoshua Stein
2019-10-29add an Intel 9260 wifi cardJoshua Stein
2019-10-29Consistently release the vnode lock while calling d_close of cloned andVisa Hankala
non-cloned devices. Combine spec_close() and spec_close_clone() to avoid code duplication. OK mpi@
2019-10-29Regen for Marvell 88SE9128 AHCI.Kurt Miller
2019-10-29Add Marvell 88SE9128 AHCI. okay kettenis@Kurt Miller
2019-10-29add the 802.1AE MACsec ethertypeDavid Gwynne
2019-10-29Use arc4 to bit-spread the 512-byte random buffer over the .openbsd.randomdataTheo de Raadt
section, which has grown a fair bit with the introduction of retguard. Mortimer discovered the repeated 512-byte sequence as retguard keys, and this resolves the issue. (Chacha does not fit on the media, so 1.5K early drop RC4 is hopefully sufficient in our KARL link universe) Version crank the bootblocks. sysupgrade -s will install new bootblocks. ok djm mortimer
2019-10-29add arc4 cipher to the bootblocksTheo de Raadt
ok djm mortimer
2019-10-28Copy in the user-supplied buffer in shmctl(2) before looking up theanton
shared memory segment. Otherwise, if copyin ends up sleeping it allows another thread to remove the same segment leading to a use-after-free. Feedback from kettenis@ and ok guenther@ Reported-by: syzbot+0de42c2e600a6dd3091d@syzkaller.appspotmail.com
2019-10-28Have iwm(4) configure the PCIe LTR.Stefan Sperling
Patch by Imre Vadasz. Cross-check and pcireg.h tweak by kettenis@ ok patrick@
2019-10-28Make iwm_stop_device() power down bus master DMA clocks on 7k devices only.Stefan Sperling
Patch by Imre Vadasz ok patrick@
2019-10-28Recognize IWM_DTS_MEASUREMENT_NOTIF_WIDE PHY_OP notification which willStefan Sperling
be generated by version 17 firmware. While at it, declare all known firmware command groups and all PHY_OPS subcomand ids. Patch by Imre Vadasz, with tweaks by me ok patrick@
2019-10-28Get rid of version 1 of iwm's time event firmware API.Stefan Sperling
All supported firmware versions support IWM_UCODE_TLV_FLAGS_TIME_EVENT_API_V2. Rename struct iwm_time_event_cmd_v2 to iwm_time_event_cmd, and remove helper functions for converting from V2 API structs to V1 versions. Patch by Imre Vadasz ok patrick@
2019-10-28Remove a couple of unneeded IWM_UCODE_TLV_FLAGS_* flags:Stefan Sperling
IWM_UCODE_TLV_FLAGS_PM_CMD_SUPPORT IWM_UCODE_TLV_FLAGS_NEWBT_COEX IWM_UCODE_TLV_FLAGS_BF_UPDATED IWM_UCODE_TLV_FLAGS_D3_CONTINUITY_API IWM_UCODE_TLV_FLAGS_STA_KEY_CMD IWM_UCODE_TLV_FLAGS_DEVICE_PS_CMD IWM_UCODE_TLV_FLAGS_SCHED_SCAN All supported firmware versions have these flags set. Patch by Imre Vadasz ok patrick@
2019-10-28Remove unneeded IWM_UCODE_TLV_FLAGS_RX_ENERGY_API flag.Stefan Sperling
All supported firmware versions have this feature flag set. Remove now unneeded iwm_calc_rssi() function. Patch by Imre Vadasz. ok patrick@
2019-10-28Do not set IWM_SF_CFG_DUMMY_NOTIF_OFF bit in iwm SF_CFG firmware command.Stefan Sperling
It is only required for devices connected via SDIO which we do not support. Patch by Imre Vadasz ok patrick@
2019-10-28Skip the 'update MCC' command if iwm 8k firmware supports LocationStefan Sperling
Aware Regulatory (LAR) mode and LAR is disabled according to NVM. Patch by Imre Vadasz. ok patrick@
2019-10-28Use 0x6c as permanent ID for IWM_PHY_DB_CMD; remove incorrect comment.Stefan Sperling
Patch by Imre Vadasz. Matches Linux commit 176aa60bf148b5af4209ac323cef941dee76e390 by Sara Sharon. ok patrick@
2019-10-28Remove unused DEFAULT_MAX_TX_POWER definition from if_iwmreg.h,Stefan Sperling
which had a value different from the IWL_DEFAULT_MAX_TX_POWER constant in Linux iwlwifi. Patch by Imre Vadasz. ok patrick@
2019-10-28The iwm_prepare_card_hw() call in iwm_attach() is only needed on 8k devices.Stefan Sperling
Patch by Imre Vadasz. ok patrick@
2019-10-28iwm: tweak post-alive NIC locking to more closely match how Linux does itStefan Sperling
ok patrick@
2019-10-28iwm: enlarge maximum NVM section size; required for newer firmwareStefan Sperling
ok patrick@
2019-10-28Add missing KERNEL_UNLOCK.Mark Kettenis
ok guenther@, mpi@
2019-10-28Better error handling for bwfm(4) connection attempts. When we failPatrick Wildt
to connect, e.g. due to a timeout, we will switch the state to SCAN. Unfortunately this skips clearing the active channel set, which means that on a scan on all bands only the nodes on the active channel set, which is defined by whatever node we tried to connect to, are allowed and all other APs are ignored. Fix this by properly calling begin_scan(). When we fail to connect and start a scan, make sure to let the chip know that we don't want to associate anymore. Another issue existed when we interrupt a scan, for instance by setting a new nwid or wpakey. In this case we didn't abort the scan and started a new scan while the old one as still active. This could lead to a SCAN -> SCAN transition loop. Remove the "set ssid" event, since this would be an event in addition to a failed auth/assoc event, which would make us try to handle failure twice. Discussed with and ok stsp@
2019-10-28Fix atomic_sub_long_nv() on mips64. The negation should useVisa Hankala
64-bit unsigned arithmetic.
2019-10-28merge version directly into codeTheo de Raadt
2019-10-27tweak the rx path to look more like the tx path.David Gwynne
it's a bit shorter, and a bit more correct wrt use of bus_dma. still a bit to go though.
2019-10-27Add i.MX5/6 support and enable this driver on armv7(4).Mark Kettenis
ok jsg@, patrick@
2019-10-27Add code to spin up secondary CPUs.Mark Kettenis
ok jsg@
2019-10-27Add simplefb(4).Mark Kettenis
2019-10-27fix the last commit.David Gwynne
if gen is toggled per packet, then it needs to be toggled before each packet, not before the loop. also, if 0 out the right offload. brad pointed out the if 0 bit.
2019-10-26put vlan tag offload back inDavid Gwynne
2019-10-26make vmx transmit (vmxnet3_start) mpsafe.David Gwynne
to make mpsafetey a bit easier to figure out i disabled checksum and vlan offload. i'll put them back in soon though.
2019-10-26avoid rxr races between rxfill from the interrupt and timeout pathsDavid Gwynne
vmx "hardware" seems to be able to use rx descriptors as soon as theyre filled in, which means filling the ring from a timeout can run conccurently with an isr that's pulling stuff off the ring. this is mostly a problem with the rxr accounting, so we serialise updates to the alive counter by running rxfill in a mutex. most of the investigation was done by claudio@ and mathieu@ an earlier version of this diff was tested hard by mathieu@ and was ok@ claudio
2019-10-26clock_getres(2): actually return the resolution of the given clockcheloha
Currently we return (1000000000 / hz) from clock_getres(2) as the resolution for every clock. This is often untrue. For CPUTIME clocks, if we have a separate statclock interrupt the resolution is (1000000000 / stathz). Otherwise it is as we currently claim: (1000000000 / hz). For the REALTIME/MONOTONIC/UPTIME/BOOTTIME clocks the resolution is that of the active timecounter. During tc_init() we can compute the precision of a timecounter by examining its tc_counter_mask and store it for lookup later in a new member, tc_precision. The resolution of a clock backed by a timecounter "tc" is then tc.tc_precision * (2^64 / tc.tc_frequency) fractional seconds. While here we can clean up sys_clock_getres() a bit. Standards input from guenther@. Lots of input, feedback from kettenis@. ok kettenis@
2019-10-26Correct some ASM in a commentPhilip Guenther