当前位置: 首页>>代码示例>>C++>>正文


C++ disable_local_APIC函数代码示例

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


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

示例1: crash_nmi_callback

static int crash_nmi_callback(struct notifier_block *self,
			unsigned long val, void *data)
{
	struct pt_regs *regs;
	struct pt_regs fixed_regs;
	int cpu;

	if (val != DIE_NMI_IPI)
		return NOTIFY_OK;

	regs = ((struct die_args *)data)->regs;
	cpu = raw_smp_processor_id();

	/* Don't do anything if this handler is invoked on crashing cpu.
	 * Otherwise, system will completely hang. Crashing cpu can get
	 * an NMI if system was initially booted with nmi_watchdog parameter.
	 */
	if (cpu == crashing_cpu)
		return NOTIFY_STOP;
	local_irq_disable();

	if (!user_mode_vm(regs)) {
		crash_fixup_ss_esp(&fixed_regs, regs);
		regs = &fixed_regs;
	}
	crash_save_cpu(regs, cpu);
	disable_local_APIC();
	atomic_dec(&waiting_for_crash_ipi);
	/* Assume hlt works */
	halt();
	for (;;)
		cpu_relax();

	return 1;
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:35,代码来源:crash.c

示例2: lapic_suspend

static int lapic_suspend(struct sys_device *dev, pm_message_t state)
{
    unsigned long flags;
    int maxlvt;

    if (!apic_pm_state.active)
        return 0;

    maxlvt = lapic_get_maxlvt();

    apic_pm_state.apic_id = read_apic_id();
    apic_pm_state.apic_taskpri = apic_read(APIC_TASKPRI);
    apic_pm_state.apic_ldr = apic_read(APIC_LDR);
    apic_pm_state.apic_dfr = apic_read(APIC_DFR);
    apic_pm_state.apic_spiv = apic_read(APIC_SPIV);
    apic_pm_state.apic_lvtt = apic_read(APIC_LVTT);
    if (maxlvt >= 4)
        apic_pm_state.apic_lvtpc = apic_read(APIC_LVTPC);
    apic_pm_state.apic_lvt0 = apic_read(APIC_LVT0);
    apic_pm_state.apic_lvt1 = apic_read(APIC_LVT1);
    apic_pm_state.apic_lvterr = apic_read(APIC_LVTERR);
    apic_pm_state.apic_tmict = apic_read(APIC_TMICT);
    apic_pm_state.apic_tdcr = apic_read(APIC_TDCR);
#ifdef CONFIG_X86_MCE_INTEL
    if (maxlvt >= 5)
        apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR);
#endif
    local_irq_save(flags);
    disable_local_APIC();
    local_irq_restore(flags);
    return 0;
}
开发者ID:liuyang201666,项目名称:linux-akae,代码行数:32,代码来源:apic_64.c

示例3: kdump_nmi_shootdown_cpus

static void kdump_nmi_shootdown_cpus(void)
{
	in_crash_kexec = 1;
	nmi_shootdown_cpus(kdump_nmi_callback);

	disable_local_APIC();
}
开发者ID:novic,项目名称:AniDroid-Hardened-Kernel,代码行数:7,代码来源:crash.c

示例4: apic_pm_suspend

