- apm_suspend() and apm_standby() will call splhhigh() before entering
standby or suspend. After resume, the system go back tsleep()ing
in the apm thread without restoring the ipl (this is done in
apm_resume()), and calling tlseep() at IPL_HIGH cause a DIAGNOSTIC
panic (and other bad things, I guess).
Fix by calling apm_resume() from within apm_suspend() or apm_standby(),
after aa_set_powstate() has returned.
- In apm_event_handle(), we test (apm_standbys || apm_suspends) to set
apm_damn_fool_bios to 1 and break the while() loop in apm_periodic_check().
But we set apm_standbys or apm_suspends to non-0 only if apm_op_inprog
is 0 and we failed to record the apm event. With apmd listening
we usually succeed recording the event, so apm_standbys/apm_suspends remains
0 and we never go out of the while() loop.
Fix by apm_op_inprog instead of (apm_standbys || apm_suspends)
to break the loop.
Roy Marples), or other devices misbehavior probably due to interrupts issues
(reported by Jukka Ruohonen). Back it out and do the following changes:
- clear port interrupt register before ahci_channel_start() which enables
interrupts
- wait 500ms after sata_reset_interface() before touching SERROR register.
This is what seems to fix the issue I'm seeming on ESB2 controller.
- The 31s delay didn't cause the probe to fail because of a mismatch
in loop index comparison; use a #define for delay after reset
instead of numeric values, to avoid this kind of bugs in the
future.
prototype for a function, try to make the code more simple, guard against a
potential NULL pointer dereference, and improve printing.
No functional change intended.
- rename pseg_get() and pseg_set() to pseg_get_real() and pseg_set_real().
- if USE_LOCKSAFE_PSEG_GETSET is defined, which it current is by default,
define pseg_[gs]et() in terms of functions that take a new pseg_lock
mutex at IPL_VM while calling into the real functions.
this seems to avoid the pseg_set() crashes we've seen:
1 - spare needed, when pseg_get() just worked for this pmap
2 - the 2rd ldxa via ASI_PHYS_CACHED in pseg_set() loads garbage
into %o4, and causes the 3rd ldxa to fault
- get geometry and framebuffer layout from the chip instead of hardcoding
- get rid of some now superfluous leftovers
- remove some debug code
- clean things up a bit
- dump registers with WCFB_DEBUG even if we're not the console
by XENMEM_decrease_reservation, it is checked by the hypervisor. In certain
circumstances (stack leak), the field could have an improper value, leading
to a fail of the hypercall.
Set it to 0 ("no addressing restriction") to avoid that.
Patch tested by Sam Fourman and haad@.
This should fix the rare "failed allocating DMA memory" encountered
under NetBSD dom0. Will ask for a pull-up.
each framebuffer ) - this gives quite a dramatic speedup and hides the funky
effects previously seen.
Almost there, now we need to actually draw a cursor.
- blast_dcache() becomes sp_blast_dcache(dcache_size, dcache_line_size)
- new smp_blast_dcache(sparc64_cpuset_t) that blasts the D$ on this cpuset
- sparc64_ipi_blast_dcache() to support the above
- in pmap_remove_all(), when freeing mmu contexts for this pmap, mark
the set of cpus to blast the d$ on as well and convert the
blast_dcache() call into smp_blast_dcache() on the cpus who ran this
pmap, or, sp_blast_dcache(dcache_size, dcache_line_size)
- convert the remaining blast_dcache() in machdep.c to sp_blast_dcache()
- in pmap_destroy()/pmap_remove_all() take the pmap_lock() always since
we assert it is held always.
with these changes, NFS builds on the U60 seem to be stable now, and
the USIII machines also can often complete a single build.sh run now,
diskful or diskless.
reviewed by mlelstv and partially by martin, tested by martin and myself,
with some ideas from chuq as well.