summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2021-01-07Fix typo in comment.Mark Kettenis
2021-01-07Extend IP_ADD_MEMBERSHIP to also support struct ip_mreqn.Claudio Jeker
struct ip_mreqn allows to use the interface index to select the interface for multicast packets which makes it possible to use this with unnumbered interfaces. OK dlg@ robert@
2021-01-07Adjust comment about klist_invalidate()Visa Hankala
2021-01-06Let a process open a video(4) device multiple timesJeremie Courreges-Anglas
The previous behavior was conservative but a bit too restrictive. The V4L API lets several processes open a single video device, with exclusive access to certain methods when a process starts streaming. This is not trivial to implement. This small change fixes webcam usage with Firefox and BigBlueButton. Diff simplified + ok mglocker@, thanks!
2021-01-06Mark a layer 2 address as expired by setting the length to 0 when theFlorian Obser
associated IPv6 NDP entry is invalidated. Otherwise we end up with an INCOMPLETE entry that can't be updated to STALE and REACHABLE by neighbor advertisements and thus interrupting communication. This is the same as arpinvalidate() for IPv4. Guidance bluhm & claudio, fix proposed by claudio OK claudio
2021-01-06Add dt(4) TRACEPOINTs for pool_get() and pool_put(), this is simmilar to theClaudio Jeker
ones added to malloc() and free(). Pass the struct pool pointer as argv1 since it is currently not possible to pass the pool name to btrace. OK mpi@
2021-01-06Allocate pages for the F00F bug fix using km_alloc(9) instead ofJonathan Matthew
uvm_km_zalloc(9). tested on qemu pretending to be a 586 ok bluhm@
2021-01-05pppoeintr() is no morekn
2021-01-04the tx doorbell is next to the rx doorbell, not on top of it.David Gwynne
2021-01-04Process pppoe(4) packets directly, do not queue through netiskn
Less scheduling, lock contention and queues. Previously, if_netisr() handled the net lock around those calls, now if_input_process() does it before calling ether_input(), so no need to add or remove NET_*LOCK() anywhere. OK mvs claudio
2021-01-04- fix use after free, when packet gets dropped.Alexandr Nedvedicky
patch submitted by Ralf Horstmann from ackstorm.de OK dlg@
2021-01-04Remove kernel lock from pppoe(4) input pathkn
"struct pppoe_softc" documents no member being protected by the kernel lock (alone); further review of the code paths starting from pppoeintr() shows no sleeping points which must be avoided in the softnet thread. Everything is fine as is to run without the big lock, so remove it. Tests sthen Feedback mpi mvs OK mvs claudio
2021-01-04Minor refactoring in pf(4). Note that struct pfsync_state is noAlexander Bluhm
longer memcopied but assigned. Alignment should not be an issue as it is __packed. Part of a larger diff from dlg@; OK dlg@ sashan@
2021-01-04Remove unused `pipex_iface_context' struct.mvs
ok ok@ yasuoka@
2021-01-04use bus_dmamap_sync around updates to the doorbells.David Gwynne
ok jmatthew@
2021-01-03Allocate address space for reposting vga devices using km_alloc(9) ratherJonathan Matthew
than uvm_km_valloc(9). ok kettenis@
2021-01-02Use native display resolution 1368x768 with Lynloong all-in-one computers.Visa Hankala
From Yifei ZHAN on tech@
2021-01-02Make kernel recognize Lynloong LM9002/9003 and LM9013.Visa Hankala
LM9002/9003 is very similar to LM9001 since it works just fine on LM9002 with the codebase for LM9001. LM9013 on the other hand is fairly different from LM9001 and is more like Yeeloong 8089 when it comes to hardware design. More work might be needed to make it fully functional. From Yifei ZHAN on tech@
2021-01-02Don't call if_deactivate() in switch_clone_destroy(). Followingmvs
if_detach() will do this. ok kn@
2021-01-02Don't call if_deactivate() in bridge_clone_destroy(). Followingmvs
if_detach() will do this. ok kn@
2021-01-02Remove PIPEX{S,G}MODE ioctl(2) commands. This time they are pretty dummymvs
and were kept only for backward compatibility reasons. ok mpi@ yasuoka@
2021-01-02optimise bpf_catchpacket and bpf_wakeup.David Gwynne
bpf_catchpacket had a chunk to deal with reader timeouts, but that has largely been moved to bpfread. the vestigal code that was left still tried to wake up a reader when a buffer got full, but there already is a chunk of code that wakes up readers when the buffer gets full. bpf_wakeup now checks for readers before calling wakeup directly, rather than pushing the wakeup to a task and calling it unconditionally. the task_add is now only done when the bpfdesc actually has something that needs it. ok visa@
2021-01-02Allocate address space for struct cpu_info using km_alloc(9) instead ofJonathan Matthew
uvm_km_valloc(9). Tested on a T5120. ok mpi@
2021-01-02pool(9): remove tickscheloha
Change the pool(9) timeouts to use the system uptime instead of ticks. - Change the timeouts from variables to macros so we can use SEC_TO_NSEC(). This means these timeouts are no longer patchable via ddb(4). dlg@ does not think this will be a problem, as the timeout intervals have not changed in years. - Use low-res time to keep things fast. Add a local copy of getnsecuptime() to subr_pool.c to keep the diff small. We will need to move getnsecuptime() into kern_tc.c and document it later if we ever have other users elsewhere in the kernel. - Rename ph_tick -> ph_timestamp and pr_cache_tick -> pr_cache_timestamp. Prompted by tedu@ some time ago, but the effort stalled (may have been my fault). Input from kettenis@ and dlg@. Special thanks to mpi@ for help with struct shuffling. This change does not increase the size of struct pool_page_header or struct pool. ok dlg@ mpi@
2021-01-02bpf(4): remove tickscheloha
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@
2021-01-02nfs: don't sleep on lboltcheloha
We can simulate the current behavior without lbolt by sleeping for 1 second on the &nowake channel. ok mpi@
2021-01-02uvm: uvm_fault_lower(): don't sleep on lboltcheloha
We can simulate the current behavior without lbolt by sleeping for 1 second on the &nowake channel. ok mpi@
2021-01-01Add kstat to ogx(4).Visa Hankala
2021-01-01Remove useless redundant call of ttyopen().jan
Also remove dead DIALOUT macro. ok mpi@
2021-01-01copyright++;Jonathan Gray
2020-12-31Keep polling if a temperature sensor reading fails. This is neededMark Kettenis
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@
2020-12-31Add trace points for malloc(9) and free(9). This makes them traceableClaudio Jeker
via dt(4) and btrace(8). OK mpi@ millert@
2020-12-31Enable IPv4 and TCP/UDP checksum offload on transmission.Visa Hankala
2020-12-31don't oversleep when waiting on fencesJonathan Gray
original diff from and ok cheloha@
2020-12-31remove pv includes which were missed in rev 1.70Jonathan Gray
2020-12-30Set klist lock for pipes.Visa Hankala
OK anton@, mpi@
2020-12-30Add singly-linked tail queue macros from FreeBSD.Todd C. Miller
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@
2020-12-30Fix pppoe_dispatch_disc_pkt definition to be in accordance with style(9)mvs
ok claudio@ kn@
2020-12-30Convert the `off' argument of pppoe_dispatch_disc_pkt function tomvs
local variable. This argument was always passed as 0. ok kn@
2020-12-30Enter power-saving mode on POWER9 (ISA v3)gkoehler
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@
2020-12-29Handle pinctrl.Mark Kettenis
2020-12-29Add more PWM pin descriptions.Mark Kettenis
2020-12-28Analog to the the kern.audio.record sysctl parameter for audio(4)Marcus Glocker
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@
2020-12-28Remove unused start routinekn
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
2020-12-28Sync with i386 by asserting that IPL values should be at least IPL_NONE.Martin Pieuchot
2020-12-28Initialize pmap_kernel()'s mutexes.Martin Pieuchot
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@
2020-12-28Use per-CPU counters for fault and stats counters reached in uvm_fault().Martin Pieuchot
ok kettenis@, dlg@
2020-12-28Add support for the PCIe controller found on Amlogic G12A/G12B/SM1 SoCs.Mark Kettenis
ok patrick@
2020-12-28regenMark Kettenis
2020-12-28Add Synopsys vendor and their DesignWare PCIe bridge.Mark Kettenis