void power_save(void) { /* * Make sure the CPU has the DOZE or NAP feature set. * We assume that chip-specific initialization code * has set any other registers necessary (e.g. HID0). */ if (!(cur_cpu_spec[smp_processor_id()]->cpu_features & (CPU_FTR_CAN_DOZE | CPU_FTR_CAN_NAP))) return; /* * Disable interrupts to prevent a lost wakeup * when going to sleep. This is necessary even with * RTLinux since we are not guaranteed an interrupt * didn't come in and is waiting for a __sti() before * emulating one. This way, we really do hard disable. * * We assume that we're sti-ed when we come in here. We * are in the idle loop so if we're cli-ed then it's a bug * anyway. * -- Cort */ _nmask_and_or_msr(MSR_EE, 0); if (!current->need_resched) { /* set the POW bit in the MSR, and enable interrupts * so we wake up sometime! */ _nmask_and_or_msr(0, MSR_POW | MSR_EE); } _nmask_and_or_msr(0, MSR_EE); }
void mpc7448_hpc2_restart(char *cmd) { local_irq_disable(); /* Set exception prefix high - to the firmware */ _nmask_and_or_msr(0, MSR_IP); for (;;) ; /* Spin until reset happens */ }
static void storcenter_restart(char *cmd) { local_irq_disable(); /* Set exception prefix high - to the firmware */ _nmask_and_or_msr(0, MSR_IP); /* Wait for reset to happen */ for (;;) ; }
static void mvme5100_reset_board(void) { local_irq_disable(); /* Set exception prefix high - to the firmware */ _nmask_and_or_msr(0, MSR_IP); out_8((u_char *)MVME5100_BOARD_MODRST_REG, 0x01); return; }
static void sandpoint_restart(char *cmd) { local_irq_disable(); /* Set exception prefix high - to the firmware */ _nmask_and_or_msr(0, MSR_IP); /* Reset system via Port 92 */ outb(0x00, 0x92); outb(0x01, 0x92); for(;;); /* Spin until reset happens */ }
static void pplus_halt(void) { /* set exception prefix high - to the prom */ _nmask_and_or_msr(MSR_EE, MSR_IP); /* make sure bit 0 (reset) is a 0 */ outb(inb(0x92) & ~1L, 0x92); /* signal a reset to system control port A - soft reset */ outb(inb(0x92) | 1, 0x92); while (1) ; /* * Not reached */ }
static void mcpn765_reset_board(void) { local_irq_disable(); /* set VIA IDE controller into native mode */ mcpn765_set_VIA_IDE_native(); /* Set exception prefix high - to the firmware */ _nmask_and_or_msr(0, MSR_IP); out_8((u_char *)MCPN765_BOARD_MODRST_REG, 0x01); return; }
static void pplus_restart(char *cmd) { unsigned long i = 10000; local_irq_disable(); /* set VIA IDE controller into native mode */ pplus_set_VIA_IDE_native(); /* set exception prefix high - to the prom */ _nmask_and_or_msr(0, MSR_IP); /* make sure bit 0 (reset) is a 0 */ outb( inb(0x92) & ~1L , 0x92 ); /* signal a reset to system control port A - soft reset */ outb( inb(0x92) | 1 , 0x92 ); while ( i != 0 ) i++; panic("restart failed\n"); }