Age | Commit message (Collapse) | Author |
|
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@
|
|
not sleep if the allocator cannot obtain a lock when BUS_DMA_NOWAIT is
specified.
idea and inputs from kettenis@, ok miod@
|
|
rebooting a machine, like it is done in the hibernate case.
At least some USB host controller drivers rely on this to busy way instead
of sleeping. Avoid a panic on macppc with an uhci(4) cardbus plugged in.
ok deraadt@, uebayashi@
|
|
Again remove slightly different comments to reduce diffs. These will be
re-added once boot() become MI and its specification is clearly re-defined.
OK miod@
|
|
RB_TIMEBAD is documented well enough that the comment is not needed. sparc64
does slightly different and its comment is left with XXX.
OK deraadt@ miod@
|
|
ok dlg@
|
|
OK deraadt@
|
|
easier and much less error-prone to just identity map it in the resuming
kernel as we have more control over the VA space layout there (otherwise
we are at the mercy of the suspending kernel's placement of the piglet VA).
This diff also increases the size of the piglet to 4 chunks, to avoid an
overwrite issue seen in m2k14 where the start of the kernel text was
overwritten with a bounced chunk before unpack.
|
|
above 1GB physical (caused by using an incorrect page size mask)
Also removes some unneeded low memory mappings on both amd64 and i386 (this
is a cosmetic fix but makes things easier to debug).
|
|
Chunks are now sorted by ascending PA and all chunks are bounced before
unpack. This fixes an issue where the trampoline chunks were being placed
at the end of the unpack ordering, causing overwrite during unpack.
|
|
but then parked ourselves in real mode without completing acquisition of
said lock. Also removes the park routine from i386 since we don't need it
(the APs are already parked at the time we start unpack).
discussed with and ok kettenis@, also ok deraadt@
|
|
but I flipped the test on i386/amd64, thus breaking kernel traps before
enough proc0 bits were set up. In theory, this could have resulted in
a NFS read for a page fault being done with a process's old credentials.
pointed out by Patrick Wildt of bitrig
|
|
don't need to be married.
ok guenther miod beck jsing kettenis
|
|
page rounding! Disgusting. Instead, define local copies of those
macros.
|
|
uvm_extern.h, uvm_param.h, and sysctl.h will no longer gaurantee that
_KERNEL code gets it.
|
|
http://mail-index.netbsd.org/source-changes/2009/10/18/msg002090.html
|
|
such that curcpu() works. The extent code creates pools, and if we want to
add any sort of locking to the pool code we need that working. Found out the
hard way by guenther@.
ok dlg@, guenther@
|
|
ok mlarkin
|
|
unfortunate circumstances) pull machine/cpufunc.h
|
|
suggested by sthen@
|
|
|
|
in the kernel a few months back and there's no reason these pages need to
be mapped during unpack either.
|
|
and these have been unhooked from the build for a while now.
|
|
ok mlarkin@
|
|
were to be enabled, it had a bug that prevented it from working anyway.
ok deraadt@, kettenis@
|
|
with softraid(4) disks.
softraid(4) is the last real consumer of the doshutdownhooks(9) API and it is
not trivial to convert its hook to a DVACT_POWERDOWN handler since the latter
does not allow to sleep.
|
|
don't need anymore.
|
|
rebooting a machine, like it is done in the hibernate case.
At least some USB host controller drivers rely on this to busy way instead
of sleeping. Avoid a panic on macppc with an uhci(4) cardbus plugged in.
ok deraadt@, uebayashi@
|
|
ok krw@, deraadt@
|
|
suggested by Benjamin Baier (programmer (at) netzbasis.de)
ok and comment suggestion kettenis@
|
|
you need to set up a local mirror for the install sets
brought to attention by pascal@ ok krw@
|
|
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@
|
|
Problem noted by Benjamin Baier (programmer (at) netzbasis.de)
improvements and ok kettenis@
|
|
ok deraadt@
|
|
ok jsg@
"go for it" kettenis@
|
|
bus_addr_t and bus_size_t are u_long everywhere
ok kettenis@
|
|
do so.
Freeing the hibernate structures too early leads to inadvertent calls into
splx when we aren't ready for them yet. Found when trapping splx calls in
the resume path.
discussed with deraadt@ at m2k14
|
|
|
|
tested by & ok mlarkin@
|
|
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@
|
|
|
|
|
|
ok mpi@ yuo@
|
|
|
|
ok kettenis@, deraadt@
|
|
call bufq_quiesce() after executing the DVACT_QUIESCE handlers.
This should be safe since no disk nor controller drivers have such
handler but it will allow us to detach sd(4) devices attached to a
USB bus.
Another benefit pointed out by kettenis@ is that drivers that need
to read a firmware from the disk should be able to do it at resume
time in a DVACT_WAKEUP handler.
ok kettenis@, deraadt@
|
|
ok dlg@ mpi@ deraadt@
|
|
the effects will be.
sgi will follow after i fix some known fallout first.
|
|
ok mpi@
|
|
so remove the former and include the latter instead of pulling it
in <dev/pci/agpvar.h>. This header already requires various other
types anyway. While here remove unneeded headers.
|