- Try to avoid mispredicted bracnhes in Xsyscall.
- Interrupts were being enabled in Xsyscall _after_ checking for ASTs,
while could have resulted in ugly behaviour like delayed signals or
context switches. Fix it.
Add an additional argument to pnpbus_intr_establish to allow overriding of
the pnp interrupt type, because some devices lie.
Change how the pnpbus match routine works, to avoid attaching it when we
are probing for cpu's.
Fix a few stray printf's in the autoconf output.
preemption. This could also fix similar errors seen with softints.
- Adjust code slightly to try and avoid mispredicted branches. The branch
hint prefixes are apparently of little use.
DragonflyBSD uses the crit names for something quite different.
- Add a kpreempt_disabled function for diagnostic assertions.
- Add inline versions of kpreempt_enable/kpreempt_disable for primitives.
- Make some more changes for preemption safety to the x86 pmap.
we no longer need to guard against access from hardware interrupt handlers.
Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:
- Inspecting process state requires thread context, so signals can no longer
be sent from a hardware interrupt handler. Signal activity must be
deferred to a soft interrupt or kthread.
- As the proc state locking is simplified, it's now safe to take exit()
and wait() out from under kernel_lock.
- The system spends less time at IPL_SCHED, and there is less lock activity.
Changes beyond OpenBSD's driver:
- Improved support for AMD K8
- Added support for AMD Barcelona, AMD Phenom and AMD Griffin
Tested on various single and multi-socket machines.
Review and OK xtreame
pointed out by Simon (Simon's option #3): use the greatest power of two
which is a divisor of the desired number of cache colors.
This code might want to stay even after the cache probing code is fixed.
atapibus cdrom drives both using the same "target/lun" space, we could
confuse cdrom@0,0 for disk@0,0. Now match the complete string (we still
don't care how firmware calls a device, just rely on it being consistent).
Problem noticed by Jonathan A. Kollasch.
was broken by one of the early vmlocking merges, which removed the kthread
that did the initial detection / attachment and instead called the code
directly from the PCMCIA controller attach method.
Submitted in PR port-hpcarm/37227 by Peter Postma; I've tweaked it ever-so-
slightly.
have gotten fatter with age and even the stock kernels were bigger than the
code could handle.
Thanks to Jason Mitchell for sending me a Jornada 720 so I could actually
test this.
MI code always calls pmap_deactivate/pmap_activate on context switch.
Instead, just record the last active lwp (or NULL if it exited) and
defer switching VM context to pmap_activate(). This saves an additional
function call overhead in cpu_switchto().
While here, g/c unused cpuswitch.S local .Lblock_userspace_access.
Also while here fix the delay loop used before timers are enabled to
cause a delay, by using a volatile int to do a countdown. gcc has become
intelligent enough to optimize an empty loop away.
For delay on PXA270 we should use one of the other counters, and a 1Mhz
clock, so that we don't have to computer the counter increment.
XXX: also looks like there's a bug if the counter wraps, as delay doesn't
look like it allows for that.
the SDA/SCL pin direction, by treating the direction as just that; a hint.
Instead, configure the SDA/SCL pins as outputs only when they are to
be driven low (zero). Otherwise configure them as inputs and allow the
pull-up resistors to do their jobs.
Check the SDA direction hint only if DIAGNOSTIC.
Fixes a problem reported by Donald T Hayford on port-arm@ whereby the
kernel failed to read/write the RTC's registers.
now take a ptr to a function and an opaque data to achieve the
specific work.
- this file is going to become a general form when brd specific
params are encapsulated in an instance as struct.
- target differences are considered minor and adaptable by heuristics
in pci/pci_machdep.c and machdep.c.
- kernel expects sane runtime HW settings when it gains control.
All tweaks should have been completed by bootloader.
- consults stand/ for reference. The implementation will change
from time to time.
communications to power control satelite processor is to be done by
a kernel thread and sysctl knobs with help of possible user agent
deamon.
- Kernel expects a ptr to bootinfo structure in arg3.
- The bootinfo definition is in include/bootinfo.h
- CLOCK and CONSOLE designations are important during initial bringup
efforts. machdep.c consults memory controller parameters when no
MEMORY was specified.
- autoconf.c determines ROOTDEVICE and BOOTPATH.
- target differences
in cpu_attach(), and doing it here will overwrite the cpu_number of the
physical CPU with the one from the virtual CPU (which is always 0).
XXX is ioapic_bsp_id read somewhere ?