struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.
XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places. Reduce sys/user.h inclusions.
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.
Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).
Discussed on <tech-kern>, reviewed by <ad>.
SPARCclassic has onboard CG3 but it's internally connected via SBus,
and there is no info about sun4m machines which actually require
cgthree at obio attachment. Info from jdc@.
They are derived from 4.4BSD/sparc and have been there since initial import
of NetBSD/sparc in 1993, but the struct sbusdev is almost unused for years,
nothing calls sbusreset(), and all (*sd->sd_reset)() functions look bogus.
Suggested by mrg@ and martin@, and tested on SS1+ and SS20.
could be better, but i just copied them from the old intrnames in locore.
i benchmarked this with a simple test of ircii ./configure && make, to see
if the additional load/store & arith would cause any noticeable degradation
as the change also converts 32 bit counters to 64 bits. amusingly, the
only trend i saw in this was that for both portions, i see a consistent
(across at least 8 runs) benefit of about 0.8% improvement. ie, the newer
larger code size / counter size code actually runs faster for some reason..
maybe there's a cacheline effect in the size of the code?
XXX the current implementation depends on a couple of things:
XXX - ev_count member of evcnt{} is first and has offset 0
XXX - that sizeof(struct evcnt) equals 32
XXX if these are not true, locore.s has #error's to catch it
from tsutsui
- for MP kernels, copy the loop to find the bootcpu in mainbus_attach()
into getcacheinfo_obp() so we can get cache properties on the bootcpu
before calling main()
- in getcpuinfo(), move the call of getmid() before the call to
getcacheinfo() so that the above change to getcacheinfo_obp() can work
- move the struct cpu_info setup to the end of the initial kernel page
setup and don't access this space until after we have switched to the
kernel pagetables
- revive most of the old CPUINFO_VA alignment/congruency code from the
old alloc_cpuinfo_global_va() function, and ensure that all cpuinfo
structures are sanely aligned. this makes hypersparc work again
- introduce a new way to free the wasted pages back to UVM, as we can't
simply uvm_unmap() them this early in bootstrap
i believe that the first used cpuinfo_data page is still being wasted,
but i haven't checked.
- convert xpmsg_lock from a simplelock to a kmutex
- don't wait for sparc_noop IPI calls
- remove xmpsg_func's "retval" parameter and usage
- remove the IPI at high IPL message
- rework cpu_attach() a bunch, refactoring calls to getcpuinfo() and setting
of cpi, and split most of the non-boot CPU handling into a new function
- make CPU_INFO_FOREACH() work whether modular or not
- move the MP cpu_info pages earlier
- move a few things in cpu.c around to colsolidate the MP code together
- remove useless if (cpus == NULL) tests -- cpus is an array now
with these changes, and an additional change to crazyintr() to not printf(),
i can get to single user shell on my SS20 again. i can run a fwe commands
but some of them cause hangs. "ps auxw" works, but "top -b" does not.
tested in UP LOCKDEBUG/DEBUG/DIAGNOSTIC kernel as well.
MP kernel with only cpu0 configured panics starting /sbin/init.
have not yet tested on a real UP machine.