| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
ok kettenis@, dlg@
|
|
|
|
| |
ok patrick@
|
| |
|
| |
|
|
|
|
| |
it is used by acpihpet.c
|
|
|
|
|
| |
is just too different from GENERIC or GENERIC.MP
pointed out by jsg
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This saves about 2.5 KiB off amd64's RAMDISK after gzip compression.
OK deraadt@, mpi@, cheloha@
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
ok jmatthew@
|
|
|
|
|
| |
hrvoje popovski reports the current code faults on some boxes. i'm
working on it, but the code isn't being used right now.
|
|
|
|
| |
ok jmatthew@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
OK mpi@
|
|
|
|
| |
doing the maths again feels error prone.
|
|
|
|
| |
ok jmatthew@
|
|
|
|
| |
ok jmatthew@
|
|
|
|
| |
ok jmatthew@
|
|
|
|
| |
ok jmatthew@
|
|
|
|
| |
ok jmatthew@
|
|
|
|
|
|
|
|
| |
Just sleep for 1 second on the nowake channel instead.
With input from kettenis@, mpi@, and claudio@.
ok kettenis@
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Makes touchpad work on Joel Carnat's Teclast F7 Plus laptop.
Patch from James Hastings.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
ok kettenis@
|
|
|
|
| |
ok patrick@
|
| |
|
| |
|
|
|
|
|
| |
This moves the pmap closer to MP-safety. A similar change has already
been made on some other architectures.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'nominal core crystal clock frequency' from cpuid 0x15 is 0 on
Intel model 0xa5 (CML-H CML-S62 CML-S102) and 0xa6 (CML-U62). So act as
if 24 MHz was reported like we do on other Skylake/Kaby Lake variants.
Comet Lake processors with model 0x8e (CML-U42 CML-Y42) use the same model
number used by Kaby Lake and many other parts which was already handled.
While we could approximate the crystal frequency with 'Processor Base
Frequency' from cpuid 0x16 eax like FreeBSD and Linux do, kettenis@ couldn't
get ntpd to sync a clock on a Skylake machine with:
CPUID 0x15: eax=2, ebx=134, khz=0
CPUID 0x16: eax=1600, ebx=1600, ecx=100, edx=0
with reported crystal frequency changing from 24000 kHz to 23880 kHz
(cpuid 0x16 eax * 1000 * cpuid 0x15 eax / cpuid 0x15 ebx) and
TSC frequency changing from 1608000000 to 1599960000.
Cannon Lake, Ice Lake, and Tiger Lake are known to return non-zero
frequency in cpuid 0x15 so hopefully no other model ids have to be added.
James Cook reported hangs on bsd.rd with i7-10710U 06-a6-00 (CML-U62)
(which does not have acpihpet) but not with bsd.mp (which does) and has
confirmed that both approaches fixed the problem.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It would be convenient if there were a channel a thread could sleep on
to indicate they do not want any wakeup(9) broadcasts. The easiest way
to do this is to add an "int nowake" to kern_synch.c and extern it in
sys/systm.h. You use it like this:
#include <sys/systm.h>
tsleep_nsec(&nowait, ...);
There is now no need to handroll a local dead channel, e.g.
int chan;
tsleep_nsec(&chan, ...);
which expands the stack. Local dead channels will be replaced with
&nowake in later patches.
One possible problem with this "one global channel" approach is sleep
queue congestion. If you have lots of threads sleeping on &nowake you
might slow down a wakeup(9) on a different channel that hashes into
the same queue. Unsure how much of problem this actually is, if at all.
NetBSD and FreeBSD have a "pause" interface in the kernel that chooses
a suitable channel automatically. To keep things simple and avoid
adding a new interface we will start with this global channel.
Discussed with mpi@, claudio@, kettenis@, and deraadt@.
Basically designed by kettenis@, who vetoed my other proposals.
Bugs caught by deraadt@, tb@, and patrick@.
|
|
|
|
| |
Tested by otto@ and myself.
|
|
|
|
|
|
|
|
| |
Make it obvious where the thread is blocked. "pause" is ambiguous.
Tweaked by kettenis@.
Probably ok kettenis@.
|
|
|
|
|
|
|
| |
We only see 8 characters of wmesg in e.g. top(1), so shorten the
string to fit.
Indirectly prompted by kettenis@.
|
| |
|
|
|
|
|
|
|
|
| |
Invoke dead_filtops' f_event callback in klist_invalidate() to ensure
that filt_dead() modifies every invalidated knote. If a knote has
EV_ONESHOT set in its event flags, kqueue_scan() will not call f_event.
OK mpi@
|
|
|
|
|
|
|
| |
This fixes a regression where kqueue_scan() may incorrectly return
EWOULDBLOCK after a timeout.
OK mpi@
|
|
|
|
|
|
|
|
|
| |
ignores the presence "enable-active-high" property and relies on the
encode polarity of the GPIO in the flags in the device tree instead.
This might not be the case for older device trees; such device trees
should be fixed.
ok patrick@
|
| |
|
|
|
|
| |
this makes it more consistent with other drivers.
|
|
|
|
| |
ok kettenis@
|
| |
|
|
|
|
|
|
| |
packet. IPv6 still had the old EHOSTUNREACH code. Use the same
errno for dropped IPv6 packets as in IPv4.
OK kn@ phessler@ claudio@ florian@ sashan@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The given set of fds are converted to equivalent kevents using EV_SET(2)
and passed to the scanning internals of kevent(2): kqueue_scan().
ktrace(1) will now output the converted kevents on top of the usuals set
bits to be able to find possible error in the convertion.
This switch implies that select(2) and pselect(2) will now query the
underlying kqfilters instead of the *_poll() routines.
Based on similar work done on DragonFlyBSD with inputs from from visa@,
millert@, anton@, cheloha@, thanks!
ok visa@
|
|
|
|
|
|
| |
a chance to attach. Needed for future support of PCIe on Amlogic SoCs.
ok patrick@
|