Age | Commit message (Collapse) | Author |
|
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.
|
|
each arch used to have to provide an rw_cas operation, but now we
have the rwlock code build its own version. on smp machines it uses
atomic_cas_ulong. on uniproc machines it avoids interlocked
instructions by using straight loads and stores. this is safe because
rwlocks are only used from process context and processes are currently
not preemptible in our kernel. so alpha/ppc/etc might get a benefit.
ok miod@ kettenis@ deraadt@
|
|
not necessary, but consistent with other platforms. ok deraadt
|
|
the stack region handling in uvm.
|
|
in all MD apmvar.h.
|
|
ok kettenis
|
|
|
|
processor in order to give other strands a chance to run. Use it in
__mp_lock_spin_hook() to avoid wasting CPU cycles if we're waiting for
the kernel or scheduler locks. This is instruction is patched in, just like
we already do for the sleep instruction on SPARC64 VI processors. We look
at the hwcap-list property of the cpu nodes in the machine description to
decide whether the pause instruction is available.
|
|
This can be used to pass boot parameters to the kernel which can't be passed
safely via the Open Firmware interface, such as softraid volume IDs and keys.
The kernel already reads the arguments if available but ofwboot won't provide
them until further changes are committed there.
With support from deraadt, kettenis and matthew.
ok deraadt@
|
|
|
|
while in the manpage add volatile where the code has it too.
ok miod@ guenther@
|
|
be for both cases.
OK ketennis@
|
|
|
|
|
|
|
|
for jmatthew@
|
|
void **. the latter is really hard to cast for, and not what what
solaris does.
ok kettenis@
|
|
* you can #include <sys/endian.h> instead of <machine/endian.h>,
and ditto <endian.h> (fixes code that pulls in <sys/endian.h> first)
* those will always export the symbols that POSIX specified for
<endian.h>, including the new {be,le}{16,32,64}toh() set. c.f.
http://austingroupbugs.net/view.php?id=162
if __BSD_VISIBLE then you also get the symbols that our <machine/endian.h>
currently exports (ntohs, NTOHS, dlg's bemtoh*, etc)
* when doing POSIX compiles (not __BSD_VISIBLE), then <netinet/in.h> and
<arpa/inet.h> will *stop* exporting the extra symbols like BYTE_ORDER
and betoh*
ok deraadt@
|
|
The new CPU_BUSY_CYCLE() may be put in a busy loop body so that CPU can reduce
power consumption, as Linux's cpu_relax() and FreeBSD's cpu_spinwait(). To
start minimally, use PAUSE on i386/amd64 and empty on others. The name is
chosen following the existing cpu_idle_*() functions. Naming and API may be
polished later.
OK kettenis@
|
|
ok dlg@ mpi@ deraadt@
|
|
the extra restrictions that __volatile provides on the __asm statements.
|
|
|
|
native size, so eliminate the #defines.
ok miod@
|
|
ok kettenis@
|
|
archs have instrutions that can do this, and the rest that dont get
to use wrappers around the byteswap(3) api.
this provides MI backends for sparc64 and powerpc which get a big
benefit from this because byteswapping in registers is really hard
for them.
the intended use case is for reading and writing bits of dma memory
handed to and from hardware.
discussed with miod@ guenther@ deraadt@
ok miod@ kettenis@
|
|
fairer access to the kernel lock (which suffers very heavy contention
at the moment).
i wrote this at n2k14 and reworked it shortly after to use the mi
atomic ops api when that was agreed on. ive been running it on my
systems ever since.
the version before the atomic op tweaks was tested by kettenis@
n2k14 (deraadt@ and kettenis@ in particular if i recall correctly)
oked this going in after 5.5
|
|
namespace, so stop changing behavior when it's #defined
ok beck@ krw@
|
|
<machine/pmap.h> where it belongs, and compensate in <uvm/uvm_extern.h>
by including <uvm/uvm_pmap.h> before <uvm/uvm_page.h>. Tested on all
MACHINE_ARCH but amd64 and i386 (and hppa64).
|
|
|
|
this basically replaces sparc64_cas and sparc64_casx with atomic_cas_uint
and atomic_cas_ulong respectively. it then builds atomic_add and
atomic_sub out of those. this avoids the gcc atomic builtins that
the MI atomic_foo api uses by default, so we dont get the extra
membars that the builtins do but the atomic_foo api doesnt promise.
it also fixes up the code that used to use sparc64_{cas,casx} to
use the atomic_cas api instead.
use of the sparc64 membar() macros are left untouched for now.
ok kettenis@
|
|
|
|
|
|
|
|
ok kettenis@
|
|
|
|
|
|
we block all interrupts that can grab the kernel lock. The simplest way to
achieve this is to make sure mutexes always raise the ipl to the highest
level that has interrupts that grab the kernel lock. This will allow us
to have "mpsafe" interrupt handlers at lower priority levels.
No change for non-MULTIPROCESSOR kernels.
|
|
ok miod kettenis
|
|
type definitions that are the same across all archs from
<machine/_types.h> to <sys/_types.h>
ok deraadt@ kettenis@ otto@
|
|
breakage lurking; ok kettenis@
|
|
the same across all archs from <machine/_types.h> to <sys/_types.h>
ok deraadt@
|
|
test period; i think 3 years ago the last bugs fell out.
ok otto beck others
|
|
|
|
it's now atomic_lock to better reflect its usage, and librthread now
features a new spinlock that's really a ticket lock.
thrlseep can handle both types of lock via a flag in the clock arg.
(temp back compat hack)
remove some old stuff that's accumulated along the way and no longer used.
some feedback from dlg, who is concerned with all things ticket lock.
(you need to boot a new kernel before installing librthread)
|
|
|
|
part of the future we have planned. middling ok from a few
|
|
|
|
lock, by adding a new BUS_INTR_ESTABLISH_MPSAFE flag for use with the
(sparc64-specific) bus_intr_establish(9) interface. Add support for this
flag to schizo(4); other bus drivers will ignore it for now. While there,
remove the BUS_INTR_ESTABLISH_FASTTRAP flag which serves no purpose.
|
|
Most of the hard work by mpi@, who provided the initial diff.
Fixes for sparc from myself. Tested on sgi and sparc myself.
Compiles and detects zstty on my powerbook, compile tested on
sparc64 by me. Real testing with zs device on sparc64 by miod@
who also gave a lot of help and feedback.
ok miod@, mpi@
|
|
and we've started using %g7 as a per-thread register now. If you have any
binaries left that use this flag they'll probably crash and burn!
|