您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ xen_setup_runstate_info函数代码示例

51自学网 2021-06-03 10:18:17
  C++
这篇教程C++ xen_setup_runstate_info函数代码示例写得很实用,希望能帮到您。

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

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

示例1: xen_hvm_setup_cpu_clockevents

static void xen_hvm_setup_cpu_clockevents(void){	int cpu = smp_processor_id();	xen_setup_runstate_info(cpu);	xen_setup_timer(cpu);	xen_setup_cpu_clockevents();}
开发者ID:openube,项目名称:android_kernel_sony_c2305,代码行数:7,


示例2: xen_pv_cpu_up

static int xen_pv_cpu_up(unsigned int cpu, struct task_struct *idle){	int rc;	common_cpu_up(cpu, idle);	xen_setup_runstate_info(cpu);	/*	 * PV VCPUs are always successfully taken down (see 'while' loop	 * in xen_cpu_die()), so -EBUSY is an error.	 */	rc = cpu_check_up_prepare(cpu);	if (rc)		return rc;	/* make sure interrupts start blocked */	per_cpu(xen_vcpu, cpu)->evtchn_upcall_mask = 1;	rc = cpu_initialize_context(cpu, idle);	if (rc)		return rc;	xen_pmu_init(cpu);	rc = HYPERVISOR_vcpu_op(VCPUOP_up, xen_vcpu_nr(cpu), NULL);	BUG_ON(rc);	while (cpu_report_state(cpu) != CPU_ONLINE)		HYPERVISOR_sched_op(SCHEDOP_yield, NULL);	return 0;}
开发者ID:EMCAntimatter,项目名称:linux,代码行数:33,


示例3: xen_hvm_setup_cpu_clockevents

static void xen_hvm_setup_cpu_clockevents(void){	int cpu = smp_processor_id();	xen_setup_runstate_info(cpu);	/*	 * xen_setup_timer(cpu) - snprintf is bad in atomic context. Hence	 * doing it xen_hvm_cpu_notify (which gets called by smp_init during	 * early bootup and also during CPU hotplug events).	 */	xen_setup_cpu_clockevents();}
开发者ID:AdrianHuang,项目名称:linux-3.8.13,代码行数:11,


示例4: xen_hvm_post_suspend

void xen_hvm_post_suspend(int suspend_cancelled){	int cpu;	xen_hvm_init_shared_info();	xen_callback_vector();	if (xen_feature(XENFEAT_hvm_safe_pvclock)) {		for_each_online_cpu(cpu) {			xen_setup_runstate_info(cpu);		}	}}
开发者ID:1703011,项目名称:asuswrt-merlin,代码行数:11,


示例5: xen_hvm_post_suspend