static void apic_pm_suspend(void *data)
{
	unsigned int l, h;
	unsigned long flags;

	if (apic_pm_state.perfctr_pmdev)
		pm_send(apic_pm_state.perfctr_pmdev, PM_SUSPEND, data);
	apic_pm_state.apic_id = apic_read(APIC_ID);
	apic_pm_state.apic_taskpri = apic_read(APIC_TASKPRI);
	apic_pm_state.apic_ldr = apic_read(APIC_LDR);
	apic_pm_state.apic_dfr = apic_read(APIC_DFR);
	apic_pm_state.apic_spiv = apic_read(APIC_SPIV);
	apic_pm_state.apic_lvtt = apic_read(APIC_LVTT);
	apic_pm_state.apic_lvtpc = apic_read(APIC_LVTPC);
	apic_pm_state.apic_lvt0 = apic_read(APIC_LVT0);
	apic_pm_state.apic_lvt1 = apic_read(APIC_LVT1);
	apic_pm_state.apic_lvterr = apic_read(APIC_LVTERR);
	apic_pm_state.apic_tmict = apic_read(APIC_TMICT);
	apic_pm_state.apic_tdcr = apic_read(APIC_TDCR);
	__save_flags(flags);
	__cli();
	disable_local_APIC();
	rdmsr(MSR_IA32_APICBASE, l, h);
	l &= ~MSR_IA32_APICBASE_ENABLE;
	wrmsr(MSR_IA32_APICBASE, l, h);
	__restore_flags(flags);
}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:27,代码来源:apic.c

示例5: crash_nmi_callback

static int crash_nmi_callback(struct pt_regs *regs, int cpu)
{
	struct pt_regs fixed_regs;

	/* Don't do anything if this handler is invoked on crashing cpu.
	 * Otherwise, system will completely hang. Crashing cpu can get
	 * an NMI if system was initially booted with nmi_watchdog parameter.
	 */
	if (cpu == crashing_cpu)
		return 1;
	local_irq_disable();

	if (!user_mode_vm(regs)) {
		crash_fixup_ss_esp(&fixed_regs, regs);
		regs = &fixed_regs;
	}
	crash_save_this_cpu(regs, cpu);
	disable_local_APIC();
	atomic_dec(&waiting_for_crash_ipi);
	/* Assume hlt works */
	halt();
	for (;;)
		cpu_relax();

	return 1;
}
开发者ID:Broadcom,项目名称:stblinux-2.6.18,代码行数:26,代码来源:crash.c

示例6: lapic_suspend

static int lapic_suspend(struct sys_device *dev, u32 state)
{
	unsigned long flags;

	if (!apic_pm_state.active)
		return 0;

	apic_pm_state.apic_id = apic_read(APIC_ID);
	apic_pm_state.apic_taskpri = apic_read(APIC_TASKPRI);
	apic_pm_state.apic_ldr = apic_read(APIC_LDR);
	apic_pm_state.apic_dfr = apic_read(APIC_DFR);
	apic_pm_state.apic_spiv = apic_read(APIC_SPIV);
	apic_pm_state.apic_lvtt = apic_read(APIC_LVTT);
	apic_pm_state.apic_lvtpc = apic_read(APIC_LVTPC);
	apic_pm_state.apic_lvt0 = apic_read(APIC_LVT0);
	apic_pm_state.apic_lvt1 = apic_read(APIC_LVT1);
	apic_pm_state.apic_lvterr = apic_read(APIC_LVTERR);
	apic_pm_state.apic_tmict = apic_read(APIC_TMICT);
	apic_pm_state.apic_tdcr = apic_read(APIC_TDCR);
	apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR);
	local_save_flags(flags);
	local_irq_disable();
	disable_local_APIC();
	local_irq_restore(flags);
	return 0;
}
开发者ID:daniter-cu,项目名称:fuck_reuben,代码行数:26,代码来源:apic.c

示例7: lapic_suspend

int lapic_suspend(void)
{
    unsigned long flags;
    int maxlvt = get_maxlvt();
    if (!apic_pm_state.active)
        return 0;

    apic_pm_state.apic_id = apic_read(APIC_ID);
    apic_pm_state.apic_taskpri = apic_read(APIC_TASKPRI);
    apic_pm_state.apic_ldr = apic_read(APIC_LDR);
    apic_pm_state.apic_dfr = apic_read(APIC_DFR);
    apic_pm_state.apic_spiv = apic_read(APIC_SPIV);
    apic_pm_state.apic_lvtt = apic_read(APIC_LVTT);
    if (maxlvt >= 4)
        apic_pm_state.apic_lvtpc = apic_read(APIC_LVTPC);

    if (maxlvt >= 6) {
        apic_pm_state.apic_lvtcmci = apic_read(APIC_CMCI);
    }

    apic_pm_state.apic_lvt0 = apic_read(APIC_LVT0);
    apic_pm_state.apic_lvt1 = apic_read(APIC_LVT1);
    apic_pm_state.apic_lvterr = apic_read(APIC_LVTERR);
    apic_pm_state.apic_tmict = apic_read(APIC_TMICT);
    apic_pm_state.apic_tdcr = apic_read(APIC_TDCR);
    if (maxlvt >= 5)
        apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR);

    local_irq_save(flags);
    disable_local_APIC();
    iommu_disable_x2apic_IR();
    local_irq_restore(flags);
    return 0;
}
开发者ID:SunnyRaj,项目名称:xen-4.6,代码行数:34,代码来源:apic.c

