marked SONPROC.
- Fix a bug where all cpu_info structures except for the boot CPUs
would exist at both a CPU-local VA (CPUINFO_VA) and a gloal VA;
The boot CPU's existed only a CPUINFO_VA.
- Add a self-reference pointer to the cpu_info that references the
global address in the MULTIPROCESSOR case. Just allow it to reference
the `local' VA in the single-processor case, as CPUINFO_VA is global
enough when there's only one processor to care about. Change curcpu()
to return the global address.
state into global and per-CPU scheduler state:
- Global state: sched_qs (run queues), sched_whichqs (bitmap
of non-empty run queues), sched_slpque (sleep queues).
NOTE: These may collectively move into a struct schedstate
at some point in the future.
- Per-CPU state, struct schedstate_percpu: spc_runtime
(time process on this CPU started running), spc_flags
(replaces struct proc's p_schedflags), and
spc_curpriority (usrpri of processes on this CPU).
- Every platform must now supply a struct cpu_info and
a curcpu() macro. Simplify existing cpu_info declarations
where appropriate.
- All references to per-CPU scheduler state now made through
curcpu(). NOTE: this will likely be adjusted in the future
after further changes to struct proc are made.
Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
- the `alignment' and `boundary' arguments in bus_dmamem_alloc() only
serve as hints on how to break up a DMA transaction into chunks
when necessary; it is not necessary on sparc DVMA hardware.
- exclusively use the VM page size (i.e. PAGE_SIZE et.al.) when computing
resource allocations.
- remember the size of DVMA resource allocations in the private `_ds_sgsize'
field in a dma segment descriptor.
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.
These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.