/* ** The Wright Brothers and Gecko systems have a H/W problem ** (Lasi...'nuf said) may cause a broadcast reset to lockup ** the system. An HVERSION dependent PDC call was developed ** to perform a "safe", platform specific broadcast reset instead ** of kludging up all the code. ** ** Older machines which do not implement PDC_BROADCAST_RESET will ** return (with an error) and the regular broadcast reset can be ** issued. Obviously, if the PDC does implement PDC_BROADCAST_RESET ** the PDC call will not return (the system will be reset).
*/ void machine_restart(char *cmd)
{ #ifdef FASTBOOT_SELFTEST_SUPPORT /* ** If user has modified the Firmware Selftest Bitmap, ** run the tests specified in the bitmap after the ** system is rebooted w/PDC_DO_RESET. ** ** ftc_bitmap = 0x1AUL "Skip destructive memory tests" ** ** Using "directed resets" at each processor with the MEM_TOC ** vector cleared will also avoid running destructive ** memory self tests. (Not implemented yet)
*/ if (ftc_bitmap) {
pdc_do_firm_test_reset(ftc_bitmap);
} #endif /* set up a new led state on systems shipped with a LED State panel */
pdc_chassis_send_status(PDC_CHASSIS_DIRECT_SHUTDOWN);
/* "Normal" system reset */
pdc_do_reset();
/* Nope...box should reset with just CMD_RESET now */
gsc_writel(CMD_RESET, COMMAND_GLOBAL);
/* Wait for RESET to lay us to rest. */ while (1) ;
}
/* * This routine is called from sys_reboot to actually turn off the * machine
*/ void machine_power_off(void)
{ /* Put the soft power button back under hardware control. * If the user had already pressed the power button, the
* following call will immediately power off. */
pdc_soft_power_button(0);
void flush_thread(void)
{ /* Only needs to handle fpu stuff or perf monitors. ** REVISIT: several arches implement a "lazy fpu state".
*/
}
/* * Idle thread support * * Detect when running on QEMU with SeaBIOS PDC Firmware and let * QEMU idle the host too.
*/
int running_on_qemu __ro_after_init;
EXPORT_SYMBOL(running_on_qemu);
/* * Called from the idle thread for the CPU which has been shutdown.
*/ void __noreturn arch_cpu_idle_dead(void)
{ #ifdef CONFIG_HOTPLUG_CPU
idle_task_exit();
local_irq_disable();
/* Tell the core that this CPU is now safe to dispose of. */
cpuhp_ap_report_dead();
/* Ensure that the cache lines are written out. */
flush_cache_all_local();
flush_tlb_all_local(NULL);
/* Let PDC firmware put CPU into firmware idle loop. */
__pdc_cpu_rendezvous();
pr_warn("PDC does not provide rendezvous function.\n"); #endif while (1);
}
void __cpuidle arch_cpu_idle(void)
{ /* nop on real hardware, qemu will idle sleep. */ asmvolatile("or %%r10,%%r10,%%r10\n":::);
}
staticint __init parisc_idle_init(void)
{ if (!running_on_qemu)
cpu_idle_poll_ctrl(1);
/* We have to use void * instead of a function pointer, because * function pointers aren't a pointer to the function on 64-bit.
* Make them const so the compiler knows they live in .text */ externvoid * const ret_from_kernel_thread; externvoid * const child_return;
if (unlikely(args->fn)) { /* kernel thread */
memset(cregs, 0, sizeof(struct pt_regs)); if (args->idle) /* idle thread */ return 0; /* Must exit via ret_from_kernel_thread in order * to call schedule_tail()
*/
cregs->ksp = (unsignedlong) stack + FRAME_SIZE + PT_SZ_ALGN;
cregs->kpc = (unsignedlong) &ret_from_kernel_thread; /* * Copy function and argument to be called from * ret_from_kernel_thread.
*/ #ifdef CONFIG_64BIT
cregs->gr[27] = ((unsignedlong *)args->fn)[3];
cregs->gr[26] = ((unsignedlong *)args->fn)[2]; #else
cregs->gr[26] = (unsignedlong) args->fn; #endif
cregs->gr[25] = (unsignedlong) args->fn_arg;
} else { /* user thread */ /* usp must be word aligned. This also prevents users from * passing in the value 1 (which is the signal for a special
* return for a kernel thread) */ if (usp) {
usp = ALIGN(usp, 4); if (likely(usp))
cregs->gr[30] = usp;
}
cregs->ksp = (unsignedlong) stack + FRAME_SIZE;
cregs->kpc = (unsignedlong) &child_return;
/* Setup thread TLS area */ if (clone_flags & CLONE_SETTLS)
cregs->cr27 = tls;
}
unwind_frame_init_from_blocked_task(&info, p); do { if (unwind_once(&info) < 0) return 0; if (task_is_running(p)) return 0;
ip = info.ip; if (!in_sched_functions(ip)) return ip;
} while (count++ < MAX_UNWIND_ENTRIES); return 0;
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.20 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.