示例8: smp_send_stop

void smp_send_stop(void)
{
	smp_call_function(stop_this_cpu, NULL, 1, 0);

	local_irq_disable();
	disable_local_APIC();
	local_irq_enable();
}
开发者ID:qwerty1023,项目名称:wive-rtnl-firmware,代码行数:8,代码来源:smp.c

示例9: lapic_shutdown

/*
 * If Linux enabled the LAPIC against the BIOS default
 * disable it down before re-entering the BIOS on shutdown.
 * Otherwise the BIOS may get confused and not power-off.
 */
void lapic_shutdown(void)
{
	if (!cpu_has_apic || !enabled_via_apicbase)
		return;

	local_irq_disable();
	disable_local_APIC();
	local_irq_enable();
}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:14,代码来源:apic.c

示例10: smp_send_stop

void smp_send_stop(void)
{
	smp_call_function(stop_this_cpu, NULL, 1, 0);
	smp_num_cpus = 1;

	__cli();
	disable_local_APIC();
	__sti();
}
开发者ID:muromec,项目名称:linux-ezxdev,代码行数:9,代码来源:smp.c

示例11: smp_stop_cpu

void smp_stop_cpu(void)
{
	/*
	 * Remove this CPU:
	 */
	cpu_clear(smp_processor_id(), cpu_online_map);
	local_irq_disable();
	disable_local_APIC();
	local_irq_enable(); 
}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:10,代码来源:smp.c

示例12: stop_this_cpu

static void stop_this_cpu (void * dummy)
{
	/*
	 * Remove this CPU:
	 */
	clear_bit(smp_processor_id(), &cpu_online_map);
	__cli();
	disable_local_APIC();
	for(;;) __asm__("hlt");
	for (;;);
}
开发者ID:muromec,项目名称:linux-ezxdev,代码行数:11,代码来源:smp.c

示例13: stop_this_cpu

static void stop_this_cpu (void * dummy)
{
    local_irq_disable();
    /*
     * Remove this CPU:
     */
    cpu_clear(smp_processor_id(), cpu_online_map);
    disable_local_APIC();
    if (cpu_data[smp_processor_id()].hlt_works_ok)
        for(;;) halt();
    for (;;);
}
开发者ID:helicopter3,项目名称:wl500g,代码行数:12,代码来源:smp.c

示例14: stop_this_cpu

void stop_this_cpu(void *dummy)
{
	local_irq_disable();
	/*
	 * Remove this CPU:
	 */
	set_cpu_online(smp_processor_id(), false);
	disable_local_APIC();

	for (;;)
		halt();
}
开发者ID:JcShang,项目名称:linux-80211n-csitool,代码行数:12,代码来源:process.c

示例15: native_smp_send_stop

static void native_smp_send_stop(void)
{
    /* Don't deadlock on the call lock in panic */
    int nolock = !spin_trylock(&call_lock);
    unsigned long flags;

    local_irq_save(flags);
    __smp_call_function(stop_this_cpu, NULL, 0, 0);
    if (!nolock)
        spin_unlock(&call_lock);
    disable_local_APIC();
    local_irq_restore(flags);
}
开发者ID:helicopter3,项目名称:wl500g,代码行数:13,代码来源:smp.c


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