• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ cpu_do_idle函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中cpu_do_idle函数的典型用法代码示例。如果您正苦于以下问题:C++ cpu_do_idle函数的具体用法?C++ cpu_do_idle怎么用?C++ cpu_do_idle使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了cpu_do_idle函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: arch_cpu_idle

/*
 * This is our default idle handler.
 */
void arch_cpu_idle(void)
{
	/*
	 * This should do all the clock switching and wait for interrupt
	 * tricks
	 */
	trace_cpu_idle_rcuidle(1, smp_processor_id());
	cpu_do_idle();
	local_irq_enable();
	trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:14,代码来源:process.c


示例2: s5p64x0_idle

static void s5p64x0_idle(void)
{
	unsigned long val;

	val = __raw_readl(S5P64X0_PWR_CFG);
	val &= ~(0x3 << 5);
	val |= (0x1 << 5);
	__raw_writel(val, S5P64X0_PWR_CFG);

	cpu_do_idle();
}
开发者ID:Emerson3074,项目名称:linux,代码行数:11,代码来源:common.c


示例3: xilinx_enter_idle

/* Actual code that puts the SoC in different idle states */
static int xilinx_enter_idle(struct cpuidle_device *dev,
		struct cpuidle_driver *drv, int index)
{
	struct timeval before, after;
	int idle_time;

	local_irq_disable();
	do_gettimeofday(&before);

	if (index == 0)
		/* Wait for interrupt state */
		cpu_do_idle();

	else if (index == 1) {
		unsigned int cpu_id = smp_processor_id();

		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu_id);

		/* Devices must be stopped here */
		cpu_pm_enter();

		/* Add code for DDR self refresh start */

		cpu_do_idle();
		/*cpu_suspend(foo, bar);*/

		/* Add code for DDR self refresh stop */

		cpu_pm_exit();

		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu_id);
	}

	do_gettimeofday(&after);
	local_irq_enable();
	idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC +
			(after.tv_usec - before.tv_usec);

	dev->last_residency = idle_time;
	return index;
}
开发者ID:Analias,项目名称:SNOWLeo-SDR-1,代码行数:42,代码来源:cpuidle.c


示例4: rk3288_cpuidle_enter

static int rk3288_cpuidle_enter(struct cpuidle_device *dev,
		struct cpuidle_driver *drv, int index)
{
	void *sel = RK_CRU_VIRT + RK3288_CRU_CLKSELS_CON(36);
	u32 con = readl_relaxed(sel);
	u32 cpu = MPIDR_AFFINITY_LEVEL(read_cpuid_mpidr(), 0);
	writel_relaxed(0x70007 << (cpu << 2), sel);
	cpu_do_idle();
	writel_relaxed((0x70000 << (cpu << 2)) | con, sel);
	dsb();
	return index;
}
开发者ID:Astralix,项目名称:kernel,代码行数:12,代码来源:rk3288.c


示例5: zynq_cpu_die

/**
 * zynq_cpu_die - Let a CPU core die
 * @cpu:	Dying CPU
 *
 * Platform-specific code to shutdown a CPU.
 * Called with IRQs disabled on the dying CPU.
 */
static void zynq_cpu_die(unsigned int cpu)
{
	zynq_slcr_cpu_state_write(cpu, true);

	/*
	 * there is no power-control hardware on this platform, so all
	 * we can do is put the core into WFI; this is safe as the calling
	 * code will have already disabled interrupts
	 */
	for (;;)
		cpu_do_idle();
}
开发者ID:020gzh,项目名称:linux,代码行数:19,代码来源:platsmp.c


示例6: mxs_suspend_enter

static int mxs_suspend_enter(suspend_state_t state)
{
    switch (state) {
    case PM_SUSPEND_MEM:
        cpu_do_idle();
        break;

    default:
        return -EINVAL;
    }
    return 0;
}
开发者ID:openube,项目名称:android_kernel_sony_c2305,代码行数:12,代码来源:pm.c