static void xen_hvm_post_suspend(int suspend_cancelled){#ifdef CONFIG_XEN_PVHVM	int cpu;	xen_hvm_init_shared_info();	xen_callback_vector();	xen_unplug_emulated_devices();	if (xen_feature(XENFEAT_hvm_safe_pvclock)) {		for_each_online_cpu(cpu) {			xen_setup_runstate_info(cpu);		}	}#endif}
开发者ID:Abhi1919,项目名称:ath,代码行数:14,


示例6: xen_cpu_up

static int __cpuinit xen_cpu_up(unsigned int cpu){	struct task_struct *idle = idle_task(cpu);	int rc;	per_cpu(current_task, cpu) = idle;#ifdef CONFIG_X86_32	irq_ctx_init(cpu);#else	clear_tsk_thread_flag(idle, TIF_FORK);	per_cpu(kernel_stack, cpu) =		(unsigned long)task_stack_page(idle) -		KERNEL_STACK_OFFSET + THREAD_SIZE;	per_cpu(kernel_stack8k, cpu) =		(unsigned long)task_stack_page(idle) -		KERNEL_STACK_OFFSET + THREAD_SIZE - 8192;#endif	xen_setup_runstate_info(cpu);	xen_setup_timer(cpu);	xen_init_lock_cpu(cpu);	per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;	/* make sure interrupts start blocked */	per_cpu(xen_vcpu, cpu)->evtchn_upcall_mask = 1;	rc = cpu_initialize_context(cpu, idle);	if (rc)		return rc;	if (num_online_cpus() == 1)		alternatives_smp_switch(1);	rc = xen_smp_intr_init(cpu);	if (rc)		return rc;	rc = HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL);	BUG_ON(rc);	while(per_cpu(cpu_state, cpu) != CPU_ONLINE) {		HYPERVISOR_sched_op(SCHEDOP_yield, NULL);		barrier();	}	return 0;}
开发者ID:seyko2,项目名称:openvz_rhel6_kernel_mirror,代码行数:47,


示例7: xen_cpu_up

static int __cpuinit xen_cpu_up(unsigned int cpu, struct task_struct *idle){	int rc;	per_cpu(current_task, cpu) = idle;	per_cpu(current_tinfo, cpu) = &idle->tinfo;#ifdef CONFIG_X86_32	irq_ctx_init(cpu);#else	clear_tsk_thread_flag(idle, TIF_FORK);	per_cpu(kernel_stack, cpu) = (unsigned long)task_stack_page(idle) - 16 + THREAD_SIZE;#endif	xen_setup_runstate_info(cpu);	xen_setup_timer(cpu);	xen_init_lock_cpu(cpu);	per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;	/* make sure interrupts start blocked */	per_cpu(xen_vcpu, cpu)->evtchn_upcall_mask = 1;	rc = cpu_initialize_context(cpu, idle);	if (rc)		return rc;	if (num_online_cpus() == 1)		/* Just in case we booted with a single CPU. */		alternatives_enable_smp();	rc = xen_smp_intr_init(cpu);	if (rc)		return rc;	rc = HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL);	BUG_ON(rc);	while(per_cpu(cpu_state, cpu) != CPU_ONLINE) {		HYPERVISOR_sched_op(SCHEDOP_yield, NULL);		barrier();	}	return 0;}
开发者ID:garyvan,项目名称:openwrt-1.6,代码行数:43,


示例8: xen_vcpu_restore

/* * On restore, set the vcpu placement up again. * If it fails, then we're in a bad state, since * we can't back out from using it... */void xen_vcpu_restore(void){	int cpu;	for_each_online_cpu(cpu) {		bool other_cpu = (cpu != smp_processor_id());		if (other_cpu &&		    HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL))			BUG();		xen_setup_runstate_info(cpu);		if (have_vcpu_info_placement)			xen_vcpu_setup(cpu);		if (other_cpu &&		    HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL))			BUG();	}}
开发者ID:PivotalBigData,项目名称:PivotalHD,代码行数:26,


示例9: xen_time_init

static void __init xen_time_init(void){	int cpu = smp_processor_id();	struct timespec tp;	clocksource_register_hz(&xen_clocksource, NSEC_PER_SEC);	if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL) == 0) {		printk(KERN_DEBUG "Xen: using vcpuop timer interface/n");		xen_clockevent = &xen_vcpuop_clockevent;	}		xen_read_wallclock(&tp);	do_settimeofday(&tp);	setup_force_cpu_cap(X86_FEATURE_TSC);	xen_setup_runstate_info(cpu);	xen_setup_timer(cpu);	xen_setup_cpu_clockevents();}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:22,


示例10: xen_time_init

static void __init xen_time_init(void){	int cpu = smp_processor_id();	struct timespec tp;	clocksource_register_hz(&xen_clocksource, NSEC_PER_SEC);	if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL) == 0) {		/* Successfully turned off 100Hz tick, so we have the		   vcpuop-based timer interface */		printk(KERN_DEBUG "Xen: using vcpuop timer interface/n");		xen_clockevent = &xen_vcpuop_clockevent;	}	/* Set initial system time with full resolution */	xen_read_wallclock(&tp);	do_settimeofday(&tp);	setup_force_cpu_cap(X86_FEATURE_TSC);	xen_setup_runstate_info(cpu);	xen_setup_timer(cpu);	xen_setup_cpu_clockevents();}
开发者ID:openube,项目名称:android_kernel_sony_c2305,代码行数:24,


示例11: xen_time_init

__init void xen_time_init(void){	int cpu = smp_processor_id();	clocksource_register(&xen_clocksource);	if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL) == 0) {		/* Successfully turned off 100Hz tick, so we have the		   vcpuop-based timer interface */		printk(KERN_DEBUG "Xen: using vcpuop timer interface/n");		xen_clockevent = &xen_vcpuop_clockevent;	}	/* Set initial system time with full resolution */	xen_read_wallclock(&xtime);	set_normalized_timespec(&wall_to_monotonic,				-xtime.tv_sec, -xtime.tv_nsec);	setup_force_cpu_cap(X86_FEATURE_TSC);	xen_setup_runstate_info(cpu);	xen_setup_timer(cpu);	xen_setup_cpu_clockevents();}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:24,


