Ejemplo n.º 1
0
asmlinkage __visible void xen_maybe_preempt_hcall(void)
{
	if (unlikely(__this_cpu_read(xen_in_preemptible_hcall)
		     && need_resched())) {
		/*
		 * Clear flag as we may be rescheduled on a different
		 * cpu.
		 */
		__this_cpu_write(xen_in_preemptible_hcall, false);
		_cond_resched();
		__this_cpu_write(xen_in_preemptible_hcall, true);
	}
}
Ejemplo n.º 2
0
static int hinfc504_os_suspend(struct platform_device *pltdev,
			       pm_message_t state)
{
	struct hinfc_host *host = platform_get_drvdata(pltdev);

	while ((hinfc_read(host, HINFC504_STATUS ) & 0x1) == 0x0)
		;

	while ((hinfc_read(host, HINFC504_DMA_CTRL))
		& HINFC504_DMA_CTRL_DMA_START)
		_cond_resched();

	host->enable(host, DISABLE);

	return 0;
}