- /* Notify IOKit PM clients of shutdown/restart
- Clients subscribe to this message with a call to
- IOService::registerInterest()
- */
-
- /* Spawn a thread that will panic in 30 seconds.
- If all goes well the machine will be off by the time
- the timer expires.
- */
- shutdown_hang = thread_call_allocate( &IOPMPanicOnShutdownHang, (thread_call_param_t) type);
- clock_interval_to_deadline( 30, kSecondScale, &deadline );
- thread_call_enter1_delayed( shutdown_hang, 0, deadline );
-
- noWaitForResponses = pmRootDomain->tellChangeDown2(type);
- /* This notification should have few clients who all do
- their work synchronously.
-
- In this "shutdown notification" context we don't give
- drivers the option of working asynchronously and responding
- later. PM internals make it very hard to wait for asynchronous
- replies. In fact, it's a bad idea to even be calling
- tellChangeDown2 from here at all.
- */
+ if(type == kPEHaltCPU || type == kPERestartCPU)
+ {
+ /* Notify IOKit PM clients of shutdown/restart
+ Clients subscribe to this message with a call to
+ IOService::registerInterest()
+ */
+
+ /* Spawn a thread that will panic in 30 seconds.
+ If all goes well the machine will be off by the time
+ the timer expires.
+ */
+ shutdown_hang = thread_call_allocate( &IOPMPanicOnShutdownHang, (thread_call_param_t) type);
+ clock_interval_to_deadline( 30, kSecondScale, &deadline );
+ thread_call_enter1_delayed( shutdown_hang, 0, deadline );
+
+ noWaitForResponses = pmRootDomain->tellChangeDown2(type);
+ /* This notification should have few clients who all do
+ their work synchronously.
+
+ In this "shutdown notification" context we don't give
+ drivers the option of working asynchronously and responding
+ later. PM internals make it very hard to wait for asynchronous
+ replies. In fact, it's a bad idea to even be calling
+ tellChangeDown2 from here at all.
+ */
+ }