Age | Commit message (Collapse) | Author |
|
used by the hypervisor interface. This allows the driver to sync
up with the firmware's Rx channel state (DOWN/UP/RESET) upon the
first interrupt, and repair inconsistent Rx channel head/tail queue
state if necessary.
Unwedges another interrupt storm observed when starting ldomd on my
T5220 after a reboot. In case the firmware's Rx queue head and tail
are initially not equal, the normal interrupt handling path will not
operate as expected due to the interrupt storm, and we never told the
firmware to shut up.
Other cbus(4) drivers might benefit from a similar fix, but we're
too close to release for experiments, so I'm just fixing vldcp(4).
ok kettenis@ deraadt@
|
|
needs (looking at you sgi, but others required this before). This is for
the circumstances we need pagesize known at compile time, not getpagesize()
runtime. Use it for malloc storage sizes, for shm, and to set pthread stack
default sizes. The stack sizes were a mess, and pushing them towards
page-aligned is healthy move (which will also be needed by the coming
stack register checker)
ok guenther kettenis, discussion with stefan
|
|
ok dlg@
|
|
ok kettenis@, visa@
|
|
`mtx_owner' becomes the first field of 'struct mutex' on i386/amd64/arm64.
ok visa@
|
|
introduced in version 3.0 of the Interrupt APIs group. This makes it possible
boot OpenBSD on SPARC T7/M7 hardware (although there still may be issues with
the onboard mpii(4) controller).
|
|
ok visa@, kettenis@, deraadt@
|
|
proper C99 compilers.
ok deraadt@, visa@, mpi@
|
|
This reduces code duplication and makes it easier to instrument
lock primitives.
The MI mplock uses the ticket lock code that has been in use
on amd64, i386 and sparc64. These are the architectures that now
switch to the MI code.
The lock_machdep.c files are unhooked from the build but not
removed yet, in case something goes wrong.
OK mpi@, kettenis@
|
|
pthread_exit from libpthread to libc, along with low-level bits to
support them. Major bump to both libc and libpthread.
Requested by libressl team. Ports testing by naddy@
ok kettenis@
|
|
ok kettenis@, dlg@
|
|
|
|
correct prologue if compiled with -DPROF.
ok deraadt@
|
|
ok visa@, kettenis@
|
|
prepare the terrain for MI locks.
ok kettenis@
|
|
specifically, dont rely on magic in ctlreg to implement membars. moving
that to atomic.h would add a lot of pollution to the namespace, so
move to passing the membar options to a single __membar macro.
this tweaks everything that was using the ctlreg backend to either use
an appropriate membar_foo(), or to use __membar() in the MD code.
ok kettenis@
|
|
this is so drivers can advertise that they can handle 64 dma addresses
to the platform. it may choose to handle dmamaps differently based
on this flag.
tweaks and ok tom@
ok kettenis@
|
|
|
|
declarations since clang doesn't register the %-prefixed ones.
|
|
Reduces the diffs with other architectures.
|
|
in struct mdproc. With that, all archs have those and the __HAVE_MD_TCB
macro can be unifdef'ed as always defined.
ok kettenis@ visa@ jsing@
|
|
|
|
leaving out the size, so that
ELFNAME2(exec,makecmds)
becomes
exec_elf_makecmds
instead of
exec_elf{32,64}_makecmds
and then delete the ELFNAME2() and ELFNAMEEND() macros.
Move the prototypes for functions local to exec_elf.c to there from
exec_elf.h.
Simplify the SMALL_KERNEL conditionals around the ELF coredump code.
Change exec_conf.c to use the size-generic names and macros
Remove exec_elf{32,64}.c and just build exec_elf.c; delete the
_KERN_DO_ELF and _KERN_DO_ELF64 #defines.
ok jca@, encouragement from deraadt@ and tom@
|
|
OK jca@, deraadt@
|
|
as it's simpler to understand and generates better code.
ok kettenis@
|
|
|
|
on a guess how much memory a typical machine has. If the value is
too high, users may run out of kernel memory. Then we will have
to adjust this again.
OK claudio@ deraadt@
|
|
this lets us define curcpu(), cpu_number(), etc as derefs of this
variable rather than having to write asm to copy it into another
register for the same derefs.
this provides shorter inlined code that wastes less registers.
ok kettenis@ who notes we use this these on other archs already
|
|
ok kettenis@
|
|
this also moves us toward having an MI splraise().
sparc64 (and sparc) are different to the other archs because they
have macros that build templates. each spl uses that macro to create
an instance of an inline function specific to that spl call.
this moves it to having a single splraise inline that the spl api is
defined with. eg, #define splfoo() _splraise(IPL_FOO).
ok kettenis@
|
|
theyre unused.
ok kettenis@
|
|
ok millert
|
|
inside the sigcontext. sigreturn(2) checks syscall entry was from the
exact PC addr in the (per-process ASLR) sigtramp, verifies the cookie,
and clears it to prevent sigcontext reuse.
not yet tested on landisk, sparc, *88k, socppc.
ok kettenis
|
|
engine that might attempt to read beyond the end of the buffer that was
programmed. The IOMMU catches this "DMA overrun" and throws an unrecoverable
error at us, at which point we have no choice but to panic. To avoid this
implement a BUS_DMA_OVERRUN flag that maps an additional scratch page at the
end of the vdma address range. DMA requests will spill over into this page,
which just returns zeroes.
Thanks to matthieu@ for giving me access to a machine with the problem.
ok deraadt@, beck@
|
|
actually use this in em(4) and xhci(4), but I'm not committing those yet
because we almost certainly need to save and restore the MSI-X registers
during suspend/resume. However, this allows mpi@ to play with multiple-vector
support in networking hardware.
Requested by mpi@
ok mlarkin@, mikeb@
|
|
|
|
ok mpi@
|
|
The goal is to include it in the list of functions that must not be
instrumented. All ddb(8) functions should be in this list and have
their names start with 'db_'.
ok visa@, deraadt@
|
|
a.out world.
ok deraadt@ kettenis@
|
|
LABELOFFSET and MAXPARTITIONS. Easier on the eye when scanning
through all these files. No functional change.
|
|
Also use it wherever we configure the hardware to direct interrupts to the
right CPU.
|
|
comments
ok millert@
|
|
handler that was running has finished.
ok miod@, guenther@
|
|
symbols in ASM
ok deraadt@ mpi@
|
|
ok deraadt@
|
|
|
|
"shared reference pointers".
srp allows concurrent access to a data structure by multiple cpus
while avoiding interlocking cpu opcodes. it manages its own reference
counts and the garbage collection of those data structure to avoid
use after frees.
internally srp is a twisted version of hazard pointers, which are
a relative of RCU.
jmatthew wrote the bulk of a hazard pointer implementation and
changed bpf to use it to allow mpsafe access to bpfilters. however,
at s2k15 we were trying to apply it to other data structures but
the memory overhead of every hazard pointer would have blown out
significantly in several uses cases. a bulk of our time at s2k15
was spent reworking hazard pointers into srp.
this diff adds the srp api and adds the necessary metadata to struct
cpuinfo on our MP architectures. srp on uniprocessor platforms has
alternate code that is optimised because it knows there'll be no
concurrent access to data by multiple cpus.
srp is made available to the system via param.h, so it should be
available everywhere in the kernel.
the docs likely need improvement cos im too close to the implementation.
ok mpi@
|
|
delete coredump_trad(), uvm_coredump(), cpu_coredump(), struct md_coredump,
and various #includes that are superfluous.
This leaves compat_linux processes without a coredump callback. If that
ability is desired, someone should update it to use coredump_elf32() and
verify the results...
ok kettenis@
|
|
had a proper stdint.h. No ports fallout. OK guenther@ miod@
|
|
pv lists with a mutex. Some minor code adjustments to prevent holding locks
too long. This should make pmap_enter(9), pmap_remove(9) and
pmap_page_protect(9) safe to use without holding the kernel lock.
|