示例12: xen_setup_timer

void xen_setup_timer(int cpu){	const char *name;	struct clock_event_device *evt;	int irq;	printk(KERN_INFO "installing Xen timer for CPU %d/n", cpu);	name = kasprintf(GFP_KERNEL, "timer%d", cpu);	if (!name)		name = "<timer kasprintf failed>";	irq = bind_virq_to_irqhandler(VIRQ_TIMER, cpu, xen_timer_interrupt,				      IRQF_DISABLED|IRQF_PERCPU|IRQF_NOBALANCING|IRQF_TIMER,				      name, NULL);	evt = &per_cpu(xen_clock_events, cpu);	memcpy(evt, xen_clockevent, sizeof(*evt));	evt->cpumask = cpumask_of(cpu);	evt->irq = irq;	xen_setup_runstate_info(cpu);}
开发者ID:kaustubh-kabra,项目名称:xenified-jeremy-kernel-,代码行数:24,


示例13: xen_start_kernel

//.........这里部分代码省略.........	__userpte_alloc_gfp &= ~__GFP_HIGHMEM;#ifdef CONFIG_X86_64	/* Work out if we support NX */	check_efer();#endif	xen_setup_features();	/* Get mfn list */	if (!xen_feature(XENFEAT_auto_translated_physmap))		xen_build_dynamic_phys_to_machine();	/*	 * Set up kernel GDT and segment registers, mainly so that	 * -fstack-protector code can be executed.	 */	xen_setup_stackprotector();	xen_init_irq_ops();	xen_init_cpuid_mask();#ifdef CONFIG_X86_LOCAL_APIC	/*	 * set up the basic apic ops.	 */	set_xen_basic_apic_ops();#endif	if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) {		pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start;		pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit;	}	machine_ops = xen_machine_ops;	/*	 * The only reliable way to retain the initial address of the	 * percpu gdt_page is to remember it here, so we can go and	 * mark it RW later, when the initial percpu area is freed.	 */	xen_initial_gdt = &per_cpu(gdt_page, 0);	xen_smp_init();	pgd = (pgd_t *)xen_start_info->pt_base;	/* Don't do the full vcpu_info placement stuff until we have a	   possible map and a non-dummy shared_info. */	per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];	local_irq_disable();	early_boot_irqs_off();	xen_raw_console_write("mapping kernel into physical memory/n");	pgd = xen_setup_kernel_pagetable(pgd, xen_start_info->nr_pages);	init_mm.pgd = pgd;	/* keep using Xen gdt for now; no urgent need to change it */	pv_info.kernel_rpl = 1;	if (xen_feature(XENFEAT_supervisor_mode_kernel))		pv_info.kernel_rpl = 0;	/* set the limit of our address space */	xen_reserve_top();#ifdef CONFIG_X86_32	/* set up basic CPUID stuff */	cpu_detect(&new_cpu_data);	new_cpu_data.hard_math = 1;	new_cpu_data.wp_works_ok = 1;	new_cpu_data.x86_capability[0] = cpuid_edx(1);#endif	/* Poke various useful things into boot_params */	boot_params.hdr.type_of_loader = (9 << 4) | 0;	boot_params.hdr.ramdisk_image = xen_start_info->mod_start		? __pa(xen_start_info->mod_start) : 0;	boot_params.hdr.ramdisk_size = xen_start_info->mod_len;	boot_params.hdr.cmd_line_ptr = __pa(xen_start_info->cmd_line);	if (!xen_initial_domain()) {		add_preferred_console("xenboot", 0, NULL);		add_preferred_console("tty", 0, NULL);		add_preferred_console("hvc", 0, NULL);	}	xen_raw_console_write("about to get started.../n");	xen_setup_runstate_info(0);	/* Start the world */#ifdef CONFIG_X86_32	i386_start_kernel();#else	x86_64_start_reservations((char *)__pa_symbol(&boot_params));#endif}
开发者ID:ArthySundaram,项目名称:firstrepo,代码行数:101,



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


C++ xen_vcpu_setup函数代码示例
C++ xen_reboot函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。