Age | Commit message (Collapse) | Author |
|
|
|
fairer access to the kernel lock between logical cpus, especially
in multi socket systems.
i first wrote this diff in 2011.
ok n2k14 for post 5.5 (deraadt@ and kettenis@ in particular)
|
|
namespace, so stop changing behavior when it's #defined
ok beck@ krw@
|
|
faults to avoid sleeping. Implement this functionality for i386 and amd64
for faults in the user address space. If the ci_inatomic flag is set in
struct cpu_info, copyin(9) and copyout(9) will return EFAULT when a user-space
address needs to be faulted in. Use this to properly implement
__copy_to_user_inatomic() and __copy_from_user_inatomic_nocache() in the
inteldrm(4) code.
ok krw@, guenther@
|
|
<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).
|
|
suspend work on some machines.
ok deraadt@, mlarkin@
|
|
|
|
Also move it from pmap.h to pmap.c because it is an internal detail.
|
|
hibernate goo up after 64KB to avoid posible corruption by buggy BIOS SMM
code. Diff also ensures the first 64KB doesn't get handed to UVM either.
ok deraadt@, tested by many with no regressions reported
|
|
ok deraadt@
|
|
|
|
ok krw@, deraadt@
|
|
instead of the cache line containing the local variable used to specify the
address. Fixes the gnome corruption and hangs people have been experiencing
for the last couple of months or so.
ok deraadt@, mlarkin@
|
|
(at least BOOT 3.20 on amd64 and BOOT 3.18 on i386) or you'll risk losing
your serial console.
ok deraadt@
|
|
|
|
ok miod
|
|
if it can tell the target CPU isn't actually idling and introduce cpu_kick()
for the cases where we want to force a non-idle CPU into the kernel.
just a port of the amd64 version; testing by many
|
|
1. Makes amd64 and i386 MTRR code nearly identical
2. Removes support for per-process MTRRs (which were never implemented)
3. Treat "unknown" MTRR types as uncacheable instead of trying to preserve
bogus settings made by the BIOS
4. Various KNF cleanups
Should be no functional change.
ok jsg@, deraadt@
|
|
sure that SIZE_MAX and SSIZE_MAX are defined as constants with a matching
type on all are architectures.
ok millert@, matthew@
|
|
|
|
ok miod 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 matthew@
|
|
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@
|
|
removed at n2k13 but a few errant references still remained. No functional
change. Spot tested by my on i386 and amd64 UP environments, no regressions
seen.
noticed by deraadt@
|
|
|
|
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)
|
|
executing code possibly causing side effects during the image unpack
operation. But before we can halt the APs, we need to complete their init
(as they will be hatched but idling, possibly with interrupts off).
Introduces MD function hibernate_quiesce_cpus to do this, called from the
MI hibernate resume code.
ok deraadt
|
|
|
|
functions to enable and disable interrupts, if needed. If a platform doesnt
need interrupt handling in this way, the MD function can be a no-op.
discussed with pirofti and deraadt
|
|
part of the future we have planned. middling ok from a few
|
|
kernel lock upon entry through a new IPL_MPSAFE flag/level.
|
|
|
|
ok kettenis
|
|
cycles per second isnt reliable, particularly inside "virtual" machines.
cpuspeed can be calculated as 0, which causes a divide by zero later on
which is bad.
this goes to more effort to detect if the performance counters are in use
by the hypervisor, or detecting if they gave us a cpuspeed of 0 so we can
fall through to using rdtsc.
ok jsg@
|
|
namespace a bit much. These are the names for the value encoded in
core.c_ucode or siginfo.si_trapno, but userland never looks directly
and only cares about the abstract signal code.
ok guenther
|
|
the things that libkvm needs.
|
|
libm. While at it, remove now unused workarounds for lint.
Agreed by kettenis@, guenther@, matthew@.
|
|
another symbol without weak attribute. To be used in libc and libm
soon. Agreed by kettenis@, guenther@, matthew@.
|
|
|
|
|
|
|
|
|
|
to keep definitions our of user space. The MD files now follow a consistant
order -- all namespace intrusion is at the tail can be cleaned up
independently. locore, bootblocks, and libkvm still see enough visibility to
build. Checked on 90% of platforms...
|
|
support to reload bindings after suspend/resume and to update cachability
flags in the address translation table entries.
|
|
kgmon(8) to deal with them, this time without public header changes.
Previously various CPUs were iterating over the same global buffer at
the same time to modify it and never ended.
This diff includes some ideas submited by Thor Simon to NetBSD via miod@.
ok deraadt@, mikeb@, haesbaert@
|
|
at this moment.
|
|
various CPUs were iterating over the same global buffer at the same
time to modify it and never ended.
This diff includes some ideas submited by Thor Simon to NetBSD via miod@.
ok mikeb@, haesbaert@
|
|
swap for you to the hosts endianness. sometimes you dont want this hand
holding and just want raw access to the registers. bus_space does have
stuff to do this already, but they deal with buffers which can be awkward
if you just want to get or set a single register.
this adds the following to i386 and amd64:
bus_space_read_raw_2() bus_space_read_raw_4() bus_space_read_raw_8()
bus_space_write_raw_2() bus_space_write_raw_4() bus_space_write_raw_8()
sparc64 already implements this, even though it wasnt part of the
official api. how handy.
i'll do other archs as i can.
kettenis@ and miod@ seem ok with this
|