示例7: highbank_cpu_die

/*
 * platform-specific code to shutdown a CPU
 *
 */
void __ref highbank_cpu_die(unsigned int cpu)
{
	flush_cache_all();

	highbank_set_cpu_jump(cpu, secondary_startup);
	highbank_set_core_pwr();

	cpu_do_idle();

	/* We should never return from idle */
	panic("highbank: cpu %d unexpectedly exit from shutdown\n", cpu);
}
开发者ID:BaoleiSu,项目名称:linux,代码行数:16,代码来源:hotplug.c


示例8: arch_idle

/*!
 * This function puts the CPU into idle mode. It is called by default_idle()
 * in process.c file.
 */
void arch_idle(void)
{
	/*
	 * This should do all the clock switching
	 * and wait for interrupt tricks.
	 */
	if (!mxc_jtag_enabled) {
		/* set as Wait mode */
		mxc_cpu_lp_set(WAIT_UNCLOCKED);
		cpu_do_idle();
	}
}
开发者ID:despierto,项目名称:imx_233_linux,代码行数:16,代码来源:system.c


示例9: platform_cpu_die

/*
 * platform-specific code to shutdown a CPU
 *
 */
void platform_cpu_die(unsigned int cpu)
{
	flush_cache_all();

	highbank_set_cpu_jump(cpu, secondary_startup);
	scu_power_mode(scu_base_addr, SCU_PM_POWEROFF);

	cpu_do_idle();

	/* We should never return from idle */
	panic("highbank: cpu %d unexpectedly exit from shutdown\n", cpu);
}
开发者ID:08opt,项目名称:linux,代码行数:16,代码来源:hotplug.c


示例10: mt6735_rgidle_enter

static int mt6735_rgidle_enter(struct cpuidle_device *dev,
			      struct cpuidle_driver *drv, int index)
{
    if (printk_ratelimit())
        printk(KERN_WARNING "MT6735 cpuidle rgidle\n");

	cpu_do_idle();

    idle_cnt_inc(IDLE_TYPE_RG, smp_processor_id());

	return index;
}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:12,代码来源:cpuidle-mt6735.c


示例11: mt6735_soidle_enter

static int mt6735_soidle_enter(struct cpuidle_device *dev,
			      struct cpuidle_driver *drv, int index)
{
    if (printk_ratelimit())
        printk(KERN_WARNING "MT6735 cpuidle SODI\n");

	cpu_do_idle();

    idle_cnt_inc(IDLE_TYPE_SO, 0);

	return index;
}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:12,代码来源:cpuidle-mt6735.c


示例12: highbank_suspend_finish

static int highbank_suspend_finish(unsigned long val)
{
	outer_flush_all();
	outer_disable();

	highbank_set_pwr_suspend();

	cpu_do_idle();

	highbank_clear_pwr_request();
	return 0;
}
开发者ID:Abhinav1997,项目名称:kernel-personal,代码行数:12,代码来源:pm.c


示例13: socfpga_cpu_die

/*
 * platform-specific code to shutdown a CPU
 *
 * Called with IRQs disabled
 */
static void socfpga_cpu_die(unsigned int cpu)
{
	/* Flush the L1 data cache. */
	flush_cache_all();

	/* This will put CPU #1 into reset.*/
	__raw_writel(RSTMGR_MPUMODRST_CPU1, rst_manager_base_addr + 0x10);

	cpu_do_idle();

	/* We should have never returned from idle */
	panic("cpu %d unexpectedly exit from shutdown\n", cpu);
}
开发者ID:coliby,项目名称:terasic_MTL,代码行数:18,代码来源:platsmp.c


示例14: meson_enter_idle_simple

