summaryrefslogtreecommitdiffstats
path: root/sys (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* bpf(4): remove tickscheloha2021-01-022-25/+34
| | | | | | | | | | | | | Change bd_rtout to a uint64_t of nanoseconds. Update the code in bpfioctl() and bpfread() accordingly. Add a local copy of nsecuptime() to make the diff smaller. This will need to move to kern_tc.c if/when we have another user elsewhere in the kernel. Prompted by mpi@. With input from dlg@. ok dlg@ mpi@ visa@
* nfs: don't sleep on lboltcheloha2021-01-022-6/+7
| | | | | | | We can simulate the current behavior without lbolt by sleeping for 1 second on the &nowake channel. ok mpi@
* uvm: uvm_fault_lower(): don't sleep on lboltcheloha2021-01-021-2/+3
| | | | | | | We can simulate the current behavior without lbolt by sleeping for 1 second on the &nowake channel. ok mpi@
* Add kstat to ogx(4).visa2021-01-012-9/+404
|
* Remove useless redundant call of ttyopen().jan2021-01-013-15/+3
| | | | | | Also remove dead DIALOUT macro. ok mpi@
* copyright++;jsg2021-01-011-2/+2
|
* Keep polling if a temperature sensor reading fails. This is neededkettenis2020-12-311-3/+3
| | | | | | | | on Amlogic SoCs where amltemp(4) doesn't fully attach before the first polling timeout runs. This would stop the polling which means there was no thermal management on these platforms. ok patrick@
* Add trace points for malloc(9) and free(9). This makes them traceableclaudio2020-12-312-2/+12
| | | | | via dt(4) and btrace(8). OK mpi@ millert@
* Enable IPv4 and TCP/UDP checksum offload on transmission.visa2020-12-312-11/+53
|
* don't oversleep when waiting on fencesjsg2020-12-311-15/+17
| | | | original diff from and ok cheloha@
* remove pv includes which were missed in rev 1.70jsg2020-12-311-6/+1
|
* Set klist lock for pipes.visa2020-12-301-5/+15
| | | | OK anton@, mpi@
* Add singly-linked tail queue macros from FreeBSD.millert2020-12-301-1/+98
| | | | | | These are essentially equivalent to the simple queue macros from NetBSD but predate them and are more widely available on other systems. OK mpi@ denis@
* Fix pppoe_dispatch_disc_pkt definition to be in accordance with style(9)mvs2020-12-301-2/+3
| | | | ok claudio@ kn@
* Convert the `off' argument of pppoe_dispatch_disc_pkt function tomvs2020-12-301-5/+6
| | | | | | local variable. This argument was always passed as 0. ok kn@
* Enter power-saving mode on POWER9 (ISA v3)gkoehler2020-12-3011-20/+283
| | | | | | | | | | | | | | | | | | | When opal(4) attaches, look in the device tree for a psscr value. In cpu_idle_cycle(), use this psscr value and the stop instruction to wait for the next interrupt. In mp kernels, cpu_unidle() now sends an interrupt. In "sysctl hw.sensors", the power and temperature sensors from opalsens(4) may show lower values. The cpu may exit stop at the system reset vector after losing user registers. If so, restore some registers. For now, ignore deeper stop states that would lose hypervisor registers. Our mp kernel uses only the first hardware thread of each core. Take the extra threads from the firmware and stop them forever; this may switch the core from SMT4 to single-thread mode and increase performance. partly by kettenis@, ok kettenis@
* Handle pinctrl.kettenis2020-12-291-1/+4
|
* Add more PWM pin descriptions.kettenis2020-12-291-1/+32
|
* Analog to the the kern.audio.record sysctl parameter for audio(4)mglocker2020-12-283-4/+60
| | | | | | | | | | | devices, introduce kern.video.record for video(4) devices. By default kern.video.record will be set to zero, blanking all data delivered by device drivers which attach to video(4). The idea was initially proposed by Laurence Tratt <laurie AT tratt DOT net>. ok mpi@
* Remove unused start routinekn2020-12-281-16/+1
| | | | | | | | | enc(4) does not use the ifqueue API at all; IPsec packets are directly transformed in the IP input/output routines. enc_start() is never called (by design) so remove it for clarity. OK mpi
* Sync with i386 by asserting that IPL values should be at least IPL_NONE.mpi2020-12-282-2/+5
|
* Initialize pmap_kernel()'s mutexes.mpi2020-12-282-2/+6
| | | | | | | | | | Poison the IPL value of `pm_mtx' since it isn't supposed to be used and add an assert to make sure splraise() isn't called with a poisoned value. Fix a missing initialization found by WITNESS and reported by gnezdo@. ok millert@
* Use per-CPU counters for fault and stats counters reached in uvm_fault().mpi2020-12-286-57/+149
| | | | ok kettenis@, dlg@
* Add support for the PCIe controller found on Amlogic G12A/G12B/SM1 SoCs.kettenis2020-12-281-11/+119
| | | | ok patrick@
* regenkettenis2020-12-282-2/+14
|
* Add Synopsys vendor and their DesignWare PCIe bridge.kettenis2020-12-281-1/+5
|
* acpi_map_address() cannot be wrapped by SMALL_KERNEL anymore, asderaadt2020-12-271-3/+3
| | | | it is used by acpihpet.c
* Enable acpihpet on install media, because otherwise clock initializationderaadt2020-12-274-8/+8
| | | | | is just too different from GENERIC or GENERIC.MP pointed out by jsg
* Remove debug printf.kettenis2020-12-271-2/+1
|
* Add PCIe support.kettenis2020-12-271-48/+68
|
* Add PCIe power domain.kettenis2020-12-271-1/+14
|
* Make NET_LOCK() assertions conditional to DIAGNOSTICvisa2020-12-271-1/+8
| | | | | | This saves about 2.5 KiB off amd64's RAMDISK after gzip compression. OK deraadt@, mpi@, cheloha@
* have mcx_process_txeof return the number of slots it processed.dlg2020-12-271-7/+8
| | | | | | | it used a pointer in an argument to communicate that back to the caller, while being a void functon. this seems more natural and brings it in line with how the rx completion function returns free slots to its caller too.
* do a bus space barrier after arming the eq.dlg2020-12-271-2/+2
| | | | ok jmatthew@
* disable timestamping a little bit harder to avoid divide by 0.dlg2020-12-271-1/+5
| | | | | hrvoje popovski reports the current code faults on some boxes. i'm working on it, but the code isn't being used right now.
* shuffle filling the rx ring so the sw prod is updated before the hw.dlg2020-12-271-24/+19
| | | | ok jmatthew@
* bpf(4): bpf_d struct: replace bd_rdStart member with bd_nreaders membercheloha2020-12-262-35/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bd_rdStart is strange. It nominally represents the start of a read(2) on a given bpf(4) descriptor, but there are several problems with it: 1. If there are multiple readers, the bd_rdStart is not set by subsequent readers, so their timeout is screwed up. The read timeout should really be tracked on a per-thread basis in bpfread(). 2. We set bd_rdStart for poll(2), select(2), and kevent(2), even though that makes no sense. We should not be setting bd_rdStart in bpfpoll() or bpfkqfilter(). 3. bd_rdStart is buggy. If ticks is 0 when the read starts then bpf_catchpacket() won't wake up the reader. This is a problem inherent to the design of bd_rdStart: it serves as both a boolean and a scalar value, even though 0 is a valid value in the scalar range. So let's replace it with a better struct member. "bd_nreaders" is a count of threads sleeping in bpfread(). It is incremented before a thread goes to sleep in bpfread() and decremented when a thread wakes up. If bd_nreaders is greater than zero when we reach bpf_catchpacket() and fbuf is non-NULL we wake up all readers. The read timeout, if any, is now tracked locally by the thread in bpfread(). Unlike bd_rdStart, bpfpoll() and bpfkqfilter() don't touch bd_nreaders. Prompted by mpi@. Basic idea from dlg@. Lots of input from dlg@. Tested by dlg@ with tcpdump(8) (blocking read) and flow-collector (https://github.com/eait-itig/flow-collector, non-blocking read). ok dlg@
* Simplify parameters of pselregister().visa2020-12-261-8/+5
| | | | OK mpi@
* reuse the calculated vector as the argument to pci_intr_map_msix.dlg2020-12-261-2/+2
| | | | doing the maths again feels error prone.
* add bus_dmamap_sync ops around the eq.dlg2020-12-261-6/+27
| | | | ok jmatthew@
* add some bus_dmamap_syncs around the rq.dlg2020-12-261-2/+16
| | | | ok jmatthew@
* sprinkle some bus_dmamap_syncs around the cq handling.dlg2020-12-261-1/+14
| | | | ok jmatthew@
* sprinkle some bus_dmamap_syncs around the sq.dlg2020-12-261-2/+17
| | | | ok jmatthew@
* better manage the lifetime of the dmamem used for various rings.dlg2020-12-261-36/+65
| | | | ok jmatthew@
* sdmmc(4): sdmmc_io_function_enable(): don't sleep on lboltcheloha2020-12-261-2/+2
| | | | | | | | Just sleep for 1 second on the nowake channel instead. With input from kettenis@, mpi@, and claudio@. ok kettenis@
* expose the mcx timer as a timecounter.dlg2020-12-251-1/+30
| | | | | | | | | | this is mostly to help me better understand where i accumulate error when trying to sync the chip to the kernel clocks. ie, if im using mcx as the kernel clock source and my attempts to sync to it still produce errors, then my code is very wrong instead of slightly wrong. it's also fun and a tiny amount of code.
* match on Gemini Lake I2Cjsg2020-12-251-1/+9
| | | | | Makes touchpad work on Joel Carnat's Teclast F7 Plus laptop. Patch from James Hastings.
* Refactor klist insertion and removalvisa2020-12-2535-122/+144
| | | | | | | | | | | | Rename klist_{insert,remove}() to klist_{insert,remove}_locked(). These functions assume that the caller has locked the klist. The current state of locking remains intact because the kernel lock is still used with all klists. Add new functions klist_insert() and klist_remove() that lock the klist internally. This allows some code simplification. OK mpi@
* Small smr_grace_wait() optimizationvisa2020-12-252-7/+28
| | | | | | | | | | | | Make the SMR thread maintain an explicit system-wide grace period and make CPUs observe the current grace period when crossing a quiescent state. This lets the SMR thread avoid a forced context switch for CPUs that have already entered the latest grace period. This change provides a small improvement in smr_grace_wait()'s performance in terms of context switching. OK mpi@, anton@
* Do proper accounting of zero length TDs. Currently a specific numbermglocker2020-12-242-2/+6
| | | | | | | | | | | | of zero length TDs can cause our free TRBs to run out, causing xhci(4) to return USBD_NOMEM to the USB stack. The issue was reported by Jonathon Fletcher <jonathon.fletcher () gmail ! com> -- Thanks! Reviewed/suggestions by patrick@. ok mpi@