-use an aligned pci config space address as everyone else -- I'm sorry
about that because I like gson's way a lot -- it keeps the address
offset due to alignment visually close to the data shift --, but since
aligned addresses are used everywhere else in definitions, this
causes confusion
-the mask applied to the data didn't make much sense, a look at the
FreeBSD code where this code originates from suggests that there
was just a mistake -- one trailing zero missing --
anyway, the datasheet tells that the error bits are all write-one-
to-clear, so just write back the value and we are done
are switched to (was harmless because we don't do D2 yet and also
don't (hmm - shouldn't) access devices in D3 (which would only make
sense if we'd support D3hot)
-zero the io/mem/master enable bits before entering D3
(The special handling of PCI_CLASS_DISPLAY devices is questionable
here -- we can't care about the console if we are seriously follow
the spec, and upstream bridges aren't considered anyway.)
-add exact references to the PCI PM spec
the pmf API can't deal with all the different suspend/resume/reboot
cases well yet, so better keep suspend/resume and reboot/halt/poweroff
clearly seperated
BSD Lisc as part of the perflib project.
http://sourceforge.net/projects/ppcperflib/
Tested the new functions with microbenchmarks on a number of different
CPU types, and found that most cpus either benefited greatly, or were
unaffected. Primarily G4 CPU's were unaffected, and all others showed
speedups. My 7044 (POWER3) went from a 70.6 to a 73.2 (thats good) in
bytebench with a complete release built with these. Also passed
regression tests.
- atomic_cas_ni() does an implicit membar_exit()
- all other atomic operations do an implicit membar_sync()
While this might seem kind of arbitrary it's the basis for some important
optimizations.
too much in the RB_HALT case, making the "press a key to reboot" prompt
a bad joke. doshutdownhooks() should do shutdownhooks, not more.
Since it is md code which decides about halt/poweroff etc,
pmf_system_shutdown() should be called from there if appropriate.
respect the kernel device tree. (It is arguably ugly to special-case
wscons here, but as long as there is only one driver to be dealt with
it is not worth to introduce another set of hooks.)
Resume the X server at the end of resume, if everything went well.
Acquire the big KERNEL_LOCK before the device tree is walked on
suspend, until after the walk on resume. This is needed to avoid
device accesses by secondary CPUs, and it effectively keeps user
programs from interfering with the suspend process. This might be
revisited when all drivers are using private locks for MP-safeness
(but FreeBSD still does the same afaics).
It should be unnecessary now to switch secondary CPUs offline in
the powerd suspend script.
which are called somewhere in the middle of system suspend. Since the
X server accesses hardware directly it is outside our control whether
the devices it accesses are already/still suspended or not, so the only
way is to detach it before any device suspends and re-attach after
everything is awake again.
-For that, export a function ("wsdisplay_handlex" for now) which is
to be called from central suspend/resume code.
-The right way to handle the (normally impossible) case that the X
server is not detached on suspend is to return an error which should
abort the suspend process. pmf doesn't yet handle errors of device
suspend handlers, so as a temporary measure try to suspend anyway,
to get at least a text console.
-Improve error handling of X server attach/detach and maintain a flag
which tracks whether the X server is really active.
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
1. The 'S' operand field has to be swapped with the 'A' operand in the
output, as long as it is not a store-instruction. To achieve that, I
have introduced a new operand type Op_ST for the store instructions.
2. srawi has an immediate shift count as third operand, not a register.
3. extsh has only two operands, not three.