Print this page
patch cpu-pause-func-deglobalize


 266         /*
 267          * XXPV Should probably think some more about how we deal
 268          *      with panicing before it's really safe to panic.
 269          *      On hypervisors, we reboot very quickly..  Perhaps panic
 270          *      should only attempt to recover by rebooting if,
 271          *      say, we were able to mount the root filesystem,
 272          *      or if we successfully launched init(1m).
 273          */
 274         if (panicstr && proc_init == NULL)
 275                 (void) HYPERVISOR_shutdown(SHUTDOWN_poweroff);
 276 #endif
 277         /*
 278          * stop other cpus and raise our priority.  since there is only
 279          * one active cpu after this, and our priority will be too high
 280          * for us to be preempted, we're essentially single threaded
 281          * from here on out.
 282          */
 283         (void) spl6();
 284         if (!panicstr) {
 285                 mutex_enter(&cpu_lock);
 286                 pause_cpus(NULL);
 287                 mutex_exit(&cpu_lock);
 288         }
 289 
 290         /*
 291          * If the system is panicking, the preloaded kernel is valid, and
 292          * fastreboot_onpanic has been set, and the system has been up for
 293          * longer than fastreboot_onpanic_uptime (default to 10 minutes),
 294          * choose Fast Reboot.
 295          */
 296         if (fcn == AD_BOOT && panicstr && newkernel.fi_valid &&
 297             fastreboot_onpanic &&
 298             (panic_lbolt - lbolt_at_boot) > fastreboot_onpanic_uptime) {
 299                 fcn = AD_FASTREBOOT;
 300         }
 301 
 302         /*
 303          * Try to quiesce devices.
 304          */
 305         if (is_first_quiesce) {
 306                 /*




 266         /*
 267          * XXPV Should probably think some more about how we deal
 268          *      with panicing before it's really safe to panic.
 269          *      On hypervisors, we reboot very quickly..  Perhaps panic
 270          *      should only attempt to recover by rebooting if,
 271          *      say, we were able to mount the root filesystem,
 272          *      or if we successfully launched init(1m).
 273          */
 274         if (panicstr && proc_init == NULL)
 275                 (void) HYPERVISOR_shutdown(SHUTDOWN_poweroff);
 276 #endif
 277         /*
 278          * stop other cpus and raise our priority.  since there is only
 279          * one active cpu after this, and our priority will be too high
 280          * for us to be preempted, we're essentially single threaded
 281          * from here on out.
 282          */
 283         (void) spl6();
 284         if (!panicstr) {
 285                 mutex_enter(&cpu_lock);
 286                 pause_cpus(NULL, NULL);
 287                 mutex_exit(&cpu_lock);
 288         }
 289 
 290         /*
 291          * If the system is panicking, the preloaded kernel is valid, and
 292          * fastreboot_onpanic has been set, and the system has been up for
 293          * longer than fastreboot_onpanic_uptime (default to 10 minutes),
 294          * choose Fast Reboot.
 295          */
 296         if (fcn == AD_BOOT && panicstr && newkernel.fi_valid &&
 297             fastreboot_onpanic &&
 298             (panic_lbolt - lbolt_at_boot) > fastreboot_onpanic_uptime) {
 299                 fcn = AD_FASTREBOOT;
 300         }
 301 
 302         /*
 303          * Try to quiesce devices.
 304          */
 305         if (is_first_quiesce) {
 306                 /*