Age | Commit message (Collapse) | Author |
|
ok miod (a while back)
|
|
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and help from deraadt
|
|
eliminating the must-be-kept-in-sync UVM_INH_* macros
ok deraadt@ tedu@
|
|
|
|
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h.
PROT_MASK is introduced as the one true way of extracting those bits.
Remove UVM_ADV_* wrapper, using the standard names.
ok doug guenther kettenis
|
|
pre-existing atomics to match.
tested on sgi (octane) and octeon (erl)
ok miod@ dlg@
|
|
depend upon the address being at the beginning of a cache line, for we may
arrive in the middle of a line thanks to a branch. Noticed the hard way...
|
|
`bus error upon instruction fetch' exceptions where the faulting address is
in the kernel, and at the very beginning of an I$ cache line.
(I've experienced these on an R16000 Fuel since several months already)
|
|
millert@ and jmc@ agree that "overriden" is wrong
|
|
|
|
|
|
where to put the fpu assist page, for uvm_map_hint() may return an address
outside userland bounds due to aggressive randomization. Passing zero will
still get a random address, but correctly bounded.
|
|
ok mpi@ sthen@
|
|
after discussions with beck deraadt 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@
|
|
In other words, ta0-ta3 are now a4-a7 instead of t0-t3; and the former t4-t7
are now t0-t3.
|
|
|
|
don't need to be married.
ok guenther miod beck jsing kettenis
|
|
|
|
|
|
prevent mips64 from hitting the same problem as found by tobiasu@ on hppa.
ok miod@
|
|
initial diff from jasper@
|
|
it needs to be done atomicly on some MP archs and we don't have
atomic_add_int() everywhere yet. Also, mi_ast() was meant to be inline.
noted by miod@
|
|
|
|
feedback/ok miod@
|
|
ok deraadt@
|
|
to avoid possible use-after-free references when swapping ids in threaded
processes. "Do I have the right creds?" checks are always made with the
threads creds.
Inspired by FreeBSD and NetBSD
"right time" deraadt@
|
|
No functional change; helps non-released kernels with extra debugging code (-:
|
|
is currently being covered by the wired TLB entries, flush them, so that,
if the process' pc is still running in a vulnerable page, the WAR will
reapply immediately and fault the next page.
|
|
|
|
|
|
processors, every time a new text page is mapped in a pmap, the L1 I$ is
flushed for the va spanned by this page.
Since we map pages of our binaries upon demand, as they get faulted in, but
uvm_fault() tries to map the few neighbour pages, this can end up in a
bunch of pmap_enter() calls in a row, for executable mappings. If the L1
I$ is small enough, this can cause the whole L1 I$ cache to be flushed
several times.
Change pmap_enter() to postpone these flushes by only registering the
pending flushes, and have pmap_update() perform them. The cpu-specific
cache code can then optimize this to avoid unnecessary operations.
Tested on R4000SC, R4600SC, R5000SC, RM7000, R10000 with 4KB and 16KB
page sizes (coherent and non-coherent designs), and Loongson 2F by mikeb@ and
me. Should not affect anything on Octeon since there is no way to flush a
subset of I$ anyway.
|
|
supposedly provided by newer PMON firmware (on Loongson 2Gq and Loongson 3A
systems).
|
|
ok dlg@ mpi@ deraadt@
|
|
lowest bowels of the exception handling code, rather than in trap(). They
won't get recorded in the trap history, but there is a measurable speedup.
No change for non-CPU_R4000 kernels.
|
|
Tweak the handling of ktrace EMUL when changing ktracing: only
generate one per process (not one per thread) and pass the correct
proc pointer down to the VFS layer. Permit generating of NAMI and
CSW records inside ktrace(2) itself.
ok deraadt@ millert@
|
|
|
|
(egads!). While there, remove leftover instructions from an early flavour of
tlb_update_indexed(), which crept in by accident.
|
|
testing help mpi@
|
|
affecting R4000 processors revision 2.x and below (found on most R4000 Indigo
and a few R4000 Indy).
Since this errata gets triggered by TLB misses when the code flow crosses a
page boundary, this code attempts to identify code pages prone to trigger the
errata, and force the next page to be mapped for at least as long as the
current pc lies in the troublesome page, by creating wiring extra TLB entries.
These entries get recycled in a lazy-but-aggressive-enough way, either because
of context switches, or because of further tlb exceptions reaching trap().
The errata workaround code is only compiled on R4000-capable kernels (i.e.
sgi GENERIC-IP22 and nothing else), and only enabled on affected processors
(i.e. not on R4000 revision 3, or on R4400).
There is still room for improvemnt in unlucky cases, but in this simple enough
incarnation, this allows my R4000 2.2 Indigo to finally reliably boot multiuser,
even though both /sbin/init and /bin/sh contain code pages which can trigger
the errata.
|
|
and which bits end up in the actual tlb registers.
On non-R8000 kernels, shrink the actual physical address bits to add a new
software bit, PG_SP (for `special'), which will be used shortly. This halves
the physical memory addressable by non-MIPS_PTE64 kernels, which should not
be a problem anyway.
|
|
outside of ddb. It will be used by regular kernel code shortly.
|
|
PV_xxx to PGF_xxx for consistency (these are not stored in pvlist entries
anymore since years). The PG_ prefix can't be used here because of name
conflicts with <machine/pte.h> names, and I'd rather not rename the pte
constants.
No functional change. But it makes my life easier.
|
|
PG_PMAPMASK as all the possible pmap-specific bits (similar to the other
PG_fooMASK) to make sure MI code does not need to be updated, the next time
more bits are allocated to greedy pmaps.
No functional change, soon to be used by the (greedy) mips64 pmap.
|
|
|
|
native size, so eliminate the #defines.
ok miod@
|
|
on sgi.
|
|
did, but less awkward). Also make sure that the code changing the K0SEG CCA
value has enough nops, before returning to cached space, to match the
recommended procedure in the RM52xx and RM7000 erratas.
|
|
namespace, so stop changing behavior when it's #defined
ok beck@ krw@
|