Date: Sun, 8 Dec 2013 15:48:54 -0800 From: Justin Hibbits <chmeeedalf@gmail.com> To: Marius Strobl <marius@alchemy.franken.de> Cc: Justin Hibbits <jhibbits@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org> Subject: Re: Request for testing an alternate branch Message-ID: <20131208154854.7425d9a7@zhabar.gateway.2wire.net> In-Reply-To: <20131208133853.GA75604@alchemy.franken.de> References: <20131204222113.39fb23dd@zhabar.gateway.2wire.net> <20131208133853.GA75604@alchemy.franken.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--MP_/myyr.EiQd2QcNU+JRaoNCZY Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sun, 8 Dec 2013 14:38:53 +0100 Marius Strobl <marius@alchemy.franken.de> wrote: > On Wed, Dec 04, 2013 at 10:21:13PM -0800, Justin Hibbits wrote: > > I've been working on the projects/pmac_pmu branch for some time now > > to add suspend/resume as well as CPU speed change for certain > > PowerPC machines, about a year since I created the branch, and now > > it's stable enough that I want to merge it into HEAD, hence this > > request. However, it does touch several drivers, turning them into > > "early drivers", such that they can be initialized, and suspended > > and resumed at a different time. Saying that, I do need testing > > from other architectures, to make sure I haven't broken anything. > > > > The technical details: > > > > To get proper ordering, I've extended the bus_generic_suspend() and > > bus_generic_resume() to do multiple passes. Devices which cannot be > > enabled or disabled at the current pass level would return an > > EAGAIN. This could possibly cause problems, since it's an addition > > to an existing API rather than a new API to run along side it, so > > it needs a great deal of testing. It works fine on PowerPC, but I > > don't have any i386/amd64 or sparc64 hardware to test it on, so > > would like others who do to test it. I don't think that it would > > impact x86 at all (testing is obviously required), because the > > nexus is not an EARLY_DRIVER_MODULE, so all devices would be > > handled at the same pass. But, I do know the sparc64 has an > > EARLY_DRIVER_MODULE() nexus, so that will likely be impacted. > > > > Also, any comments are of course welcome. Technical concerns are > > obviously welcome, and I will try to address everything. > > Do you have a patch against head? > > Marius > Here you go. - Justin --MP_/myyr.EiQd2QcNU+JRaoNCZY Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=pmac_pmu.diff Index: MAINTAINERS =================================================================== --- MAINTAINERS (revision 259108) +++ MAINTAINERS (working copy) Property changes on: MAINTAINERS ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/MAINTAINERS:r244821-259112 Index: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print =================================================================== --- cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print (revision 259108) +++ cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print (working copy) Property changes on: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/libzfs_core/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print:r247831-248551 Merged /projects/pmac_pmu/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print:r250993-259112 Merged /vendor/opensolaris/dist/cmd/dtrace/test/tst/common/print:r194442-210759 Merged /projects/quota64/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print:r184125-207707 Merged /projects/multi-fibv6/head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print:r230929-231848 Merged /vendor/illumos/dist/cmd/dtrace/test/tst/common/print:r238592,238725,239610,239746,240110,240262,240326,240357,240949,242729,242732,243012-243013,243395,244245,246388,246392,247176,247580,247845,248217,248266,249185 Merged /head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print:r2-168403 Merged /vendor/resolver/dist/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print:r1540-186085 Merged /vendor-cddl/opensolaris/dist/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print:r178477-194441 Merged /projects/largeSMP/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print:r221273-222812,222815-223757 Index: cddl/contrib/opensolaris/cmd/zfs =================================================================== --- cddl/contrib/opensolaris/cmd/zfs (revision 259108) +++ cddl/contrib/opensolaris/cmd/zfs (working copy) Property changes on: cddl/contrib/opensolaris/cmd/zfs ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/cddl/contrib/opensolaris/cmd/zfs:r244821-259112 Index: cddl/contrib/opensolaris/lib/libzfs =================================================================== --- cddl/contrib/opensolaris/lib/libzfs (revision 259108) +++ cddl/contrib/opensolaris/lib/libzfs (working copy) Property changes on: cddl/contrib/opensolaris/lib/libzfs ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/cddl/contrib/opensolaris/lib/libzfs:r244821-259112 Index: cddl/contrib/opensolaris =================================================================== --- cddl/contrib/opensolaris (revision 259108) +++ cddl/contrib/opensolaris (working copy) Property changes on: cddl/contrib/opensolaris ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/cddl/contrib/opensolaris:r244821-259112 Index: cddl =================================================================== --- cddl (revision 259108) +++ cddl (working copy) Property changes on: cddl ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/cddl:r244821-259112 Index: contrib/apr =================================================================== --- contrib/apr (revision 259108) +++ contrib/apr (working copy) Property changes on: contrib/apr ___________________________________________________________________ Modified: svn:mergeinfo Merged /head/contrib/apr:r244821-251885 Merged /projects/random_number_generator/contrib/apr:r254613-255353 Merged /projects/pmac_pmu/contrib/apr:r252132-259112 Index: contrib/apr-util =================================================================== --- contrib/apr-util (revision 259108) +++ contrib/apr-util (working copy) Property changes on: contrib/apr-util ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/random_number_generator/contrib/apr-util:r254613-255353 Merged /projects/pmac_pmu/contrib/apr-util:r252132-259112 Merged /head/contrib/apr-util:r244821-251885 Index: contrib/atf =================================================================== --- contrib/atf (revision 259108) +++ contrib/atf (working copy) Property changes on: contrib/atf ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/atf:r244821-259112 Index: contrib/binutils =================================================================== --- contrib/binutils (revision 259108) +++ contrib/binutils (working copy) Property changes on: contrib/binutils ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/binutils:r244821-259112 Index: contrib/bmake =================================================================== --- contrib/bmake (revision 259108) +++ contrib/bmake (working copy) Property changes on: contrib/bmake ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/bmake:r244821-259112 Index: contrib/byacc =================================================================== --- contrib/byacc (revision 259108) +++ contrib/byacc (working copy) Property changes on: contrib/byacc ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/byacc:r244821-259112 Index: contrib/bzip2 =================================================================== --- contrib/bzip2 (revision 259108) +++ contrib/bzip2 (working copy) Property changes on: contrib/bzip2 ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/bzip2:r244821-259112 Index: contrib/com_err =================================================================== --- contrib/com_err (revision 259108) +++ contrib/com_err (working copy) Property changes on: contrib/com_err ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/com_err:r244821-259112 Index: contrib/compiler-rt =================================================================== --- contrib/compiler-rt (revision 259108) +++ contrib/compiler-rt (working copy) Property changes on: contrib/compiler-rt ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/compiler-rt:r244821-259112 Index: contrib/dialog =================================================================== --- contrib/dialog (revision 259108) +++ contrib/dialog (working copy) Property changes on: contrib/dialog ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/dialog:r244821-259112 Index: contrib/dtc =================================================================== --- contrib/dtc (revision 259108) +++ contrib/dtc (working copy) Property changes on: contrib/dtc ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/dtc:r244821-259112 Index: contrib/ee =================================================================== --- contrib/ee (revision 259108) +++ contrib/ee (working copy) Property changes on: contrib/ee ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/ee:r244821-259112 Index: contrib/expat =================================================================== --- contrib/expat (revision 259108) +++ contrib/expat (working copy) Property changes on: contrib/expat ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/expat:r244821-259112 Index: contrib/file =================================================================== --- contrib/file (revision 259108) +++ contrib/file (working copy) Property changes on: contrib/file ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/file:r244821-259112 Index: contrib/gcc =================================================================== --- contrib/gcc (revision 259108) +++ contrib/gcc (working copy) Property changes on: contrib/gcc ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/gcc:r244821-259112 Index: contrib/gdb =================================================================== --- contrib/gdb (revision 259108) +++ contrib/gdb (working copy) Property changes on: contrib/gdb ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/gdb:r244821-259112 Index: contrib/gdtoa =================================================================== --- contrib/gdtoa (revision 259108) +++ contrib/gdtoa (working copy) Property changes on: contrib/gdtoa ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/gdtoa:r244821-259112 Index: contrib/groff =================================================================== --- contrib/groff (revision 259108) +++ contrib/groff (working copy) Property changes on: contrib/groff ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/groff:r244821-259112 Index: contrib/ipfilter/ml_ipl.c =================================================================== --- contrib/ipfilter/ml_ipl.c (revision 259108) +++ contrib/ipfilter/ml_ipl.c (working copy) Property changes on: contrib/ipfilter/ml_ipl.c ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/ipfilter/ml_ipl.c:r255832-259112 Merged /head/contrib/ipfilter/ml_ipl.c:r254686-254687 Index: contrib/ipfilter/mlfk_ipl.c =================================================================== --- contrib/ipfilter/mlfk_ipl.c (revision 259108) +++ contrib/ipfilter/mlfk_ipl.c (working copy) Property changes on: contrib/ipfilter/mlfk_ipl.c ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/head_mfi/contrib/ipfilter/mlfk_ipl.c:r233621 Merged /projects/random_number_generator/contrib/ipfilter/mlfk_ipl.c:r254613-255353 Merged /projects/pmac_pmu/contrib/ipfilter/mlfk_ipl.c:r255832-259112 Merged /projects/quota64/contrib/ipfilter/mlfk_ipl.c:r184125-207707 Merged /projects/multi-fibv6/head/contrib/ipfilter/mlfk_ipl.c:r230929-231848 Merged /head/contrib/ipfilter/mlfk_ipl.c:r244821-252117,254686-254687 Merged /vendor/resolver/dist/contrib/ipfilter/mlfk_ipl.c:r1540-186085 Merged /projects/largeSMP/contrib/ipfilter/mlfk_ipl.c:r221273-222812,222815-223757 Index: contrib/ipfilter/mlh_rule.c =================================================================== --- contrib/ipfilter/mlh_rule.c (revision 259108) +++ contrib/ipfilter/mlh_rule.c (working copy) Property changes on: contrib/ipfilter/mlh_rule.c ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/ipfilter/mlh_rule.c:r244821-259112 Merged /projects/quota64/contrib/ipfilter/mlh_rule.c:r184125-207707 Merged /projects/multi-fibv6/head/contrib/ipfilter/mlh_rule.c:r230929-231848 Merged /vendor/resolver/dist/contrib/ipfilter/mlh_rule.c:r1540-186085 Merged /projects/largeSMP/contrib/ipfilter/mlh_rule.c:r221273-222812,222815-223757 Merged /projects/head_mfi/contrib/ipfilter/mlh_rule.c:r233621 Merged /projects/random_number_generator/contrib/ipfilter/mlh_rule.c:r254613-255353 Index: contrib/ipfilter/mli_ipl.c =================================================================== --- contrib/ipfilter/mli_ipl.c (revision 259108) +++ contrib/ipfilter/mli_ipl.c (working copy) Property changes on: contrib/ipfilter/mli_ipl.c ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/quota64/contrib/ipfilter/mli_ipl.c:r184125-207707 Merged /projects/multi-fibv6/head/contrib/ipfilter/mli_ipl.c:r230929-231848 Merged /head/contrib/ipfilter/mli_ipl.c:r244821-252117,254686-254687 Merged /vendor/resolver/dist/contrib/ipfilter/mli_ipl.c:r1540-186085 Merged /projects/largeSMP/contrib/ipfilter/mli_ipl.c:r221273-222812,222815-223757 Merged /projects/head_mfi/contrib/ipfilter/mli_ipl.c:r233621 Merged /projects/random_number_generator/contrib/ipfilter/mli_ipl.c:r254613-255353 Merged /projects/pmac_pmu/contrib/ipfilter/mli_ipl.c:r255832-259112 Index: contrib/ipfilter/mln_ipl.c =================================================================== --- contrib/ipfilter/mln_ipl.c (revision 259108) +++ contrib/ipfilter/mln_ipl.c (working copy) Property changes on: contrib/ipfilter/mln_ipl.c ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/random_number_generator/contrib/ipfilter/mln_ipl.c:r254613-255353 Merged /projects/pmac_pmu/contrib/ipfilter/mln_ipl.c:r255832-259112 Merged /projects/quota64/contrib/ipfilter/mln_ipl.c:r184125-207707 Merged /projects/multi-fibv6/head/contrib/ipfilter/mln_ipl.c:r230929-231848 Merged /head/contrib/ipfilter/mln_ipl.c:r244821-252117,254686-254687 Merged /vendor/resolver/dist/contrib/ipfilter/mln_ipl.c:r1540-186085 Merged /projects/largeSMP/contrib/ipfilter/mln_ipl.c:r221273-222812,222815-223757 Merged /projects/head_mfi/contrib/ipfilter/mln_ipl.c:r233621 Index: contrib/ipfilter/mls_ipl.c =================================================================== --- contrib/ipfilter/mls_ipl.c (revision 259108) +++ contrib/ipfilter/mls_ipl.c (working copy) Property changes on: contrib/ipfilter/mls_ipl.c ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/largeSMP/contrib/ipfilter/mls_ipl.c:r221273-222812,222815-223757 Merged /projects/head_mfi/contrib/ipfilter/mls_ipl.c:r233621 Merged /projects/random_number_generator/contrib/ipfilter/mls_ipl.c:r254613-255353 Merged /projects/pmac_pmu/contrib/ipfilter/mls_ipl.c:r255832-259112 Merged /projects/quota64/contrib/ipfilter/mls_ipl.c:r184125-207707 Merged /projects/multi-fibv6/head/contrib/ipfilter/mls_ipl.c:r230929-231848 Merged /head/contrib/ipfilter/mls_ipl.c:r244821-252117,254686-254687 Merged /vendor/resolver/dist/contrib/ipfilter/mls_ipl.c:r1540-186085 Index: contrib/ipfilter =================================================================== --- contrib/ipfilter (revision 259108) +++ contrib/ipfilter (working copy) Property changes on: contrib/ipfilter ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/largeSMP/contrib/ipfilter:r221273-222812,222815-223757 Merged /projects/head_mfi/contrib/ipfilter:r233621 Merged /projects/random_number_generator/contrib/ipfilter:r254613-255353 Merged /projects/pmac_pmu/contrib/ipfilter:r244821-259112 Merged /projects/quota64/contrib/ipfilter:r184125-207707 Merged /projects/multi-fibv6/head/contrib/ipfilter:r230929-231848 Merged /vendor/resolver/dist/contrib/ipfilter:r1540-186085 Index: contrib/ldns =================================================================== --- contrib/ldns (revision 259108) +++ contrib/ldns (working copy) Property changes on: contrib/ldns ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/ldns:r250993-259112 Index: contrib/less =================================================================== --- contrib/less (revision 259108) +++ contrib/less (working copy) Property changes on: contrib/less ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/less:r244821-259112 Index: contrib/libarchive/cpio =================================================================== --- contrib/libarchive/cpio (revision 259108) +++ contrib/libarchive/cpio (working copy) Property changes on: contrib/libarchive/cpio ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/libarchive/cpio:r244821-259112 Index: contrib/libarchive/libarchive =================================================================== --- contrib/libarchive/libarchive (revision 259108) +++ contrib/libarchive/libarchive (working copy) Property changes on: contrib/libarchive/libarchive ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/libarchive/libarchive:r244821-259112 Index: contrib/libarchive/libarchive_fe =================================================================== --- contrib/libarchive/libarchive_fe (revision 259108) +++ contrib/libarchive/libarchive_fe (working copy) Property changes on: contrib/libarchive/libarchive_fe ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/libarchive/libarchive_fe:r244821-259112 Index: contrib/libarchive/tar =================================================================== --- contrib/libarchive/tar (revision 259108) +++ contrib/libarchive/tar (working copy) Property changes on: contrib/libarchive/tar ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/libarchive/tar:r244821-259112 Index: contrib/libarchive =================================================================== --- contrib/libarchive (revision 259108) +++ contrib/libarchive (working copy) Property changes on: contrib/libarchive ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/libarchive:r244821-259112 Index: contrib/libc++ =================================================================== --- contrib/libc++ (revision 259108) +++ contrib/libc++ (working copy) Property changes on: contrib/libc++ ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/libc++:r244821-259112 Index: contrib/libc-vis =================================================================== --- contrib/libc-vis (revision 259108) +++ contrib/libc-vis (working copy) Property changes on: contrib/libc-vis ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/libc-vis:r244821-259112 Index: contrib/libcxxrt =================================================================== --- contrib/libcxxrt (revision 259108) +++ contrib/libcxxrt (working copy) Property changes on: contrib/libcxxrt ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/libcxxrt:r244821-259112 Index: contrib/libexecinfo =================================================================== --- contrib/libexecinfo (revision 259108) +++ contrib/libexecinfo (working copy) Property changes on: contrib/libexecinfo ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/libexecinfo:r255832-259112 Merged /head/contrib/libexecinfo:r244821-252117,254686-254687 Merged /projects/random_number_generator/contrib/libexecinfo:r254613-255353 Index: contrib/libpcap =================================================================== --- contrib/libpcap (revision 259108) +++ contrib/libpcap (working copy) Property changes on: contrib/libpcap ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/libpcap:r244821-259112 Index: contrib/libstdc++ =================================================================== --- contrib/libstdc++ (revision 259108) +++ contrib/libstdc++ (working copy) Property changes on: contrib/libstdc++ ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/libstdc++:r244821-259112 Index: contrib/llvm/tools/clang =================================================================== --- contrib/llvm/tools/clang (revision 259108) +++ contrib/llvm/tools/clang (working copy) Property changes on: contrib/llvm/tools/clang ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/llvm/tools/clang:r244821-259112 Index: contrib/llvm/tools/lldb =================================================================== --- contrib/llvm/tools/lldb (revision 259108) +++ contrib/llvm/tools/lldb (working copy) Property changes on: contrib/llvm/tools/lldb ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/llvm/tools/lldb:r255832-259112 Merged /head/contrib/llvm/tools/lldb:r244821-254728 Index: contrib/llvm =================================================================== --- contrib/llvm (revision 259108) +++ contrib/llvm (working copy) Property changes on: contrib/llvm ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/llvm:r244821-259112 Index: contrib/mtree =================================================================== --- contrib/mtree (revision 259108) +++ contrib/mtree (working copy) Property changes on: contrib/mtree ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/mtree:r244821-259112 Index: contrib/ncurses =================================================================== --- contrib/ncurses (revision 259108) +++ contrib/ncurses (working copy) Property changes on: contrib/ncurses ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/ncurses:r244821-259112 Index: contrib/netcat =================================================================== --- contrib/netcat (revision 259108) +++ contrib/netcat (working copy) Property changes on: contrib/netcat ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/netcat:r244821-259112 Index: contrib/ntp =================================================================== --- contrib/ntp (revision 259108) +++ contrib/ntp (working copy) Property changes on: contrib/ntp ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/ntp:r244821-259112 Index: contrib/nvi =================================================================== --- contrib/nvi (revision 259108) +++ contrib/nvi (working copy) Property changes on: contrib/nvi ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/head_mfi/contrib/nvi:r233621 Merged /projects/random_number_generator/contrib/nvi:r254613-255353 Merged /projects/pmac_pmu/contrib/nvi:r244821-259112 Merged /projects/quota64/contrib/nvi:r184125-207707 Merged /projects/multi-fibv6/head/contrib/nvi:r230929-231848 Merged /vendor/resolver/dist/contrib/nvi:r1540-186085 Merged /projects/largeSMP/contrib/nvi:r221273-222812,222815-223757 Index: contrib/one-true-awk =================================================================== --- contrib/one-true-awk (revision 259108) +++ contrib/one-true-awk (working copy) Property changes on: contrib/one-true-awk ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/one-true-awk:r244821-259112 Index: contrib/openbsm =================================================================== --- contrib/openbsm (revision 259108) +++ contrib/openbsm (working copy) Property changes on: contrib/openbsm ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/openbsm:r244821-259112 Index: contrib/openpam =================================================================== --- contrib/openpam (revision 259108) +++ contrib/openpam (working copy) Property changes on: contrib/openpam ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/openpam:r244821-259112 Index: contrib/openresolv =================================================================== --- contrib/openresolv (revision 259108) +++ contrib/openresolv (working copy) Property changes on: contrib/openresolv ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/openresolv:r244821-259112 Index: contrib/pf =================================================================== --- contrib/pf (revision 259108) +++ contrib/pf (working copy) Property changes on: contrib/pf ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/pf:r244821-259112 Index: contrib/sendmail =================================================================== --- contrib/sendmail (revision 259108) +++ contrib/sendmail (working copy) Property changes on: contrib/sendmail ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/sendmail:r244821-259112 Index: contrib/serf =================================================================== --- contrib/serf (revision 259108) +++ contrib/serf (working copy) Property changes on: contrib/serf ___________________________________________________________________ Modified: svn:mergeinfo Merged /head/contrib/serf:r244821-251885 Merged /projects/random_number_generator/contrib/serf:r254613-255353 Merged /projects/pmac_pmu/contrib/serf:r252132-259112 Index: contrib/subversion =================================================================== --- contrib/subversion (revision 259108) +++ contrib/subversion (working copy) Property changes on: contrib/subversion ___________________________________________________________________ Modified: svn:mergeinfo Merged /head/contrib/subversion:r244821-250985 Merged /projects/pmac_pmu/contrib/subversion:r252132-259112 Index: contrib/tcpdump =================================================================== --- contrib/tcpdump (revision 259108) +++ contrib/tcpdump (working copy) Property changes on: contrib/tcpdump ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/tcpdump:r244821-259112 Index: contrib/tcsh =================================================================== --- contrib/tcsh (revision 259108) +++ contrib/tcsh (working copy) Property changes on: contrib/tcsh ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/tcsh:r244821-259112 Index: contrib/tnftp =================================================================== --- contrib/tnftp (revision 259108) +++ contrib/tnftp (working copy) Property changes on: contrib/tnftp ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/tnftp:r244821-259112 Index: contrib/top/install-sh =================================================================== --- contrib/top/install-sh (revision 259108) +++ contrib/top/install-sh (working copy) Property changes on: contrib/top/install-sh ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/top/install-sh:r244821-259112 Index: contrib/top =================================================================== --- contrib/top (revision 259108) +++ contrib/top (working copy) Property changes on: contrib/top ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/top:r244821-259112 Index: contrib/tzcode/stdtime =================================================================== --- contrib/tzcode/stdtime (revision 259108) +++ contrib/tzcode/stdtime (working copy) Property changes on: contrib/tzcode/stdtime ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/tzcode/stdtime:r244821-259112 Index: contrib/tzcode/zic =================================================================== --- contrib/tzcode/zic (revision 259108) +++ contrib/tzcode/zic (working copy) Property changes on: contrib/tzcode/zic ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/tzcode/zic:r244821-259112 Index: contrib/tzdata =================================================================== --- contrib/tzdata (revision 259108) +++ contrib/tzdata (working copy) Property changes on: contrib/tzdata ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/tzdata:r244821-259112 Index: contrib/unbound =================================================================== --- contrib/unbound (revision 259108) +++ contrib/unbound (working copy) Property changes on: contrib/unbound ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/unbound:r250993-259112 Index: contrib/wpa =================================================================== --- contrib/wpa (revision 259108) +++ contrib/wpa (working copy) Property changes on: contrib/wpa ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/wpa:r244821-259112 Index: contrib/xz =================================================================== --- contrib/xz (revision 259108) +++ contrib/xz (working copy) Property changes on: contrib/xz ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/contrib/xz:r244821-259112 Index: crypto/heimdal =================================================================== --- crypto/heimdal (revision 259108) +++ crypto/heimdal (working copy) Property changes on: crypto/heimdal ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/crypto/heimdal:r244821-259112 Index: crypto/openssh =================================================================== --- crypto/openssh (revision 259108) +++ crypto/openssh (working copy) Property changes on: crypto/openssh ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/crypto/openssh:r244821-259112 Index: crypto/openssl =================================================================== --- crypto/openssl (revision 259108) +++ crypto/openssl (working copy) Property changes on: crypto/openssl ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/crypto/openssl:r244821-259112 Index: etc =================================================================== --- etc (revision 259108) +++ etc (working copy) Property changes on: etc ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/head_mfi/etc:r233621 Merged /projects/random_number_generator/etc:r254613-256243 Merged /projects/pmac_pmu/etc:r244821-259112 Merged /projects/quota64/etc:r184125-207707 Merged /projects/multi-fibv6/head/etc:r230929-231848 Merged /vendor/resolver/dist/etc:r1540-186085 Merged /projects/largeSMP/etc:r221273-222812,222815-223757 Index: gnu/lib =================================================================== --- gnu/lib (revision 259108) +++ gnu/lib (working copy) Property changes on: gnu/lib ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/gnu/lib:r244821-259112 Index: gnu/usr.bin/binutils =================================================================== --- gnu/usr.bin/binutils (revision 259108) +++ gnu/usr.bin/binutils (working copy) Property changes on: gnu/usr.bin/binutils ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/gnu/usr.bin/binutils:r244821-259112 Index: gnu/usr.bin/cc/cc_tools =================================================================== --- gnu/usr.bin/cc/cc_tools (revision 259108) +++ gnu/usr.bin/cc/cc_tools (working copy) Property changes on: gnu/usr.bin/cc/cc_tools ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/gnu/usr.bin/cc/cc_tools:r244821-259112 Index: gnu/usr.bin/gdb =================================================================== --- gnu/usr.bin/gdb (revision 259108) +++ gnu/usr.bin/gdb (working copy) Property changes on: gnu/usr.bin/gdb ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/gnu/usr.bin/gdb:r244821-259112 Index: include =================================================================== --- include (revision 259108) +++ include (working copy) Property changes on: include ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/multi-fibv6/head/include:r230929-231848 Merged /vendor/resolver/dist/include:r1540-186085 Merged /projects/largeSMP/include:r221273-222812,222815-223757 Merged /projects/head_mfi/include:r233621 Merged /projects/random_number_generator/include:r254613-256243 Merged /projects/pmac_pmu/include:r244821-259112 Merged /projects/quota64/include:r184125-207707 Index: lib/libc/stdtime =================================================================== --- lib/libc/stdtime (revision 259108) +++ lib/libc/stdtime (working copy) Property changes on: lib/libc/stdtime ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/lib/libc/stdtime:r244821-259112 Index: lib/libc =================================================================== --- lib/libc (revision 259108) +++ lib/libc (working copy) Property changes on: lib/libc ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/lib/libc:r244821-259112 Index: lib/libutil =================================================================== --- lib/libutil (revision 259108) +++ lib/libutil (working copy) Property changes on: lib/libutil ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/lib/libutil:r244821-259112 Index: lib/libvmmapi =================================================================== --- lib/libvmmapi (revision 259108) +++ lib/libvmmapi (working copy) Property changes on: lib/libvmmapi ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/lib/libvmmapi:r250993-259112 Index: lib/libz =================================================================== --- lib/libz (revision 259108) +++ lib/libz (working copy) Property changes on: lib/libz ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/lib/libz:r244821-259112 Index: sbin/dumpon =================================================================== --- sbin/dumpon (revision 259108) +++ sbin/dumpon (working copy) Property changes on: sbin/dumpon ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sbin/dumpon:r244821-259112 Index: sbin/ipfw =================================================================== --- sbin/ipfw (revision 259108) +++ sbin/ipfw (working copy) Property changes on: sbin/ipfw ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sbin/ipfw:r244821-259112 Index: sbin =================================================================== --- sbin (revision 259108) +++ sbin (working copy) Property changes on: sbin ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sbin:r244821-259112 Index: share/examples/kld/random_adaptor/random_adaptor_example.c =================================================================== --- share/examples/kld/random_adaptor/random_adaptor_example.c (revision 259108) +++ share/examples/kld/random_adaptor/random_adaptor_example.c (working copy) Property changes on: share/examples/kld/random_adaptor/random_adaptor_example.c ___________________________________________________________________ Deleted: svn:mergeinfo Reverse-merged /projects/random_number_generator/share/examples/kld/random_adaptor/random_adaptor_example.c:r254784-256243 Reverse-merged /projects/quota64/share/examples/kld/random_adaptor/random_adaptor_example.c:r184125-207707 Reverse-merged /projects/multi-fibv6/head/share/examples/kld/random_adaptor/random_adaptor_example.c:r230929-231848 Reverse-merged /head/share/examples/kld/random_adaptor/random_adaptor_example.c:r254613-255351 Reverse-merged /vendor/resolver/dist/share/examples/kld/random_adaptor/random_adaptor_example.c:r1540-186085 Reverse-merged /projects/largeSMP/share/examples/kld/random_adaptor/random_adaptor_example.c:r221273-222812,222815-223757 Reverse-merged /projects/head_mfi/share/examples/kld/random_adaptor/random_adaptor_example.c:r233621 Index: share/man/man4/bhyve.4 =================================================================== --- share/man/man4/bhyve.4 (revision 259108) +++ share/man/man4/bhyve.4 (working copy) Property changes on: share/man/man4/bhyve.4 ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/share/man/man4/bhyve.4:r250993-259112 Index: share/man/man4 =================================================================== --- share/man/man4 (revision 259108) +++ share/man/man4 (working copy) Property changes on: share/man/man4 ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/share/man/man4:r244821-259112 Index: share/mk/bsd.arch.inc.mk =================================================================== --- share/mk/bsd.arch.inc.mk (revision 259108) +++ share/mk/bsd.arch.inc.mk (working copy) Property changes on: share/mk/bsd.arch.inc.mk ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/share/mk/bsd.arch.inc.mk:r244821-259112 Index: share/zoneinfo =================================================================== --- share/zoneinfo (revision 259108) +++ share/zoneinfo (working copy) Property changes on: share/zoneinfo ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/share/zoneinfo:r244821-259112 Index: sys/amd64/include/vmm.h =================================================================== --- sys/amd64/include/vmm.h (revision 259108) +++ sys/amd64/include/vmm.h (working copy) Property changes on: sys/amd64/include/vmm.h ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/amd64/include/vmm.h:r250993-259112 Index: sys/amd64/include/vmm_dev.h =================================================================== --- sys/amd64/include/vmm_dev.h (revision 259108) +++ sys/amd64/include/vmm_dev.h (working copy) Property changes on: sys/amd64/include/vmm_dev.h ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/amd64/include/vmm_dev.h:r250993-259112 Index: sys/amd64/include/vmm_instruction_emul.h =================================================================== --- sys/amd64/include/vmm_instruction_emul.h (revision 259108) +++ sys/amd64/include/vmm_instruction_emul.h (working copy) Property changes on: sys/amd64/include/vmm_instruction_emul.h ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/amd64/include/vmm_instruction_emul.h:r250993-259112 Index: sys/amd64/include/xen =================================================================== --- sys/amd64/include/xen (revision 259108) +++ sys/amd64/include/xen (working copy) Property changes on: sys/amd64/include/xen ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/amd64/include/xen:r244821-259112 Index: sys/amd64/vmm =================================================================== --- sys/amd64/vmm (revision 259108) +++ sys/amd64/vmm (working copy) Property changes on: sys/amd64/vmm ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/amd64/vmm:r250993-259112 Index: sys/boot/i386/efi =================================================================== --- sys/boot/i386/efi (revision 259108) +++ sys/boot/i386/efi (working copy) Property changes on: sys/boot/i386/efi ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/boot/i386/efi:r244821-259112 Index: sys/boot/ia64/efi =================================================================== --- sys/boot/ia64/efi (revision 259108) +++ sys/boot/ia64/efi (working copy) Property changes on: sys/boot/ia64/efi ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/boot/ia64/efi:r244821-259112 Index: sys/boot/ia64/ski =================================================================== --- sys/boot/ia64/ski (revision 259108) +++ sys/boot/ia64/ski (working copy) Property changes on: sys/boot/ia64/ski ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/boot/ia64/ski:r244821-259112 Index: sys/boot/powerpc/boot1.chrp =================================================================== --- sys/boot/powerpc/boot1.chrp (revision 259108) +++ sys/boot/powerpc/boot1.chrp (working copy) Property changes on: sys/boot/powerpc/boot1.chrp ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/boot/powerpc/boot1.chrp:r244821-259112 Index: sys/boot/powerpc/ofw =================================================================== --- sys/boot/powerpc/ofw (revision 259108) +++ sys/boot/powerpc/ofw (working copy) Property changes on: sys/boot/powerpc/ofw ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/boot/powerpc/ofw:r244821-259112 Index: sys/boot =================================================================== --- sys/boot (revision 259108) +++ sys/boot (working copy) Property changes on: sys/boot ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/boot:r244821-259112 Index: sys/cddl/contrib/opensolaris =================================================================== --- sys/cddl/contrib/opensolaris (revision 259108) +++ sys/cddl/contrib/opensolaris (working copy) Property changes on: sys/cddl/contrib/opensolaris ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/cddl/contrib/opensolaris:r244821-259112 Index: sys/conf/files.powerpc =================================================================== --- sys/conf/files.powerpc (revision 259108) +++ sys/conf/files.powerpc (working copy) @@ -107,6 +107,7 @@ powerpc/booke/trap.c optional booke powerpc/cpufreq/dfs.c optional cpufreq powerpc/cpufreq/pcr.c optional cpufreq aim +powerpc/cpufreq/pmufreq.c optional cpufreq aim powerpc/fpu/fpu_add.c optional fpu_emu powerpc/fpu/fpu_compare.c optional fpu_emu powerpc/fpu/fpu_div.c optional fpu_emu Index: sys/conf =================================================================== --- sys/conf (revision 259108) +++ sys/conf (working copy) Property changes on: sys/conf ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/conf:r244821-259112 Index: sys/contrib/dev/acpica/changes.txt =================================================================== --- sys/contrib/dev/acpica/changes.txt (revision 259108) +++ sys/contrib/dev/acpica/changes.txt (working copy) Property changes on: sys/contrib/dev/acpica/changes.txt ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/changes.txt:r244821-259112 Index: sys/contrib/dev/acpica/common =================================================================== --- sys/contrib/dev/acpica/common (revision 259108) +++ sys/contrib/dev/acpica/common (working copy) Property changes on: sys/contrib/dev/acpica/common ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/common:r244821-259112 Index: sys/contrib/dev/acpica/compiler =================================================================== --- sys/contrib/dev/acpica/compiler (revision 259108) +++ sys/contrib/dev/acpica/compiler (working copy) Property changes on: sys/contrib/dev/acpica/compiler ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/compiler:r244821-259112 Index: sys/contrib/dev/acpica/components/debugger =================================================================== --- sys/contrib/dev/acpica/components/debugger (revision 259108) +++ sys/contrib/dev/acpica/components/debugger (working copy) Property changes on: sys/contrib/dev/acpica/components/debugger ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/components/debugger:r244821-259112 Index: sys/contrib/dev/acpica/components/disassembler =================================================================== --- sys/contrib/dev/acpica/components/disassembler (revision 259108) +++ sys/contrib/dev/acpica/components/disassembler (working copy) Property changes on: sys/contrib/dev/acpica/components/disassembler ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/components/disassembler:r244821-259112 Index: sys/contrib/dev/acpica/components/dispatcher =================================================================== --- sys/contrib/dev/acpica/components/dispatcher (revision 259108) +++ sys/contrib/dev/acpica/components/dispatcher (working copy) Property changes on: sys/contrib/dev/acpica/components/dispatcher ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/components/dispatcher:r244821-259112 Index: sys/contrib/dev/acpica/components/events =================================================================== --- sys/contrib/dev/acpica/components/events (revision 259108) +++ sys/contrib/dev/acpica/components/events (working copy) Property changes on: sys/contrib/dev/acpica/components/events ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/components/events:r244821-259112 Index: sys/contrib/dev/acpica/components/executer =================================================================== --- sys/contrib/dev/acpica/components/executer (revision 259108) +++ sys/contrib/dev/acpica/components/executer (working copy) Property changes on: sys/contrib/dev/acpica/components/executer ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/components/executer:r244821-259112 Index: sys/contrib/dev/acpica/components/hardware =================================================================== --- sys/contrib/dev/acpica/components/hardware (revision 259108) +++ sys/contrib/dev/acpica/components/hardware (working copy) Property changes on: sys/contrib/dev/acpica/components/hardware ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/components/hardware:r244821-259112 Index: sys/contrib/dev/acpica/components/namespace =================================================================== --- sys/contrib/dev/acpica/components/namespace (revision 259108) +++ sys/contrib/dev/acpica/components/namespace (working copy) Property changes on: sys/contrib/dev/acpica/components/namespace ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/components/namespace:r244821-259112 Index: sys/contrib/dev/acpica/components/parser =================================================================== --- sys/contrib/dev/acpica/components/parser (revision 259108) +++ sys/contrib/dev/acpica/components/parser (working copy) Property changes on: sys/contrib/dev/acpica/components/parser ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/components/parser:r244821-259112 Index: sys/contrib/dev/acpica/components/resources =================================================================== --- sys/contrib/dev/acpica/components/resources (revision 259108) +++ sys/contrib/dev/acpica/components/resources (working copy) Property changes on: sys/contrib/dev/acpica/components/resources ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/components/resources:r244821-259112 Index: sys/contrib/dev/acpica/components/tables =================================================================== --- sys/contrib/dev/acpica/components/tables (revision 259108) +++ sys/contrib/dev/acpica/components/tables (working copy) Property changes on: sys/contrib/dev/acpica/components/tables ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/components/tables:r244821-259112 Index: sys/contrib/dev/acpica/components/utilities =================================================================== --- sys/contrib/dev/acpica/components/utilities (revision 259108) +++ sys/contrib/dev/acpica/components/utilities (working copy) Property changes on: sys/contrib/dev/acpica/components/utilities ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/components/utilities:r244821-259112 Index: sys/contrib/dev/acpica/include =================================================================== --- sys/contrib/dev/acpica/include (revision 259108) +++ sys/contrib/dev/acpica/include (working copy) Property changes on: sys/contrib/dev/acpica/include ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/include:r244821-259112 Index: sys/contrib/dev/acpica/os_specific =================================================================== --- sys/contrib/dev/acpica/os_specific (revision 259108) +++ sys/contrib/dev/acpica/os_specific (working copy) Property changes on: sys/contrib/dev/acpica/os_specific ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica/os_specific:r244821-259112 Index: sys/contrib/dev/acpica =================================================================== --- sys/contrib/dev/acpica (revision 259108) +++ sys/contrib/dev/acpica (working copy) Property changes on: sys/contrib/dev/acpica ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/dev/acpica:r244821-259112 Index: sys/contrib/ipfilter/netinet/ip_fil_freebsd.c =================================================================== --- sys/contrib/ipfilter/netinet/ip_fil_freebsd.c (revision 259108) +++ sys/contrib/ipfilter/netinet/ip_fil_freebsd.c (working copy) Property changes on: sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c:r244821-259112 Index: sys/contrib/ipfilter/netinet/ip_raudio_pxy.c =================================================================== --- sys/contrib/ipfilter/netinet/ip_raudio_pxy.c (revision 259108) +++ sys/contrib/ipfilter/netinet/ip_raudio_pxy.c (working copy) Property changes on: sys/contrib/ipfilter/netinet/ip_raudio_pxy.c ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/largeSMP/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r221273-222812,222815-223757 Merged /user/dfr/xenhvm/6/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r189304,189451 Merged /user/peter/kinfo/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r185413-185547 Merged /user/dfr/xenhvm/7/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r188574-189614 Merged /user/np/cxl_tuning/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r254336,254386,254736 Merged /user/mav/ata/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r189793-190578 Merged /user/alfred/9-alfred/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r242488 Merged /user/thompsa/usb/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r187190 Merged /projects/head_mfi/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r227068,227574,227579-227580,227612,227905,228108,228208,228279,228310,228320,231988,232412-232414,232888,233016,233620 Merged /projects/cambria/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r186008-186350 Merged /projects/random_number_generator/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r254613-255353 Merged /user/piso/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r186543,186723,186725-186726,186742,186770-186771,186774,186777-186779,187984-187985,190555,190572,190589,190592,190614,190625,190830 Merged /projects/pmac_pmu/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r244821-259112 Merged /projects/quota64/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r184125-207707 Merged /user/jimharris/isci/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r228377-230794 Merged /user/piso/ipfw/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r190918,190921,190923,190926 Merged /projects/multi-fibv6/head/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c:r230929-231848 Index: sys/contrib/ipfilter =================================================================== --- sys/contrib/ipfilter (revision 259108) +++ sys/contrib/ipfilter (working copy) Property changes on: sys/contrib/ipfilter ___________________________________________________________________ Modified: svn:mergeinfo Merged /user/dfr/xenhvm/7/sys/contrib/ipfilter:r188574-189614 Merged /user/np/cxl_tuning/sys/contrib/ipfilter:r254336,254386,254736 Merged /user/mav/ata/sys/contrib/ipfilter:r189793-190578 Merged /user/alfred/9-alfred/sys/contrib/ipfilter:r242488 Merged /user/thompsa/usb/sys/contrib/ipfilter:r187190 Merged /projects/head_mfi/sys/contrib/ipfilter:r227068,227574,227579-227580,227612,227905,228108,228208,228279,228310,228320,231988,232412-232414,232888,233016,233620 Merged /projects/cambria/sys/contrib/ipfilter:r186008-186350 Merged /projects/random_number_generator/sys/contrib/ipfilter:r254613-255353 Merged /user/piso/sys/contrib/ipfilter:r186543,186723,186725-186726,186742,186770-186771,186774,186777-186779,187984-187985,190555,190572,190589,190592,190614,190625,190830 Merged /projects/pmac_pmu/sys/contrib/ipfilter:r244821-259112 Merged /projects/quota64/sys/contrib/ipfilter:r184125-207707 Merged /user/jimharris/isci/sys/contrib/ipfilter:r228377-230794 Merged /user/piso/ipfw/sys/contrib/ipfilter:r190918,190921,190923,190926 Merged /projects/multi-fibv6/head/sys/contrib/ipfilter:r230929-231848 Merged /user/dfr/xenhvm/6/sys/contrib/ipfilter:r189304,189451 Merged /user/peter/kinfo/sys/contrib/ipfilter:r185413-185547 Merged /projects/largeSMP/sys/contrib/ipfilter:r221273-222812,222815-223757 Index: sys/contrib/libfdt =================================================================== --- sys/contrib/libfdt (revision 259108) +++ sys/contrib/libfdt (working copy) Property changes on: sys/contrib/libfdt ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/libfdt:r244821-259112 Index: sys/contrib/octeon-sdk =================================================================== --- sys/contrib/octeon-sdk (revision 259108) +++ sys/contrib/octeon-sdk (working copy) Property changes on: sys/contrib/octeon-sdk ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/octeon-sdk:r244821-259112 Index: sys/contrib/x86emu =================================================================== --- sys/contrib/x86emu (revision 259108) +++ sys/contrib/x86emu (working copy) Property changes on: sys/contrib/x86emu ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/contrib/x86emu:r244821-259112 Index: sys/dev/bvm =================================================================== --- sys/dev/bvm (revision 259108) +++ sys/dev/bvm (working copy) Property changes on: sys/dev/bvm ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/dev/bvm:r250993-259112 Index: sys/dev/fdt/fdt_ic_if.m =================================================================== --- sys/dev/fdt/fdt_ic_if.m (revision 259108) +++ sys/dev/fdt/fdt_ic_if.m (working copy) Property changes on: sys/dev/fdt/fdt_ic_if.m ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/cambria/sys/dev/fdt/fdt_ic_if.m:r186008-186350 Merged /projects/random_number_generator/sys/dev/fdt/fdt_ic_if.m:r254613-256400 Merged /user/piso/sys/dev/fdt/fdt_ic_if.m:r186543,186723,186725-186726,186742,186770-186771,186774,186777-186779,187984-187985,190555,190572,190589,190592,190614,190625,190830 Merged /projects/pmac_pmu/sys/dev/fdt/fdt_ic_if.m:r257925-259112 Merged /projects/quota64/sys/dev/fdt/fdt_ic_if.m:r184125-207707 Merged /user/piso/ipfw/sys/dev/fdt/fdt_ic_if.m:r190918,190921,190923,190926 Merged /user/jimharris/isci/sys/dev/fdt/fdt_ic_if.m:r228377-230794 Merged /projects/multi-fibv6/head/sys/dev/fdt/fdt_ic_if.m:r230929-231848 Merged /head/sys/dev/fdt/fdt_ic_if.m:r244821-255831 Merged /projects/largeSMP/sys/dev/fdt/fdt_ic_if.m:r221273-222812,222815-223757 Merged /user/dfr/xenhvm/6/sys/dev/fdt/fdt_ic_if.m:r189304,189451 Merged /user/peter/kinfo/sys/dev/fdt/fdt_ic_if.m:r185413-185547 Merged /user/dfr/xenhvm/7/sys/dev/fdt/fdt_ic_if.m:r188574-189614 Merged /user/np/cxl_tuning/sys/dev/fdt/fdt_ic_if.m:r254336,254386,254736 Merged /user/mav/ata/sys/dev/fdt/fdt_ic_if.m:r189793-190578 Merged /user/alfred/9-alfred/sys/dev/fdt/fdt_ic_if.m:r242488 Merged /user/thompsa/usb/sys/dev/fdt/fdt_ic_if.m:r187190 Merged /projects/head_mfi/sys/dev/fdt/fdt_ic_if.m:r227068,227574,227579-227580,227612,227905,228108,228208,228279,228310,228320,231988,232412-232414,232888,233016,233620 Index: sys/dev/hyperv =================================================================== --- sys/dev/hyperv (revision 259108) +++ sys/dev/hyperv (working copy) Property changes on: sys/dev/hyperv ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/cambria/sys/dev/hyperv:r186008-186350 Merged /projects/random_number_generator/sys/dev/hyperv:r254613-255353 Merged /user/piso/sys/dev/hyperv:r186543,186723,186725-186726,186742,186770-186771,186774,186777-186779,187984-187985,190555,190572,190589,190592,190614,190625,190830 Merged /projects/pmac_pmu/sys/dev/hyperv:r255832-259112 Merged /projects/quota64/sys/dev/hyperv:r184125-207707 Merged /user/piso/ipfw/sys/dev/hyperv:r190918,190921,190923,190926 Merged /user/jimharris/isci/sys/dev/hyperv:r228377-230794 Merged /projects/multi-fibv6/head/sys/dev/hyperv:r230929-231848 Merged /head/sys/dev/hyperv:r244821-252117,254686-254687 Merged /projects/largeSMP/sys/dev/hyperv:r221273-222812,222815-223757 Merged /user/dfr/xenhvm/6/sys/dev/hyperv:r189304,189451 Merged /user/peter/kinfo/sys/dev/hyperv:r185413-185547 Merged /user/dfr/xenhvm/7/sys/dev/hyperv:r188574-189614 Merged /user/np/cxl_tuning/sys/dev/hyperv:r254336,254386,254736 Merged /user/mav/ata/sys/dev/hyperv:r189793-190578 Merged /user/alfred/9-alfred/sys/dev/hyperv:r242488 Merged /user/thompsa/usb/sys/dev/hyperv:r187190 Merged /projects/head_mfi/sys/dev/hyperv:r227068,227574,227579-227580,227612,227905,228108,228208,228279,228310,228320,231988,232412-232414,232888,233016,233620 Index: sys/dev/pci/hostb_pci.c =================================================================== --- sys/dev/pci/hostb_pci.c (revision 259108) +++ sys/dev/pci/hostb_pci.c (working copy) @@ -264,4 +264,4 @@ static devclass_t pci_hostb_devclass; -DRIVER_MODULE(hostb, pci, pci_hostb_driver, pci_hostb_devclass, 0, 0); +EARLY_DRIVER_MODULE(hostb, pci, pci_hostb_driver, pci_hostb_devclass, 0, 0, BUS_PASS_BUS); Index: sys/dev/pci/pci.c =================================================================== --- sys/dev/pci/pci.c (revision 259108) +++ sys/dev/pci/pci.c (working copy) @@ -182,7 +182,7 @@ DEFINE_CLASS_0(pci, pci_driver, pci_methods, sizeof(struct pci_softc)); static devclass_t pci_devclass; -DRIVER_MODULE(pci, pcib, pci_driver, pci_devclass, pci_modevent, NULL); +EARLY_DRIVER_MODULE(pci, pcib, pci_driver, pci_devclass, pci_modevent, NULL, BUS_PASS_BUS); MODULE_VERSION(pci, 1); static char *pci_vendordata; @@ -3457,7 +3457,7 @@ case PCIC_MEMORY: case PCIC_BRIDGE: case PCIC_BASEPERIPH: - DEVICE_RESUME(child); + error = DEVICE_RESUME(child); break; } } @@ -3470,11 +3470,11 @@ case PCIC_BASEPERIPH: break; default: - DEVICE_RESUME(child); + error = DEVICE_RESUME(child); } } free(devlist, M_TEMP); - return (0); + return (error); } static void Index: sys/kern/subr_bus.c =================================================================== --- sys/kern/subr_bus.c (revision 259108) +++ sys/kern/subr_bus.c (working copy) @@ -91,6 +91,7 @@ device_t *devices; /* array of devices indexed by unit */ int maxunit; /* size of devices array */ int flags; + int pass; #define DC_HAS_CHILDREN 1 struct sysctl_ctx_list sysctl_ctx; @@ -135,6 +136,7 @@ #define DF_DONENOMATCH 0x20 /* don't execute DEVICE_NOMATCH again */ #define DF_EXTERNALSOFTC 0x40 /* softc not allocated by us */ #define DF_REBID 0x80 /* Can rebid after attach */ +#define DF_SUSPENDED 0x100 /* Device is suspended. */ u_int order; /**< order from device_add_child_ordered() */ void *ivars; /**< instance variables */ void *softc; /**< current driver's variables */ @@ -1084,6 +1086,7 @@ TAILQ_INSERT_TAIL(&dc->drivers, dl, link); driver->refs++; /* XXX: kobj_mtx */ dl->pass = pass; + (*dcp)->pass = pass; /* Used in suspend/resume. */ driver_register_pass(dl); devclass_driver_added(dc, driver); @@ -3596,19 +3599,29 @@ bus_generic_suspend(device_t dev) { int error; + int again = 0; device_t child, child2; TAILQ_FOREACH(child, &dev->children, link) { - error = DEVICE_SUSPEND(child); - if (error) { - for (child2 = TAILQ_FIRST(&dev->children); - child2 && child2 != child; - child2 = TAILQ_NEXT(child2, link)) - DEVICE_RESUME(child2); - return (error); + if (!(child->flags & DF_SUSPENDED)) { + error = DEVICE_SUSPEND(child); + if (error && error != EAGAIN) { + for (child2 = TAILQ_FIRST(&dev->children); + child2 && child2 != child; + child2 = TAILQ_NEXT(child2, link)) { + DEVICE_RESUME(child2); + child2->flags &= ~DF_SUSPENDED; + } + return (error); + } + if (error == EAGAIN) { + again = EAGAIN; + continue; + } + child->flags |= DF_SUSPENDED; } } - return (0); + return (again); } /** @@ -3621,12 +3634,31 @@ bus_generic_resume(device_t dev) { device_t child; + int error = 0; TAILQ_FOREACH(child, &dev->children, link) { - DEVICE_RESUME(child); - /* if resume fails, there's nothing we can usefully do... */ + if (child->flags & DF_SUSPENDED) { + if (child->devclass->pass > bus_current_pass) { + if (bootverbose) + printf("Skipping: %s: %d, %d\n", + child->nameunit, + child->devclass->pass, + bus_current_pass); + error = EAGAIN; + continue; + } + if (DEVICE_RESUME(child) == EAGAIN) { + error = EAGAIN; + continue; + } + /* if resume fails, there's nothing we can usefully do... */ + child->flags &= ~DF_SUSPENDED; + } + else + if (bootverbose) + printf("Skipping %s: already resumed\n", child->nameunit); } - return (0); + return (error); } /** @@ -4431,9 +4463,17 @@ static int root_resume(device_t dev) { - int error; + struct driverlink *dl; + int error = 0; - error = bus_generic_resume(dev); + TAILQ_FOREACH(dl, &passes, passlink) { + bus_current_pass = dl->pass; + error = bus_generic_resume(dev); + + if (error != EAGAIN) + break; + } + if (error == 0) devctl_notify("kern", "power", "resume", NULL); return (error); @@ -4440,6 +4480,22 @@ } static int +root_suspend(device_t dev) +{ + struct driverlink *dl; + int error = 0; + + TAILQ_FOREACH_REVERSE(dl, &passes, driver_list, passlink) { + bus_current_pass = dl->pass; + error = bus_generic_suspend(dev); + if (error != EAGAIN) + break; + } + + return (error); +} + +static int root_print_child(device_t dev, device_t child) { int retval = 0; @@ -4476,7 +4532,7 @@ static kobj_method_t root_methods[] = { /* Device interface */ KOBJMETHOD(device_shutdown, bus_generic_shutdown), - KOBJMETHOD(device_suspend, bus_generic_suspend), + KOBJMETHOD(device_suspend, root_suspend), KOBJMETHOD(device_resume, root_resume), /* Bus interface */ Index: sys/modules/hyperv =================================================================== --- sys/modules/hyperv (revision 259108) +++ sys/modules/hyperv (working copy) Property changes on: sys/modules/hyperv ___________________________________________________________________ Modified: svn:mergeinfo Merged /head/sys/modules/hyperv:r244821-251772 Merged /projects/pmac_pmu/sys/modules/hyperv:r255832-259112 Index: sys/modules/vmm =================================================================== --- sys/modules/vmm (revision 259108) +++ sys/modules/vmm (working copy) Property changes on: sys/modules/vmm ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys/modules/vmm:r250993-259112 Index: sys/powerpc/aim/mp_cpudep.c =================================================================== --- sys/powerpc/aim/mp_cpudep.c (revision 259108) +++ sys/powerpc/aim/mp_cpudep.c (working copy) @@ -322,17 +322,13 @@ mtspr(SPR_CELL_TSRL, bsp_state[5]); break; - case MPC7450: - case MPC7455: - case MPC7457: - /* Only MPC745x CPUs have an L3 cache. */ - reg = mpc745x_l3_enable(bsp_state[3]); - - /* Fallthrough */ case MPC7400: case MPC7410: case MPC7447A: case MPC7448: + case MPC7450: + case MPC7455: + case MPC7457: /* XXX: Program the CPU ID into PIR */ __asm __volatile("mtspr 1023,%0" :: "r"(PCPU_GET(cpuid))); @@ -342,6 +338,17 @@ mtspr(SPR_HID0, bsp_state[0]); isync(); mtspr(SPR_HID1, bsp_state[1]); isync(); + /* Now enable the L3 cache. */ + switch (vers) { + case MPC7450: + case MPC7455: + case MPC7457: + /* Only MPC745x CPUs have an L3 cache. */ + reg = mpc745x_l3_enable(bsp_state[3]); + default: + break; + } + reg = mpc74xx_l2_enable(bsp_state[2]); reg = mpc74xx_l1d_enable(); reg = mpc74xx_l1i_enable(); Index: sys/powerpc/include/cpu.h =================================================================== --- sys/powerpc/include/cpu.h (revision 259108) +++ sys/powerpc/include/cpu.h (working copy) @@ -98,4 +98,6 @@ void fork_trampoline(void); void swi_vm(void *); +void flush_disable_caches(void); + #endif /* _MACHINE_CPU_H_ */ Index: sys/powerpc/include/dbdma.h =================================================================== --- sys/powerpc/include/dbdma.h (revision 259108) +++ sys/powerpc/include/dbdma.h (working copy) @@ -147,4 +147,7 @@ void dbdma_sync_commands(dbdma_channel_t *chan, bus_dmasync_op_t op); +void dbdma_save_state(dbdma_channel_t *chan); +void dbdma_restore_state(dbdma_channel_t *chan); + #endif /* _MACHINE_DBDMA_H_ */ Index: sys/powerpc/include/openpicreg.h =================================================================== --- sys/powerpc/include/openpicreg.h (revision 259108) +++ sys/powerpc/include/openpicreg.h (working copy) @@ -99,6 +99,7 @@ */ /* interrupt vector/priority reg */ +#define OPENPIC_SRC_VECTOR_COUNT 64 #ifndef OPENPIC_SRC_VECTOR #define OPENPIC_SRC_VECTOR(irq) (0x10000 + (irq) * 0x20) #endif Index: sys/powerpc/include/openpicvar.h =================================================================== --- sys/powerpc/include/openpicvar.h (revision 259108) +++ sys/powerpc/include/openpicvar.h (working copy) @@ -32,6 +32,14 @@ #define OPENPIC_IRQMAX 256 /* h/w allows more */ +/* Names match the macros in openpicreg.h. */ +struct openpic_timer { + uint32_t tcnt; + uint32_t tbase; + uint32_t tvec; + uint32_t tdst; +}; + struct openpic_softc { device_t sc_dev; struct resource *sc_memr; @@ -45,6 +53,14 @@ u_int sc_ncpu; u_int sc_nirq; int sc_psim; + + /* Saved states. */ + uint32_t sc_saved_config; + uint32_t sc_saved_ipis[4]; + uint32_t sc_saved_prios[4]; + struct openpic_timer sc_saved_timers[OPENPIC_TIMERS]; + uint32_t sc_saved_vectors[OPENPIC_SRC_VECTOR_COUNT]; + }; extern devclass_t openpic_devclass; @@ -66,4 +82,7 @@ void openpic_mask(device_t, u_int); void openpic_unmask(device_t, u_int); +int openpic_suspend(device_t dev); +int openpic_resume(device_t dev); + #endif /* _POWERPC_OPENPICVAR_H_ */ Index: sys/powerpc/include/pcpu.h =================================================================== --- sys/powerpc/include/pcpu.h (revision 259108) +++ sys/powerpc/include/pcpu.h (working copy) @@ -49,7 +49,8 @@ uint32_t pc_ipimask; \ register_t pc_tempsave[CPUSAVE_LEN]; \ register_t pc_disisave[CPUSAVE_LEN]; \ - register_t pc_dbsave[CPUSAVE_LEN]; + register_t pc_dbsave[CPUSAVE_LEN]; \ + void *pc_restore; #define PCPU_MD_AIM32_FIELDS \ /* char __pad[0] */ Index: sys/powerpc/include/spr.h =================================================================== --- sys/powerpc/include/spr.h (revision 259108) +++ sys/powerpc/include/spr.h (working copy) @@ -519,6 +519,8 @@ #define MSSCR0_EMODE 0x00200000 /* 10: MPX bus mode (read-only) */ #define MSSCR0_ABD 0x00100000 /* 11: address bus driven (read-only) */ #define MSSCR0_MBZ 0x000fffff /* 12-31: must be zero */ +#define MSSCR0_L2PFE 0x00000003 /* 30-31: L2 prefetch enable */ +#define SPR_LDSTCR 0x3f8 /* .6. Load/Store Control Register */ #define SPR_L2PM 0x3f8 /* .6. L2 Private Memory Control Register */ #define SPR_L2CR 0x3f9 /* .6. L2 Control Register */ #define L2CR_L2E 0x80000000 /* 0: L2 enable */ @@ -543,6 +545,7 @@ Setting this bit disables instruction caching. */ #define L2CR_L2I 0x00200000 /* 10: L2 global invalidate. */ +#define L2CR_L2IO_7450 0x00010000 /* 11: L2 instruction-only (MPC745x). */ #define L2CR_L2CTL 0x00100000 /* 11: L2 RAM control (ZZ enable). Enables automatic operation of the L2ZZ (low-power mode) signal. */ @@ -549,6 +552,7 @@ #define L2CR_L2WT 0x00080000 /* 12: L2 write-through. */ #define L2CR_L2TS 0x00040000 /* 13: L2 test support. */ #define L2CR_L2OH 0x00030000 /* 14-15: L2 output hold. */ +#define L2CR_L2DO_7450 0x00010000 /* 15: L2 data-only (MPC745x). */ #define L2CR_L2SL 0x00008000 /* 16: L2 DLL slow. */ #define L2CR_L2DF 0x00004000 /* 17: L2 differential clock. */ #define L2CR_L2BYP 0x00002000 /* 18: L2 DLL bypass. */ Index: sys/powerpc/ofw/ofw_pcib_pci.c =================================================================== --- sys/powerpc/ofw/ofw_pcib_pci.c (revision 259108) +++ sys/powerpc/ofw/ofw_pcib_pci.c (working copy) @@ -83,7 +83,7 @@ DEFINE_CLASS_1(pcib, ofw_pcib_pci_driver, ofw_pcib_pci_methods, sizeof(struct ofw_pcib_softc), pcib_driver); -DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_pci_driver, pcib_devclass, 0, 0); +EARLY_DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_pci_driver, pcib_devclass, 0, 0, BUS_PASS_BUS); static int ofw_pcib_pci_probe(device_t dev) Index: sys/powerpc/ofw/ofw_pcibus.c =================================================================== --- sys/powerpc/ofw/ofw_pcibus.c (revision 259108) +++ sys/powerpc/ofw/ofw_pcibus.c (working copy) @@ -93,7 +93,7 @@ DEFINE_CLASS_1(pci, ofw_pcibus_driver, ofw_pcibus_methods, sizeof(struct pci_softc), pci_driver); -DRIVER_MODULE(ofw_pcibus, pcib, ofw_pcibus_driver, pci_devclass, 0, 0); +EARLY_DRIVER_MODULE(ofw_pcibus, pcib, ofw_pcibus_driver, pci_devclass, 0, 0, BUS_PASS_BUS); MODULE_VERSION(ofw_pcibus, 1); MODULE_DEPEND(ofw_pcibus, pci, 1, 1, 1); Index: sys/powerpc/ofw/openpic_ofw.c =================================================================== --- sys/powerpc/ofw/openpic_ofw.c (revision 259108) +++ sys/powerpc/ofw/openpic_ofw.c (working copy) @@ -51,6 +51,7 @@ #include <sys/rman.h> +#include <machine/openpicreg.h> #include <machine/openpicvar.h> #include "pic_if.h" @@ -68,6 +69,8 @@ /* Device interface */ DEVMETHOD(device_probe, openpic_ofw_probe), DEVMETHOD(device_attach, openpic_ofw_attach), + DEVMETHOD(device_suspend, openpic_suspend), + DEVMETHOD(device_resume, openpic_resume), /* PIC interface */ DEVMETHOD(pic_bind, openpic_bind), Index: sys/powerpc/powermac/ata_macio.c =================================================================== --- sys/powerpc/powermac/ata_macio.c (revision 259108) +++ sys/powerpc/powermac/ata_macio.c (working copy) @@ -114,11 +114,15 @@ static int ata_macio_setmode(device_t dev, int target, int mode); static int ata_macio_attach(device_t dev); static int ata_macio_begin_transaction(struct ata_request *request); +static int ata_macio_suspend(device_t dev); +static int ata_macio_resume(device_t dev); static device_method_t ata_macio_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ata_macio_probe), DEVMETHOD(device_attach, ata_macio_attach), + DEVMETHOD(device_suspend, ata_macio_suspend), + DEVMETHOD(device_resume, ata_macio_resume), /* ATA interface */ DEVMETHOD(ata_setmode, ata_macio_setmode), @@ -336,3 +340,34 @@ return ata_begin_transaction(request); } + +static int +ata_macio_suspend(device_t dev) +{ + struct ata_dbdma_channel *ch = device_get_softc(dev); + int error; + + if (!ch->sc_ch.attached) + return (0); + + error = ata_suspend(dev); + dbdma_save_state(ch->dbdma); + + return (error); +} + +static int +ata_macio_resume(device_t dev) +{ + struct ata_dbdma_channel *ch = device_get_softc(dev); + int error; + + if (!ch->sc_ch.attached) + return (0); + + dbdma_restore_state(ch->dbdma); + error = ata_resume(dev); + + return (error); +} + Index: sys/powerpc/powermac/atibl.c =================================================================== --- sys/powerpc/powermac/atibl.c (revision 259108) +++ sys/powerpc/powermac/atibl.c (working copy) @@ -52,10 +52,15 @@ #define RADEON_LVDS_BL_MOD_EN (1 << 16) #define RADEON_LVDS_DIGON (1 << 18) #define RADEON_LVDS_BLON (1 << 19) +#define RADEON_LVDS_PLL_CNTL 0x02d4 +#define RADEON_LVDS_PLL_EN (1 << 16) +#define RADEON_LVDS_PLL_RESET (1 << 17) +#define RADEON_PIXCLKS_CNTL 0x002d +#define RADEON_PIXCLK_LVDS_ALWAYS_ONb (1 << 14) struct atibl_softc { - device_t dev; struct resource *sc_memr; + int sc_level; }; static void atibl_identify(driver_t *driver, device_t parent); @@ -63,13 +68,17 @@ static int atibl_attach(device_t dev); static int atibl_setlevel(struct atibl_softc *sc, int newlevel); static int atibl_getlevel(struct atibl_softc *sc); +static int atibl_resume(device_t dev); +static int atibl_suspend(device_t dev); static int atibl_sysctl(SYSCTL_HANDLER_ARGS); static device_method_t atibl_methods[] = { /* Device interface */ - DEVMETHOD(device_identify, atibl_identify), - DEVMETHOD(device_probe, atibl_probe), - DEVMETHOD(device_attach, atibl_attach), + DEVMETHOD(device_identify, atibl_identify), + DEVMETHOD(device_probe, atibl_probe), + DEVMETHOD(device_attach, atibl_attach), + DEVMETHOD(device_suspend, atibl_suspend), + DEVMETHOD(device_resume, atibl_resume), {0, 0}, }; @@ -136,8 +145,8 @@ tree = device_get_sysctl_tree(dev); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "level", CTLTYPE_INT | CTLFLAG_RW, sc, 0, - atibl_sysctl, "I", "Backlight level (0-100)"); + "level", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + atibl_sysctl, "I", "Backlight level (0-100)"); return (0); } @@ -146,6 +155,8 @@ atibl_setlevel(struct atibl_softc *sc, int newlevel) { uint32_t lvds_gen_cntl; + uint32_t lvds_pll_cntl; + uint32_t pixclks_cntl; if (newlevel > 100) newlevel = 100; @@ -155,12 +166,37 @@ newlevel = (newlevel * 5) / 2 + 5; lvds_gen_cntl = bus_read_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL); - lvds_gen_cntl |= RADEON_LVDS_BL_MOD_EN; - lvds_gen_cntl &= ~RADEON_LVDS_BL_MOD_LEVEL_MASK; - lvds_gen_cntl |= (newlevel << RADEON_LVDS_BL_MOD_LEVEL_SHIFT) & - RADEON_LVDS_BL_MOD_LEVEL_MASK; - bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); + if (newlevel > 0) { + lvds_pll_cntl = bus_read_4(sc->sc_memr, RADEON_LVDS_PLL_CNTL); + lvds_pll_cntl |= RADEON_LVDS_PLL_EN; + bus_write_4(sc->sc_memr, RADEON_LVDS_PLL_CNTL, lvds_pll_cntl); + lvds_pll_cntl &= ~RADEON_LVDS_PLL_RESET; + bus_write_4(sc->sc_memr, RADEON_LVDS_PLL_CNTL, lvds_pll_cntl); + + lvds_gen_cntl &= ~(RADEON_LVDS_DISPLAY_DIS | + RADEON_LVDS_BL_MOD_LEVEL_MASK); + lvds_gen_cntl |= RADEON_LVDS_ON | RADEON_LVDS_EN | + RADEON_LVDS_DIGON | RADEON_LVDS_BLON; + lvds_gen_cntl |= (newlevel << RADEON_LVDS_BL_MOD_LEVEL_SHIFT) & + RADEON_LVDS_BL_MOD_LEVEL_MASK; + lvds_gen_cntl |= RADEON_LVDS_BL_MOD_EN; + DELAY(2000); + bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); + } else { + pixclks_cntl = bus_read_4(sc->sc_memr, RADEON_PIXCLKS_CNTL); + bus_write_4(sc->sc_memr, RADEON_PIXCLKS_CNTL, + pixclks_cntl & ~RADEON_PIXCLK_LVDS_ALWAYS_ONb); + lvds_gen_cntl |= RADEON_LVDS_DISPLAY_DIS; + lvds_gen_cntl &= RADEON_LVDS_BL_MOD_EN; + bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); + lvds_gen_cntl &= ~(RADEON_LVDS_ON | RADEON_LVDS_EN); + DELAY(2000); + bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); + + bus_write_4(sc->sc_memr, RADEON_PIXCLKS_CNTL, pixclks_cntl); + } + return (0); } @@ -173,7 +209,7 @@ lvds_gen_cntl = bus_read_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL); level = ((lvds_gen_cntl & RADEON_LVDS_BL_MOD_LEVEL_MASK) >> - RADEON_LVDS_BL_MOD_LEVEL_SHIFT); + RADEON_LVDS_BL_MOD_LEVEL_SHIFT); level = ((level - 5) * 2) / 5; return (level); @@ -180,6 +216,31 @@ } static int +atibl_suspend(device_t dev) +{ + struct atibl_softc *sc; + + sc = device_get_softc(dev); + + sc->sc_level = atibl_getlevel(sc); + atibl_setlevel(sc, 0); + + return (0); +} + +static int +atibl_resume(device_t dev) +{ + struct atibl_softc *sc; + + sc = device_get_softc(dev); + + atibl_setlevel(sc, sc->sc_level); + + return (0); +} + +static int atibl_sysctl(SYSCTL_HANDLER_ARGS) { struct atibl_softc *sc; Index: sys/powerpc/powermac/cpcht.c =================================================================== --- sys/powerpc/powermac/cpcht.c (revision 259108) +++ sys/powerpc/powermac/cpcht.c (working copy) @@ -44,6 +44,7 @@ #include <machine/bus.h> #include <machine/intr_machdep.h> #include <machine/md_var.h> +#include <machine/openpicreg.h> #include <machine/openpicvar.h> #include <machine/pio.h> #include <machine/resource.h> Index: sys/powerpc/powermac/dbdma.c =================================================================== --- sys/powerpc/powermac/dbdma.c (revision 259108) +++ sys/powerpc/powermac/dbdma.c (working copy) @@ -343,6 +343,31 @@ bus_dmamap_sync(chan->sc_dmatag, chan->sc_dmamap, op); } +void +dbdma_save_state(dbdma_channel_t *chan) +{ + + chan->sc_saved_regs[0] = dbdma_read_reg(chan, CHAN_CMDPTR); + chan->sc_saved_regs[1] = dbdma_read_reg(chan, CHAN_CMDPTR_HI); + chan->sc_saved_regs[2] = dbdma_read_reg(chan, CHAN_INTR_SELECT); + chan->sc_saved_regs[3] = dbdma_read_reg(chan, CHAN_BRANCH_SELECT); + chan->sc_saved_regs[4] = dbdma_read_reg(chan, CHAN_WAIT_SELECT); + + dbdma_stop(chan); +} + +void +dbdma_restore_state(dbdma_channel_t *chan) +{ + + dbdma_wake(chan); + dbdma_write_reg(chan, CHAN_CMDPTR, chan->sc_saved_regs[0]); + dbdma_write_reg(chan, CHAN_CMDPTR_HI, chan->sc_saved_regs[1]); + dbdma_write_reg(chan, CHAN_INTR_SELECT, chan->sc_saved_regs[2]); + dbdma_write_reg(chan, CHAN_BRANCH_SELECT, chan->sc_saved_regs[3]); + dbdma_write_reg(chan, CHAN_WAIT_SELECT, chan->sc_saved_regs[4]); +} + static uint32_t dbdma_read_reg(dbdma_channel_t *chan, u_int offset) { Index: sys/powerpc/powermac/dbdmavar.h =================================================================== --- sys/powerpc/powermac/dbdmavar.h (revision 259108) +++ sys/powerpc/powermac/dbdmavar.h (working copy) @@ -60,6 +60,7 @@ bus_dma_tag_t sc_dmatag; bus_dmamap_t sc_dmamap; + uint32_t sc_saved_regs[5]; }; Index: sys/powerpc/powermac/macgpio.c =================================================================== --- sys/powerpc/powermac/macgpio.c (revision 259108) +++ sys/powerpc/powermac/macgpio.c (working copy) @@ -59,6 +59,9 @@ phandle_t sc_node; struct resource *sc_gpios; int sc_gpios_rid; + uint32_t sc_saved_gpio_levels[2]; + uint32_t sc_saved_gpios[GPIO_COUNT]; + uint32_t sc_saved_extint_gpios[GPIO_EXTINT_COUNT]; }; static MALLOC_DEFINE(M_MACGPIO, "macgpio", "macgpio device information"); @@ -74,6 +77,8 @@ static int macgpio_deactivate_resource(device_t, device_t, int, int, struct resource *); static ofw_bus_get_devinfo_t macgpio_get_devinfo; +static int macgpio_suspend(device_t dev); +static int macgpio_resume(device_t dev); /* * Bus interface definition @@ -84,8 +89,8 @@ DEVMETHOD(device_attach, macgpio_attach), DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_suspend, macgpio_suspend), + DEVMETHOD(device_resume, macgpio_resume), /* Bus interface */ DEVMETHOD(bus_print_child, macgpio_print_child), @@ -322,6 +327,42 @@ return (bus_deactivate_resource(bus, type, rid, res)); } +static int +macgpio_suspend(device_t dev) +{ + struct macgpio_softc *sc; + int i; + + sc = device_get_softc(dev); + sc->sc_saved_gpio_levels[0] = bus_read_4(sc->sc_gpios, GPIO_LEVELS_0); + sc->sc_saved_gpio_levels[1] = bus_read_4(sc->sc_gpios, GPIO_LEVELS_1); + + for (i = 0; i < GPIO_COUNT; i++) + sc->sc_saved_gpios[i] = bus_read_1(sc->sc_gpios, GPIO_BASE + i); + for (i = 0; i < GPIO_EXTINT_COUNT; i++) + sc->sc_saved_extint_gpios[i] = bus_read_1(sc->sc_gpios, GPIO_EXTINT_BASE + i); + + return (0); +} + +static int +macgpio_resume(device_t dev) +{ + struct macgpio_softc *sc; + int i; + + sc = device_get_softc(dev); + bus_write_4(sc->sc_gpios, GPIO_LEVELS_0, sc->sc_saved_gpio_levels[0]); + bus_write_4(sc->sc_gpios, GPIO_LEVELS_1, sc->sc_saved_gpio_levels[1]); + + for (i = 0; i < GPIO_COUNT; i++) + bus_write_1(sc->sc_gpios, GPIO_BASE + i, sc->sc_saved_gpios[i]); + for (i = 0; i < GPIO_EXTINT_COUNT; i++) + bus_write_1(sc->sc_gpios, GPIO_EXTINT_BASE + i, sc->sc_saved_extint_gpios[i]); + + return (0); +} + uint8_t macgpio_read(device_t dev) { Index: sys/powerpc/powermac/macgpiovar.h =================================================================== --- sys/powerpc/powermac/macgpiovar.h (revision 259108) +++ sys/powerpc/powermac/macgpiovar.h (working copy) @@ -32,6 +32,12 @@ #define GPIO_EXTINT_BASE 0x08 #define GPIO_BASE 0x1a +#define GPIO_EXTINT_COUNT 0x12 +#define GPIO_COUNT 0x11 + +#define GPIO_LEVELS_0 0x50 +#define GPIO_LEVELS_1 0x54 + /* gpio bit definitions */ #define GPIO_DATA 0x01 /* GPIO data */ #define GPIO_LEVEL_RO 0x02 /* read-only level on pin */ Index: sys/powerpc/powermac/macio.c =================================================================== --- sys/powerpc/powermac/macio.c (revision 259108) +++ sys/powerpc/powermac/macio.c (working copy) @@ -69,6 +69,10 @@ /* FCR registers */ int sc_memrid; struct resource *sc_memr; + int sc_rev; + int sc_devid; + uint32_t saved_fcrs[6]; + uint32_t saved_mbcr; }; static MALLOC_DEFINE(M_MACIO, "macio", "macio device information"); @@ -75,6 +79,8 @@ static int macio_probe(device_t); static int macio_attach(device_t); +static int macio_suspend(device_t); +static int macio_resume(device_t); static int macio_print_child(device_t dev, device_t child); static void macio_probe_nomatch(device_t, device_t); static struct resource *macio_alloc_resource(device_t, device_t, int, int *, @@ -97,8 +103,8 @@ DEVMETHOD(device_attach, macio_attach), DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_suspend, macio_suspend), + DEVMETHOD(device_resume, macio_resume), /* Bus interface */ DEVMETHOD(bus_print_child, macio_print_child), @@ -133,7 +139,7 @@ devclass_t macio_devclass; -DRIVER_MODULE(macio, pci, macio_pci_driver, macio_devclass, 0, 0); +EARLY_DRIVER_MODULE(macio, pci, macio_pci_driver, macio_devclass, 0, 0, BUS_PASS_BUS); /* * PCI ID search table @@ -319,6 +325,13 @@ } /* + * If possible, get the device ID and revision ID. + */ + OF_getprop(root, "revision-id", &sc->sc_rev, sizeof(sc->sc_rev)); + OF_getprop(root, "device-id", &sc->sc_devid, sizeof(sc->sc_devid)); + + + /* * Iterate through the sub-devices */ for (child = OF_child(root); child != 0; child = OF_peer(child)) { @@ -649,3 +662,103 @@ return (0); } + +static int macio_suspend(device_t dev) +{ + int error; + uint32_t temp; + struct macio_softc *sc = device_get_softc(dev); + + error = bus_generic_suspend(dev); + + if (error) + return (error); + + if (bus_current_pass != BUS_PASS_BUS) { + return (EAGAIN); + } + powerpc_sync(); + + sc->saved_fcrs[0] = bus_read_4(sc->sc_memr, KEYLARGO_FCR0); + sc->saved_fcrs[1] = bus_read_4(sc->sc_memr, KEYLARGO_FCR1); + sc->saved_fcrs[2] = bus_read_4(sc->sc_memr, KEYLARGO_FCR2); + sc->saved_fcrs[3] = bus_read_4(sc->sc_memr, KEYLARGO_FCR3); + sc->saved_fcrs[4] = bus_read_4(sc->sc_memr, KEYLARGO_FCR4); + sc->saved_fcrs[5] = bus_read_4(sc->sc_memr, KEYLARGO_FCR5); + + temp = sc->saved_fcrs[0]; + temp |= FCR0_USB_REF_SUSPEND; + bus_write_4(sc->sc_memr, KEYLARGO_FCR0, temp); + eieio(); powerpc_sync(); + DELAY(1000); + + temp &= ~(FCR0_SCCA_ENABLE | FCR0_SCCB_ENABLE | + FCR0_SCC_CELL_ENABLE | FCR0_IRDA_ENABLE | + FCR0_IRDA_CLK32_ENABLE | + FCR0_IRDA_CLK19_ENABLE); + bus_write_4(sc->sc_memr, KEYLARGO_FCR0, temp); + eieio(); powerpc_sync(); + + if (sc->sc_devid == 0x22) { + temp = bus_read_4(sc->sc_memr, KEYLARGO_MEDIABAY); + sc->saved_mbcr = temp; + temp |= KEYLARGO_MB0_DEV_ENABLE; + bus_write_4(sc->sc_memr, KEYLARGO_MEDIABAY, temp); + eieio(); powerpc_sync(); + } + + temp = sc->saved_fcrs[1]; + temp &= ~(FCR1_AUDIO_SEL_22MCLK | FCR1_AUDIO_CLK_ENABLE | + FCR1_AUDIO_CLKOUT_ENABLE | FCR1_AUDIO_CELL_ENABLE | + FCR1_I2S0_CELL_ENABLE | FCR1_I2S0_CLK_ENABLE | + FCR1_I2S0_ENABLE | + FCR1_I2S1_CELL_ENABLE | FCR1_I2S1_CLK_ENABLE | + FCR1_I2S1_ENABLE | + FCR1_EIDE0_ENABLE | FCR1_EIDE0_RESET | + FCR1_EIDE1_ENABLE | FCR1_EIDE1_RESET | + FCR1_UIDE_ENABLE + ); + bus_write_4(sc->sc_memr, KEYLARGO_FCR1, temp); + eieio(); powerpc_sync(); + + temp = sc->saved_fcrs[2]; + temp &= ~FCR2_IOBUS_ENABLE; + bus_write_4(sc->sc_memr, KEYLARGO_FCR2, temp); + eieio(); powerpc_sync(); + + temp = sc->saved_fcrs[3]; + temp |= (FCR3_SHUTDOWN_PLL_KW6 | FCR3_SHUTDOWN_PLL_KW4 | + FCR3_SHUTDOWN_PLL_KW35 | FCR3_SHUTDOWN_PLL_KW12); + temp &= ~(FCR3_CLK_66_ENABLE | FCR3_CLK_49_ENABLE | + FCR3_CLK_45_ENABLE | FCR3_CLK_31_ENABLE | + FCR3_TMR_CLK18_ENABLE | FCR3_I2S1_CLK18_ENABLE | + FCR3_I2S0_CLK18_ENABLE | FCR3_VIA_CLK16_ENABLE); + if (sc->sc_rev >= 2) + temp |= (FCR3_SHUTDOWN_PLL_2X | FCR3_SHUTDOWN_PLL_TOTAL); + bus_write_4(sc->sc_memr, KEYLARGO_FCR3, temp); + eieio(); powerpc_sync(); + powerpc_sync(); + return (0); +} + +static int macio_resume(device_t dev) +{ + struct macio_softc *sc = device_get_softc(dev); + + if (bus_current_pass == BUS_PASS_BUS) { + if (sc->sc_devid == 0x22) + bus_write_4(sc->sc_memr, KEYLARGO_MEDIABAY, sc->saved_mbcr); + + bus_write_4(sc->sc_memr, KEYLARGO_FCR0, sc->saved_fcrs[0]); + bus_write_4(sc->sc_memr, KEYLARGO_FCR1, sc->saved_fcrs[1]); + bus_write_4(sc->sc_memr, KEYLARGO_FCR2, sc->saved_fcrs[2]); + bus_write_4(sc->sc_memr, KEYLARGO_FCR3, sc->saved_fcrs[3]); + bus_write_4(sc->sc_memr, KEYLARGO_FCR4, sc->saved_fcrs[4]); + bus_write_4(sc->sc_memr, KEYLARGO_FCR5, sc->saved_fcrs[5]); + } + + /* Let things settle. */ + DELAY(1000); + + return (bus_generic_resume(dev)); +} Index: sys/powerpc/powermac/maciovar.h =================================================================== --- sys/powerpc/powermac/maciovar.h (revision 259108) +++ sys/powerpc/powermac/maciovar.h (working copy) @@ -44,6 +44,9 @@ #define KEYLARGO_FCR0 0x38 #define KEYLARGO_FCR1 0x3c #define KEYLARGO_FCR2 0x40 +#define KEYLARGO_FCR3 0x44 +#define KEYLARGO_FCR4 0x48 +#define KEYLARGO_FCR5 0x4c #define FCR_ENET_ENABLE 0x60000000 #define FCR_ENET_RESET 0x80000000 @@ -52,6 +55,63 @@ #define KEYLARGO_GPIO_BASE 0x6a #define KEYLARGO_EXTINT_GPIO_REG_BASE 0x58 +#define KEYLARGO_MEDIABAY 0x34 +#define KEYLARGO_MB0_DEV_ENABLE 0x00001000 +#define KEYLARGO_MB0_DEV_POWER 0x00000400 +#define KEYLARGO_MB0_DEV_RESET 0x00000200 +#define KEYLARGO_MB0_ENABLE 0x00000100 +#define KEYLARGO_MB1_DEV_ENABLE 0x10000000 +#define KEYLARGO_MB1_DEV_POWER 0x04000000 +#define KEYLARGO_MB1_DEV_RESET 0x02000000 +#define KEYLARGO_MB1_ENABLE 0x01000000 + +#define FCR0_CHOOSE_SCCB 0x00000001 +#define FCR0_CHOOSE_SCCA 0x00000002 +#define FCR0_SLOW_SCC_PCLK 0x00000004 +#define FCR0_RESET_SCC 0x00000008 +#define FCR0_SCCA_ENABLE 0x00000010 +#define FCR0_SCCB_ENABLE 0x00000020 +#define FCR0_SCC_CELL_ENABLE 0x00000040 +#define FCR0_IRDA_ENABLE 0x00008000 +#define FCR0_IRDA_CLK32_ENABLE 0x00010000 +#define FCR0_IRDA_CLK19_ENABLE 0x00020000 + +#define FCR0_USB_REF_SUSPEND 0x10000000 + +#define FCR1_AUDIO_SEL_22MCLK 0x00000002 +#define FCR1_AUDIO_CLK_ENABLE 0x00000008 +#define FCR1_AUDIO_CLKOUT_ENABLE 0x00000020 +#define FCR1_AUDIO_CELL_ENABLE 0x00000040 +#define FCR1_I2S0_CELL_ENABLE 0x00000400 +#define FCR1_I2S0_CLK_ENABLE 0x00001000 +#define FCR1_I2S0_ENABLE 0x00002000 +#define FCR1_I2S1_CELL_ENABLE 0x00020000 +#define FCR1_I2S1_CLK_ENABLE 0x00080000 +#define FCR1_I2S1_ENABLE 0x00100000 +#define FCR1_EIDE0_ENABLE 0x00800000 +#define FCR1_EIDE0_RESET 0x01000000 +#define FCR1_EIDE1_ENABLE 0x04000000 +#define FCR1_EIDE1_RESET 0x08000000 +#define FCR1_UIDE_ENABLE 0x20000000 +#define FCR1_UIDE_RESET 0x40000000 + +#define FCR2_IOBUS_ENABLE 0x00000002 + +#define FCR3_SHUTDOWN_PLL_TOTAL 0x00000001 +#define FCR3_SHUTDOWN_PLL_KW6 0x00000002 +#define FCR3_SHUTDOWN_PLL_KW4 0x00000004 +#define FCR3_SHUTDOWN_PLL_KW35 0x00000008 +#define FCR3_SHUTDOWN_PLL_KW12 0x00000010 +#define FCR3_SHUTDOWN_PLL_2X 0x00000080 +#define FCR3_CLK_66_ENABLE 0x00000100 +#define FCR3_CLK_49_ENABLE 0x00000200 +#define FCR3_CLK_45_ENABLE 0x00000400 +#define FCR3_CLK_31_ENABLE 0x00000800 +#define FCR3_TMR_CLK18_ENABLE 0x00001000 +#define FCR3_I2S1_CLK18_ENABLE 0x00002000 +#define FCR3_I2S0_CLK18_ENABLE 0x00004000 +#define FCR3_VIA_CLK16_ENABLE 0x00008000 + /* * Format of a macio reg property entry. */ Index: sys/powerpc/powermac/platform_powermac.c =================================================================== --- sys/powerpc/powermac/platform_powermac.c (revision 259108) +++ sys/powerpc/powermac/platform_powermac.c (working copy) @@ -376,6 +376,110 @@ #endif } +/* From p3-53 of the MPC7450 RISC Microprocessor Family Reference Manual */ +void +flush_disable_caches(void) +{ + register_t msr; + register_t msscr0; + register_t cache_reg; + volatile uint32_t *memp; + uint32_t temp; + int i; + int x; + + msr = mfmsr(); + powerpc_sync(); + mtmsr(msr & ~(PSL_EE | PSL_DR)); + msscr0 = mfspr(SPR_MSSCR0); + msscr0 &= ~MSSCR0_L2PFE; + mtspr(SPR_MSSCR0, msscr0); + powerpc_sync(); + isync(); + __asm__ __volatile__("dssall; sync"); + powerpc_sync(); + isync(); + __asm__ __volatile__("dcbf 0,%0" :: "r"(0)); + __asm__ __volatile__("dcbf 0,%0" :: "r"(0)); + __asm__ __volatile__("dcbf 0,%0" :: "r"(0)); + + /* Lock the L1 Data cache. */ + mtspr(SPR_LDSTCR, mfspr(SPR_LDSTCR) | 0xFF); + powerpc_sync(); + isync(); + + mtspr(SPR_LDSTCR, 0); + + /* + * Perform this in two stages: Flush the cache starting in RAM, then do it + * from ROM. + */ + memp = (volatile uint32_t *)0x00000000; + for (i = 0; i < 128 * 1024; i++) { + temp = *memp; + __asm__ __volatile__("dcbf 0,%0" :: "r"(memp)); + memp += 32/sizeof(*memp); + } + + memp = (volatile uint32_t *)0xfff00000; + x = 0xfe; + + for (; x != 0xff;) { + mtspr(SPR_LDSTCR, x); + for (i = 0; i < 128; i++) { + temp = *memp; + __asm__ __volatile__("dcbf 0,%0" :: "r"(memp)); + memp += 32/sizeof(*memp); + } + x = ((x << 1) | 1) & 0xff; + } + mtspr(SPR_LDSTCR, 0); + + cache_reg = mfspr(SPR_L2CR); + if (cache_reg & L2CR_L2E) { + cache_reg &= ~(L2CR_L2IO_7450 | L2CR_L2DO_7450); + mtspr(SPR_L2CR, cache_reg); + powerpc_sync(); + mtspr(SPR_L2CR, cache_reg | L2CR_L2HWF); + while (mfspr(SPR_L2CR) & L2CR_L2HWF) + ; /* Busy wait for cache to flush */ + powerpc_sync(); + cache_reg &= ~L2CR_L2E; + mtspr(SPR_L2CR, cache_reg); + powerpc_sync(); + mtspr(SPR_L2CR, cache_reg | L2CR_L2I); + powerpc_sync(); + while (mfspr(SPR_L2CR) & L2CR_L2I) + ; /* Busy wait for L2 cache invalidate */ + powerpc_sync(); + } + + cache_reg = mfspr(SPR_L3CR); + if (cache_reg & L3CR_L3E) { + cache_reg &= ~(L3CR_L3IO | L3CR_L3DO); + mtspr(SPR_L3CR, cache_reg); + powerpc_sync(); + mtspr(SPR_L3CR, cache_reg | L3CR_L3HWF); + while (mfspr(SPR_L3CR) & L3CR_L3HWF) + ; /* Busy wait for cache to flush */ + powerpc_sync(); + cache_reg &= ~L3CR_L3E; + mtspr(SPR_L3CR, cache_reg); + powerpc_sync(); + mtspr(SPR_L3CR, cache_reg | L3CR_L3I); + powerpc_sync(); + while (mfspr(SPR_L3CR) & L3CR_L3I) + ; /* Busy wait for L3 cache invalidate */ + powerpc_sync(); + } + + mtspr(SPR_HID0, mfspr(SPR_HID0) & ~HID0_DCE); + powerpc_sync(); + isync(); + + mtmsr(msr); +} + static void powermac_reset(platform_t platform) { Index: sys/powerpc/powermac/pmu.c =================================================================== --- sys/powerpc/powermac/pmu.c (revision 259108) +++ sys/powerpc/powermac/pmu.c (working copy) @@ -36,6 +36,7 @@ #include <sys/conf.h> #include <sys/kernel.h> #include <sys/clock.h> +#include <sys/proc.h> #include <sys/reboot.h> #include <sys/sysctl.h> @@ -43,11 +44,18 @@ #include <dev/ofw/openfirm.h> #include <dev/led/led.h> +#include <machine/_inttypes.h> +#include <machine/altivec.h> /* For save_vec() */ #include <machine/bus.h> +#include <machine/cpu.h> +#include <machine/fpu.h> /* For save_fpu() */ +#include <machine/hid.h> #include <machine/intr_machdep.h> #include <machine/md_var.h> +#include <machine/pcb.h> #include <machine/pio.h> #include <machine/resource.h> +#include <machine/setjmp.h> #include <vm/vm.h> #include <vm/pmap.h> @@ -59,7 +67,12 @@ #include "clock_if.h" #include "pmuvar.h" #include "viareg.h" +#include "uninorthvar.h" /* For unin_chip_sleep()/unin_chip_wake() */ +#define PMU_DEFAULTS PMU_INT_TICK | PMU_INT_ADB | \ + PMU_INT_PCEJECT | PMU_INT_SNDBRT | \ + PMU_INT_BATTERY | PMU_INT_ENVIRONMENT + /* * Bus interface */ @@ -89,10 +102,16 @@ static void pmu_shutdown(void *xsc, int howto); static void pmu_set_sleepled(void *xsc, int onoff); static int pmu_server_mode(SYSCTL_HANDLER_ARGS); +static int pmu_sleep(SYSCTL_HANDLER_ARGS); static int pmu_acline_state(SYSCTL_HANDLER_ARGS); static int pmu_query_battery(struct pmu_softc *sc, int batt, struct pmu_battstate *info); static int pmu_battquery_sysctl(SYSCTL_HANDLER_ARGS); +static void pmu_restore_state(struct pmu_softc *sc); +static void pmu_save_state(struct pmu_softc *sc); +static int pmu_suspend(device_t); +static int pmu_resume(device_t); +static void pmu_sleep_int(void); /* * List of battery-related sysctls we might ask for @@ -115,8 +134,8 @@ DEVMETHOD(device_attach, pmu_attach), DEVMETHOD(device_detach, pmu_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_suspend, pmu_suspend), + DEVMETHOD(device_resume, pmu_resume), /* ADB bus interface */ DEVMETHOD(adb_hb_send_raw_packet, pmu_adb_send), @@ -193,7 +212,7 @@ 0x02, -1, -1, -1, -1, -1, -1, -1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -1, -1, 0x01, 0x01, 0x01, -1, -1, -1, -1, -1, - 0x00, 0x00, -1, -1, -1, -1, 0x04, 0x04, + 0x00, 0x00, -1, -1, -1, 0x05, 0x04, 0x04, 0x04, -1, 0x00, -1, -1, -1, -1, -1, 0x00, -1, -1, -1, -1, -1, -1, -1, 0x01, 0x02, -1, -1, -1, -1, -1, -1, @@ -229,7 +248,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x03, 0x09, -1, -1, -1, -1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - -1, -1, -1, -1, -1, -1, 0x01, 0x01, + -1, -1, -1, -1, -1, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, -1, -1, -1, -1, -1, -1, -1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -357,12 +376,13 @@ /* Init PMU */ - reg = PMU_INT_TICK | PMU_INT_ADB | PMU_INT_PCEJECT | PMU_INT_SNDBRT; - reg |= PMU_INT_BATTERY; - reg |= PMU_INT_ENVIRONMENT; + pmu_write_reg(sc, vBufB, pmu_read_reg(sc, vBufB) | vPB4); + pmu_write_reg(sc, vDirB, (pmu_read_reg(sc, vDirB) | vPB4) & ~vPB3); + + reg = PMU_DEFAULTS; pmu_send(sc, PMU_SET_IMASK, 1, ®, 16, resp); - pmu_write_reg(sc, vIER, 0x90); /* make sure VIA interrupts are on */ + pmu_write_reg(sc, vIER, 0x94); /* make sure VIA interrupts are on */ pmu_send(sc, PMU_SYSTEM_READY, 1, cmd, 16, resp); pmu_send(sc, PMU_GET_VERSION, 1, cmd, 16, resp); @@ -407,6 +427,10 @@ "server_mode", CTLTYPE_INT | CTLFLAG_RW, sc, 0, pmu_server_mode, "I", "Enable reboot after power failure"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "sleep", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + pmu_sleep, "I", "Put the machine to sleep"); + if (sc->sc_batteries > 0) { struct sysctl_oid *oid, *battroot; char battnum[2]; @@ -464,6 +488,7 @@ } } + sc->lid_closed = 0; /* * Set up LED interface */ @@ -515,6 +540,43 @@ bus_write_1(sc->sc_memr, offset, value); } +static void +pmu_save_state(struct pmu_softc *sc) +{ + sc->saved_regs[0] = pmu_read_reg(sc, vBufA); + sc->saved_regs[1] = pmu_read_reg(sc, vDirA); + sc->saved_regs[2] = pmu_read_reg(sc, vBufB); + sc->saved_regs[3] = pmu_read_reg(sc, vDirB); + sc->saved_regs[4] = pmu_read_reg(sc, vPCR); + sc->saved_regs[5] = pmu_read_reg(sc, vACR); + sc->saved_regs[6] = pmu_read_reg(sc, vIER); + sc->saved_regs[7] = pmu_read_reg(sc, vT1C); + sc->saved_regs[8] = pmu_read_reg(sc, vT1CH); +} + +static void +pmu_restore_state(struct pmu_softc *sc) +{ + pmu_write_reg(sc, vBufA, sc->saved_regs[0]); + eieio(); + pmu_write_reg(sc, vDirA, sc->saved_regs[1]); + eieio(); + pmu_write_reg(sc, vBufB, sc->saved_regs[2]); + eieio(); + pmu_write_reg(sc, vDirB, sc->saved_regs[3]); + eieio(); + pmu_write_reg(sc, vPCR, sc->saved_regs[4]); + eieio(); + pmu_write_reg(sc, vACR, sc->saved_regs[5]); + eieio(); + pmu_write_reg(sc, vIER, sc->saved_regs[6]); + eieio(); + pmu_write_reg(sc, vT1C, sc->saved_regs[7]); + eieio(); + pmu_write_reg(sc, vT1CH, sc->saved_regs[8]); + eieio(); +} + static int pmu_send_byte(struct pmu_softc *sc, uint8_t data) { @@ -1018,3 +1080,163 @@ return (0); } +static int +pmu_suspend(device_t dev) +{ + uint8_t resp[16]; + uint8_t clrcmd[] = {PMU_PWR_CLR_POWERUP_EVENTS, 0xff, 0xff}; + uint8_t setcmd[] = {PMU_PWR_SET_POWERUP_EVENTS, 0, + PMU_PWR_WAKEUP_LID_OPEN|PMU_PWR_WAKEUP_KEY}; + uint8_t sleepcmd[] = {'M', 'A', 'T', 'T'}; + uint8_t reg = 0; + struct pmu_softc *sc; + + sc = device_get_softc(dev); + mtx_lock(&sc->sc_mutex); + pmu_send(sc, PMU_SET_IMASK, 1, ®, 16, resp); + pmu_send(sc, PMU_POWER_EVENTS, 3, clrcmd, 16, resp); + pmu_send(sc, PMU_POWER_EVENTS, 3, setcmd, 2, resp); + + pmu_send(sc, PMU_SLEEP, 4, sleepcmd, 16, resp); + pmu_save_state(sc); + mtx_unlock(&sc->sc_mutex); + + return (0); +} + +static int +pmu_resume(device_t dev) +{ + uint8_t resp[16]; + uint8_t cmd[2] = {2, 0}; + struct pmu_softc *sc; + uint8_t reg; + + sc = device_get_softc(dev); + mtx_lock(&sc->sc_mutex); + pmu_restore_state(sc); + pmu_send(sc, PMU_SYSTEM_READY, 1, cmd, 16, resp); + reg = PMU_DEFAULTS; + pmu_send(sc, PMU_SET_IMASK, 1, ®, 16, resp); + mtx_unlock(&sc->sc_mutex); + + return (0); +} + +static register_t sprgs[4]; +static register_t srrs[2]; +extern void *ap_pcpu; + +void pmu_sleep_int(void) +{ + static u_quad_t timebase = 0; + jmp_buf resetjb; + struct thread *fputd; + struct thread *vectd; + register_t hid0; + register_t msr; + register_t saved_msr; + + ap_pcpu = pcpup; + + PCPU_SET(restore, &resetjb); + + *(unsigned long *)0x80 = 0x100; + saved_msr = mfmsr(); + fputd = PCPU_GET(fputhread); + vectd = PCPU_GET(vecthread); + if (fputd != NULL) + save_fpu(fputd); + if (vectd != NULL) + save_vec(vectd); + if (setjmp(resetjb) == 0) { + sprgs[0] = mfspr(SPR_SPRG0); + sprgs[1] = mfspr(SPR_SPRG1); + sprgs[2] = mfspr(SPR_SPRG2); + sprgs[3] = mfspr(SPR_SPRG3); + srrs[0] = mfspr(SPR_SRR0); + srrs[1] = mfspr(SPR_SRR1); + timebase = mftb(); + powerpc_sync(); + flush_disable_caches(); + hid0 = mfspr(SPR_HID0); + hid0 = (hid0 & ~(HID0_DOZE | HID0_NAP)) | HID0_SLEEP; + powerpc_sync(); + isync(); + msr = mfmsr() | PSL_POW; + mtspr(SPR_HID0, hid0); + powerpc_sync(); + + while (1) + mtmsr(msr); + } + mttb(timebase); + PCPU_SET(curthread, curthread); + PCPU_SET(curpcb, curthread->td_pcb); + pmap_activate(curthread); + powerpc_sync(); + mtspr(SPR_SPRG0, sprgs[0]); + mtspr(SPR_SPRG1, sprgs[1]); + mtspr(SPR_SPRG2, sprgs[2]); + mtspr(SPR_SPRG3, sprgs[3]); + mtspr(SPR_SRR0, srrs[0]); + mtspr(SPR_SRR1, srrs[1]); + mtmsr(saved_msr); + if (fputd == curthread) + enable_fpu(curthread); + if (vectd == curthread) + enable_vec(curthread); + powerpc_sync(); +} + +static int +pmu_sleep(SYSCTL_HANDLER_ARGS) +{ + u_int sleep = 0; + int error; + + error = sysctl_handle_int(oidp, &sleep, 0, req); + + if (error || !req->newptr) + return (error); + + mtx_lock(&Giant); + error = DEVICE_SUSPEND(root_bus); + if (error == 0) { + spinlock_enter(); + pmu_sleep_int(); + + spinlock_exit(); + DEVICE_RESUME(root_bus); + } + mtx_unlock(&Giant); + + return (error); +} + +int +pmu_set_speed(int low_speed) +{ + struct pmu_softc *sc; + uint8_t sleepcmd[] = {'W', 'O', 'O', 'F', 0}; + uint8_t resp[16]; + + sc = device_get_softc(pmu); + pmu_write_reg(sc, vIER, 0x10); + spinlock_enter(); + mtdec(0x7fffffff); + mb(); + mtdec(0x7fffffff); + + sleepcmd[4] = low_speed; + pmu_send(sc, PMU_CPU_SPEED, 5, sleepcmd, 16, resp); + unin_chip_sleep(NULL, 1); + pmu_sleep_int(); + unin_chip_wake(NULL); + + mtdec(1); /* Force a decrementer exception */ + spinlock_exit(); + pmu_write_reg(sc, vIER, 0x90); + + return (0); +} Index: sys/powerpc/powermac/pmuvar.h =================================================================== --- sys/powerpc/powermac/pmuvar.h (revision 259108) +++ sys/powerpc/powermac/pmuvar.h (working copy) @@ -161,6 +161,7 @@ int sc_batteries; struct cdev *sc_leddev; int lid_closed; + uint8_t saved_regs[9]; }; struct pmu_battstate { @@ -172,4 +173,6 @@ int voltage; }; +int pmu_set_speed(int low_speed); + #endif /* PMUVAR_H */ Index: sys/powerpc/powermac/uninorth.c =================================================================== --- sys/powerpc/powermac/uninorth.c (revision 259108) +++ sys/powerpc/powermac/uninorth.c (working copy) @@ -65,6 +65,8 @@ static int unin_chip_probe(device_t); static int unin_chip_attach(device_t); +static int unin_chip_suspend(device_t); +static int unin_chip_resume(device_t); /* * Bus interface. @@ -102,6 +104,8 @@ /* Device interface */ DEVMETHOD(device_probe, unin_chip_probe), DEVMETHOD(device_attach, unin_chip_attach), + DEVMETHOD(device_suspend, unin_chip_suspend), + DEVMETHOD(device_resume, unin_chip_resume), /* Bus interface */ DEVMETHOD(bus_print_child, unin_chip_print_child), @@ -136,8 +140,15 @@ static devclass_t unin_chip_devclass; -DRIVER_MODULE(unin, nexus, unin_chip_driver, unin_chip_devclass, 0, 0); +/* + * Assume there is only one unin chip in a PowerMac, so that pmu.c functions can + * suspend the chip after the whole rest of the device tree is suspended, not + * earlier. + */ +static device_t unin_chip; +EARLY_DRIVER_MODULE(unin, nexus, unin_chip_driver, unin_chip_devclass, 0, 0, BUS_PASS_BUS); + /* * Add an interrupt to the dev's resource list if present */ @@ -210,31 +221,30 @@ } static void -unin_enable_gmac(device_t dev) +unin_update_reg(device_t dev, uint32_t regoff, uint32_t set, uint32_t clr) { - volatile u_int *clkreg; + volatile u_int *reg; struct unin_chip_softc *sc; u_int32_t tmpl; sc = device_get_softc(dev); - clkreg = (void *)(sc->sc_addr + UNIN_CLOCKCNTL); - tmpl = inl(clkreg); - tmpl |= UNIN_CLOCKCNTL_GMAC; - outl(clkreg, tmpl); + reg = (void *)(sc->sc_addr + regoff); + tmpl = inl(reg); + tmpl &= ~clr; + tmpl |= set; + outl(reg, tmpl); } static void +unin_enable_gmac(device_t dev) +{ + unin_update_reg(dev, UNIN_CLOCKCNTL, UNIN_CLOCKCNTL_GMAC, 0); +} + +static void unin_enable_mpic(device_t dev) { - volatile u_int *toggle; - struct unin_chip_softc *sc; - u_int32_t tmpl; - - sc = device_get_softc(dev); - toggle = (void *)(sc->sc_addr + UNIN_TOGGLE_REG); - tmpl = inl(toggle); - tmpl |= UNIN_MPIC_RESET | UNIN_MPIC_OUTPUT_ENABLE; - outl(toggle, tmpl); + unin_update_reg(dev, UNIN_TOGGLE_REG, UNIN_MPIC_RESET | UNIN_MPIC_OUTPUT_ENABLE, 0); } static int @@ -311,6 +321,9 @@ return (error); } + if (unin_chip == NULL) + unin_chip = dev; + /* * Iterate through the sub-devices */ @@ -631,3 +644,61 @@ return (&dinfo->udi_obdinfo); } +static int +unin_chip_suspend(device_t dev) +{ + int error; + + error = bus_generic_suspend(dev); + + if (error) + return (error); + + if (bus_current_pass == BUS_PASS_BUS) + error = unin_chip_sleep(dev, 0); + else + error = EAGAIN; + + return (error); +} + +static int +unin_chip_resume(device_t dev) +{ + + if (bus_current_pass == BUS_PASS_BUS) + unin_chip_wake(dev); + + return (bus_generic_resume(dev)); +} + +int +unin_chip_wake(device_t dev) +{ + + if (dev == NULL) + dev = unin_chip; + unin_update_reg(dev, UNIN_PWR_MGMT, UNIN_PWR_NORMAL, UNIN_PWR_MASK); + DELAY(10); + unin_update_reg(dev, UNIN_HWINIT_STATE, UNIN_RUNNING, 0); + DELAY(100); + + return (0); +} + +int +unin_chip_sleep(device_t dev, int idle) +{ + if (dev == NULL) + dev = unin_chip; + + unin_update_reg(dev, UNIN_HWINIT_STATE, UNIN_SLEEPING, 0); + DELAY(10); + if (idle) + unin_update_reg(dev, UNIN_PWR_MGMT, UNIN_PWR_IDLE2, UNIN_PWR_MASK); + else + unin_update_reg(dev, UNIN_PWR_MGMT, UNIN_PWR_SLEEP, UNIN_PWR_MASK); + DELAY(10); + + return (0); +} Index: sys/powerpc/powermac/uninorthpci.c =================================================================== --- sys/powerpc/powermac/uninorthpci.c (revision 259108) +++ sys/powerpc/powermac/uninorthpci.c (working copy) @@ -86,6 +86,8 @@ /* Device interface */ DEVMETHOD(device_probe, uninorth_probe), DEVMETHOD(device_attach, uninorth_attach), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), /* pcib interface */ DEVMETHOD(pcib_read_config, uninorth_read_config), @@ -98,7 +100,7 @@ DEFINE_CLASS_1(pcib, uninorth_driver, uninorth_methods, sizeof(struct uninorth_softc), ofw_pci_driver); -DRIVER_MODULE(uninorth, nexus, uninorth_driver, uninorth_devclass, 0, 0); +EARLY_DRIVER_MODULE(uninorth, nexus, uninorth_driver, uninorth_devclass, 0, 0, BUS_PASS_BUS); static int uninorth_probe(device_t dev) Index: sys/powerpc/powermac/uninorthvar.h =================================================================== --- sys/powerpc/powermac/uninorthvar.h (revision 259108) +++ sys/powerpc/powermac/uninorthvar.h (working copy) @@ -28,6 +28,8 @@ #ifndef _POWERPC_POWERMAC_UNINORTHVAR_H_ #define _POWERPC_POWERMAC_UNINORTHVAR_H_ +#include <dev/ofw/ofw_bus_subr.h> +#include <dev/ofw/ofw_pci.h> #include <powerpc/ofw/ofw_pci.h> struct uninorth_softc { @@ -76,6 +78,24 @@ #define UNIN_CLOCKCNTL_GMAC 0x2 /* + * Power management register + */ +#define UNIN_PWR_MGMT 0x30 +#define UNIN_PWR_NORMAL 0x00 +#define UNIN_PWR_IDLE2 0x01 +#define UNIN_PWR_SLEEP 0x02 +#define UNIN_PWR_SAVE 0x03 +#define UNIN_PWR_MASK 0x03 + +/* + * Hardware initialization state register + */ +#define UNIN_HWINIT_STATE 0x70 +#define UNIN_SLEEPING 0x01 +#define UNIN_RUNNING 0x02 + + +/* * Toggle registers */ #define UNIN_TOGGLE_REG 0xe0 @@ -82,4 +102,6 @@ #define UNIN_MPIC_RESET 0x2 #define UNIN_MPIC_OUTPUT_ENABLE 0x4 +extern int unin_chip_sleep(device_t dev, int idle); +extern int unin_chip_wake(device_t dev); #endif /* _POWERPC_POWERMAC_UNINORTHVAR_H_ */ Index: sys/powerpc/powermac/viareg.h =================================================================== --- sys/powerpc/powermac/viareg.h (revision 259108) +++ sys/powerpc/powermac/viareg.h (working copy) @@ -30,14 +30,16 @@ /* VIA interface registers */ #define vBufB 0x0000 /* register B */ -#define vBufA 0x0200 /* register A */ #define vDirB 0x0400 /* data direction register */ #define vDirA 0x0600 /* data direction register */ +#define vT1C 0x0800 /* Timer 1 counter Lo */ +#define vT1CH 0x0a00 /* Timer 1 counter Hi */ #define vSR 0x1400 /* shift register */ #define vACR 0x1600 /* aux control register */ #define vPCR 0x1800 /* peripheral control register */ #define vIFR 0x1a00 /* interrupt flag register */ #define vIER 0x1c00 /* interrupt enable register */ +#define vBufA 0x1e00 /* register A */ #define vPB 0x0000 #define vPB3 0x08 Index: sys/powerpc/powerpc/mp_machdep.c =================================================================== --- sys/powerpc/powerpc/mp_machdep.c (revision 259108) +++ sys/powerpc/powerpc/mp_machdep.c (working copy) @@ -54,6 +54,7 @@ #include <machine/pcb.h> #include <machine/platform.h> #include <machine/md_var.h> +#include <machine/setjmp.h> #include <machine/smp.h> #include "pic_if.h" @@ -66,10 +67,21 @@ static u_int ipi_msg_cnt[32]; static struct mtx ap_boot_mtx; struct pcb stoppcbs[MAXCPU]; +int longfault(faultbuf, int); void machdep_ap_bootstrap(void) { + jmp_buf *restore; + + /* The following is needed for restoring from sleep. */ +#ifdef __powerpc64__ + /* Writing to the time base register is hypervisor-privileged */ + if (mfmsr() & PSL_HV) + mttb(0); +#else + mttb(0); +#endif /* Set up important bits on the CPU (HID registers, etc.) */ cpudep_ap_setup(); @@ -78,10 +90,16 @@ PCPU_SET(awake, 1); __asm __volatile("msync; isync"); - while (ap_letgo == 0) - ; + if (mp_ncpus > 1 && !pcpup->pc_bsp) { + while (ap_letgo == 0) + ; + } - /* Initialize DEC and TB, sync with the BSP values */ + restore = PCPU_GET(restore); + if (restore != NULL) { + longjmp(*restore, 1); + } + #ifdef __powerpc64__ /* Writing to the time base register is hypervisor-privileged */ if (mfmsr() & PSL_HV) @@ -89,6 +107,8 @@ #else mttb(ap_timebase); #endif + + /* Initialize DEC, sync with the BSP values */ decr_ap_init(); /* Give platform code a chance to do anything necessary */ Index: sys/powerpc/powerpc/openpic.c =================================================================== --- sys/powerpc/powerpc/openpic.c (revision 259108) +++ sys/powerpc/powerpc/openpic.c (working copy) @@ -380,3 +380,64 @@ openpic_write(sc, OPENPIC_IPI_VECTOR(0), x); } } + +int +openpic_suspend(device_t dev) +{ + struct openpic_softc *sc; + int i; + + sc = device_get_softc(dev); + + sc->sc_saved_config = bus_read_4(sc->sc_memr, OPENPIC_CONFIG); + for (i = 0; i < 4; i++) { + sc->sc_saved_ipis[i] = bus_read_4(sc->sc_memr, OPENPIC_IPI_VECTOR(i)); + } + + for (i = 0; i < 4; i++) { + sc->sc_saved_prios[i] = bus_read_4(sc->sc_memr, OPENPIC_PCPU_TPR(i)); + } + + for (i = 0; i < OPENPIC_TIMERS; i++) { + sc->sc_saved_timers[i].tcnt = bus_read_4(sc->sc_memr, OPENPIC_TCNT(i)); + sc->sc_saved_timers[i].tbase = bus_read_4(sc->sc_memr, OPENPIC_TBASE(i)); + sc->sc_saved_timers[i].tvec = bus_read_4(sc->sc_memr, OPENPIC_TVEC(i)); + sc->sc_saved_timers[i].tdst = bus_read_4(sc->sc_memr, OPENPIC_TDST(i)); + } + + for (i = 0; i < OPENPIC_SRC_VECTOR_COUNT; i++) + sc->sc_saved_vectors[i] = + bus_read_4(sc->sc_memr, OPENPIC_SRC_VECTOR(i)) & ~OPENPIC_ACTIVITY; + + return (0); +} + +int +openpic_resume(device_t dev) +{ + struct openpic_softc *sc; + int i; + + sc = device_get_softc(dev); + + sc->sc_saved_config = bus_read_4(sc->sc_memr, OPENPIC_CONFIG); + for (i = 0; i < 4; i++) { + bus_write_4(sc->sc_memr, OPENPIC_IPI_VECTOR(i), sc->sc_saved_ipis[i]); + } + + for (i = 0; i < 4; i++) { + bus_write_4(sc->sc_memr, OPENPIC_PCPU_TPR(i), sc->sc_saved_prios[i]); + } + + for (i = 0; i < OPENPIC_TIMERS; i++) { + bus_write_4(sc->sc_memr, OPENPIC_TCNT(i), sc->sc_saved_timers[i].tcnt); + bus_write_4(sc->sc_memr, OPENPIC_TBASE(i), sc->sc_saved_timers[i].tbase); + bus_write_4(sc->sc_memr, OPENPIC_TVEC(i), sc->sc_saved_timers[i].tvec); + bus_write_4(sc->sc_memr, OPENPIC_TDST(i), sc->sc_saved_timers[i].tdst); + } + + for (i = 0; i < OPENPIC_SRC_VECTOR_COUNT; i++) + bus_write_4(sc->sc_memr, OPENPIC_SRC_VECTOR(i), sc->sc_saved_vectors[i]); + + return (0); +} Index: sys/powerpc/psim/openpic_iobus.c =================================================================== --- sys/powerpc/psim/openpic_iobus.c (revision 259108) +++ sys/powerpc/psim/openpic_iobus.c (working copy) @@ -53,6 +53,7 @@ #include <sys/rman.h> +#include <machine/openpicreg.h> #include <machine/openpicvar.h> #include <powerpc/psim/iobusvar.h> Index: sys/x86/include/acpica_machdep.h =================================================================== --- sys/x86/include/acpica_machdep.h (revision 259108) +++ sys/x86/include/acpica_machdep.h (working copy) Property changes on: sys/x86/include/acpica_machdep.h ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/head_mfi/sys/x86/include/acpica_machdep.h:r227068,227574,227579-227580,227612,227905,228108,228208,228279,228310,228320,231988,232412-232414,232888,233016,233620 Merged /projects/random_number_generator/sys/x86/include/acpica_machdep.h:r254613-255353 Merged /projects/cambria/sys/x86/include/acpica_machdep.h:r186008-186350 Merged /user/piso/sys/x86/include/acpica_machdep.h:r186543,186723,186725-186726,186742,186770-186771,186774,186777-186779,187984-187985,190555,190572,190589,190592,190614,190625,190830 Merged /projects/pmac_pmu/sys/x86/include/acpica_machdep.h:r255832-259112 Merged /projects/quota64/sys/x86/include/acpica_machdep.h:r184125-207707 Merged /user/jimharris/isci/sys/x86/include/acpica_machdep.h:r228377-230794 Merged /user/piso/ipfw/sys/x86/include/acpica_machdep.h:r190918,190921,190923,190926 Merged /projects/multi-fibv6/head/sys/x86/include/acpica_machdep.h:r230929-231848 Merged /head/sys/x86/include/acpica_machdep.h:r244821-252117 Merged /projects/largeSMP/sys/x86/include/acpica_machdep.h:r221273-222812,222815-223757 Merged /user/dfr/xenhvm/6/sys/x86/include/acpica_machdep.h:r189304,189451 Merged /user/peter/kinfo/sys/x86/include/acpica_machdep.h:r185413-185547 Merged /user/dfr/xenhvm/7/sys/x86/include/acpica_machdep.h:r188574-189614 Merged /user/np/cxl_tuning/sys/x86/include/acpica_machdep.h:r254336,254386,254736 Merged /user/mav/ata/sys/x86/include/acpica_machdep.h:r189793-190578 Merged /user/alfred/9-alfred/sys/x86/include/acpica_machdep.h:r242488 Merged /user/thompsa/usb/sys/x86/include/acpica_machdep.h:r187190 Index: sys =================================================================== --- sys (revision 259108) +++ sys (working copy) Property changes on: sys ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/sys:r244821-259112 Index: usr.bin/calendar =================================================================== --- usr.bin/calendar (revision 259108) +++ usr.bin/calendar (working copy) Property changes on: usr.bin/calendar ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/usr.bin/calendar:r244821-259112 Index: usr.bin/csup =================================================================== --- usr.bin/csup (revision 259108) +++ usr.bin/csup (working copy) Property changes on: usr.bin/csup ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/usr.bin/csup:r244821-259112 Index: usr.bin/procstat =================================================================== --- usr.bin/procstat (revision 259108) +++ usr.bin/procstat (working copy) Property changes on: usr.bin/procstat ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/usr.bin/procstat:r244821-259112 Index: usr.sbin/bhyve =================================================================== --- usr.sbin/bhyve (revision 259108) +++ usr.sbin/bhyve (working copy) Property changes on: usr.sbin/bhyve ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/usr.sbin/bhyve:r250993-259112 Index: usr.sbin/bhyvectl =================================================================== --- usr.sbin/bhyvectl (revision 259108) +++ usr.sbin/bhyvectl (working copy) Property changes on: usr.sbin/bhyvectl ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/usr.sbin/bhyvectl:r250993-259112 Index: usr.sbin/bhyveload =================================================================== --- usr.sbin/bhyveload (revision 259108) +++ usr.sbin/bhyveload (working copy) Property changes on: usr.sbin/bhyveload ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/usr.sbin/bhyveload:r250993-259112 Index: usr.sbin/jail =================================================================== --- usr.sbin/jail (revision 259108) +++ usr.sbin/jail (working copy) Property changes on: usr.sbin/jail ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/usr.sbin/jail:r244821-259112 Index: usr.sbin/ndiscvt =================================================================== --- usr.sbin/ndiscvt (revision 259108) +++ usr.sbin/ndiscvt (working copy) Property changes on: usr.sbin/ndiscvt ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/usr.sbin/ndiscvt:r244821-259112 Index: usr.sbin/rtadvctl =================================================================== --- usr.sbin/rtadvctl (revision 259108) +++ usr.sbin/rtadvctl (working copy) Property changes on: usr.sbin/rtadvctl ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/usr.sbin/rtadvctl:r244821-259112 Index: usr.sbin/rtadvd =================================================================== --- usr.sbin/rtadvd (revision 259108) +++ usr.sbin/rtadvd (working copy) Property changes on: usr.sbin/rtadvd ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/usr.sbin/rtadvd:r244821-259112 Index: usr.sbin/rtsold =================================================================== --- usr.sbin/rtsold (revision 259108) +++ usr.sbin/rtsold (working copy) Property changes on: usr.sbin/rtsold ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/usr.sbin/rtsold:r244821-259112 Index: usr.sbin/zic =================================================================== --- usr.sbin/zic (revision 259108) +++ usr.sbin/zic (working copy) Property changes on: usr.sbin/zic ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu/usr.sbin/zic:r244821-259112 Index: . =================================================================== --- . (revision 259108) +++ . (working copy) Property changes on: . ___________________________________________________________________ Modified: svn:mergeinfo Merged /projects/pmac_pmu:r244821-259112 --MP_/myyr.EiQd2QcNU+JRaoNCZY--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131208154854.7425d9a7>