int meson_enter_idle_simple(struct cpuidle_device *dev,
			struct cpuidle_driver *drv,
			int index)
{
	local_fiq_disable();
//	printk("enter wfi.\n");
	cpu_do_idle();
//	printk("exit wfi.\n");

	local_fiq_enable();

	return index;
}
开发者ID:OpenLD,项目名称:linux-wetek-3.10.y,代码行数:13,代码来源:plat-cpuidle.c


示例15: s3c2412_idle

static void s3c2412_idle(void)
{
    unsigned long tmp;

    /* ensure our idle mode is to go to idle */

    tmp = __raw_readl(S3C2412_PWRCFG);
    tmp &= ~S3C2412_PWRCFG_STANDBYWFI_MASK;
    tmp |= S3C2412_PWRCFG_STANDBYWFI_IDLE;
    __raw_writel(tmp, S3C2412_PWRCFG);

    cpu_do_idle();
}
开发者ID:274914765,项目名称:C,代码行数:13,代码来源:s3c2412.c


示例16: s5p6440_idle

static void s5p6440_idle(void)
{
	unsigned long tmp;

	/* Ensure our idle mode is to go to idle */
	/* Set WFI instruction to SLEEP mode */
	tmp = __raw_readl(S3C_PWR_CFG);
	tmp &= ~(0x3<<5);
	tmp |= (0x1<<5);
	__raw_writel(tmp, S3C_PWR_CFG);

	cpu_do_idle();
}
开发者ID:ZhizhouTian,项目名称:s3c-linux,代码行数:13,代码来源:cpu.c


示例17: s5p64x0_idle

static void s5p64x0_idle(void)
{
	unsigned long val;

	if (!need_resched()) {
		val = __raw_readl(S5P64X0_PWR_CFG);
		val &= ~(0x3 << 5);
		val |= (0x1 << 5);
		__raw_writel(val, S5P64X0_PWR_CFG);

		cpu_do_idle();
	}
	local_irq_enable();
}
开发者ID:33d,项目名称:linux-2.6.21-hh20,代码行数:14,代码来源:common.c


示例18: arch_idle

/*!
 * This function puts the CPU into idle mode. It is called by default_idle()
 * in process.c file.
 */
void arch_idle(void)
{
	unsigned long crm_ctrl;

	/*
	 * This should do all the clock switching
	 * and wait for interrupt tricks.
	 */
	if ((__raw_readl(AVIC_VECTOR) & MXC_WFI_ENABLE) != 0) {
		crm_ctrl = (__raw_readl(CRM_CONTROL) & ~(LPMD1)) | (LPMD0);
		__raw_writel(crm_ctrl, CRM_CONTROL);
		cpu_do_idle();
	}
}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:18,代码来源:system.c


示例19: imx5_idle

static void imx5_idle(void)
{
	/*                              */
	if (gpc_dvfs_clk == NULL) {
		gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs");
		if (IS_ERR(gpc_dvfs_clk))
			return;
	}
	clk_enable(gpc_dvfs_clk);
	mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
	if (!tzic_enable_wake())
		cpu_do_idle();
	clk_disable(gpc_dvfs_clk);
}
开发者ID:curbthepain,项目名称:android_kernel_us990_rev,代码行数:14,代码来源:mm-imx5.c


示例20: imx6sl_enter_wait

static int imx6sl_enter_wait(struct cpuidle_device *dev,
			    struct cpuidle_driver *drv, int index)
{
	imx6q_set_lpm(WAIT_UNCLOCKED);
	/*
	 * Software workaround for ERR005311, see function
	 * description for details.
	 */
	imx6sl_set_wait_clk(true);
	cpu_do_idle();
	imx6sl_set_wait_clk(false);
	imx6q_set_lpm(WAIT_CLOCKED);

	return index;
}
开发者ID:BinVul,项目名称:linux2.6.32,代码行数:15,代码来源:cpuidle-imx6sl.c



注:本文中的cpu_do_idle函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ cpu_down函数代码示例发布时间:2022-05-30
下一篇:
C++ cpu_data函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap