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

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

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

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

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

示例1: vfp_init

/* * VFP support code initialisation. */static int __init vfp_init(void){	unsigned int vfpsid;	unsigned int cpu_arch = cpu_architecture();	if (cpu_arch >= CPU_ARCH_ARMv6)		vfp_enable(NULL);	/*	 * First check that there is a VFP that we can use.	 * The handler is already setup to just log calls, so	 * we just need to read the VFPSID register.	 */	vfp_vector = vfp_testing_entry;	barrier();	vfpsid = fmrx(FPSID);	barrier();	vfp_vector = vfp_null_entry;	printk(KERN_INFO "VFP support v0.3: ");	if (VFP_arch)		printk("not present/n");	else if (vfpsid & FPSID_NODOUBLE) {		printk("no double precision support/n");	} else {		smp_call_function(vfp_enable, NULL, 1);		VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT;  /* Extract the architecture version */		printk("implementor %02x architecture %d part %02x variant %x rev %x/n",			(vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT,			(vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT,			(vfpsid & FPSID_PART_MASK) >> FPSID_PART_BIT,			(vfpsid & FPSID_VARIANT_MASK) >> FPSID_VARIANT_BIT,			(vfpsid & FPSID_REV_MASK) >> FPSID_REV_BIT);		vfp_vector = vfp_support_entry;		thread_register_notifier(&vfp_notifier_block);		vfp_pm_init();		/*		 * We detected VFP, and the support code is		 * in place; report VFP support to userspace.		 */		elf_hwcap |= HWCAP_VFP;#ifdef CONFIG_NEON		/*		 * Check for the presence of the Advanced SIMD		 * load/store instructions, integer and single		 * precision floating point operations.		 */		if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100)			elf_hwcap |= HWCAP_NEON;#endif	}	return 0;}
开发者ID:thornbirdblue,项目名称:8064_kernel,代码行数:60,


示例2: vfp_init

/* * VFP support code initialisation. */static int __init vfp_init(void){	unsigned int vfpsid;	unsigned int cpu_arch = cpu_architecture();	if (cpu_arch >= CPU_ARCH_ARMv6)		on_each_cpu(vfp_enable, NULL, 1);	/*	 * First check that there is a VFP that we can use.	 * The handler is already setup to just log calls, so	 * we just need to read the VFPSID register.	 */	vfp_vector = vfp_testing_entry;	barrier();	vfpsid = fmrx(FPSID);	barrier();	vfp_vector = vfp_null_entry;	printk(KERN_INFO "VFP support v0.3: ");	if (VFP_arch)		printk("not present/n");	else if (vfpsid & FPSID_NODOUBLE) {		printk("no double precision support/n");	} else {		hotcpu_notifier(vfp_hotplug, 0);		VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT;  /* Extract the architecture version */		printk("implementor %02x architecture %d part %02x variant %x rev %x/n",			(vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT,			(vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT,			(vfpsid & FPSID_PART_MASK) >> FPSID_PART_BIT,			(vfpsid & FPSID_VARIANT_MASK) >> FPSID_VARIANT_BIT,			(vfpsid & FPSID_REV_MASK) >> FPSID_REV_BIT);		vfp_vector = vfp_support_entry;		thread_register_notifier(&vfp_notifier_block);		vfp_pm_init();		/*		 * We detected VFP, and the support code is		 * in place; report VFP support to userspace.		 */		elf_hwcap |= HWCAP_VFP;#ifdef CONFIG_VFPv3		if (VFP_arch >= 2) {			elf_hwcap |= HWCAP_VFPv3;			/*			 * Check for VFPv3 D16 and VFPv4 D16.  CPUs in			 * this configuration only have 16 x 64bit			 * registers.			 */			if (((fmrx(MVFR0) & MVFR0_A_SIMD_MASK)) == 1)				elf_hwcap |= HWCAP_VFPv3D16; /* also v4-D16 */			else				elf_hwcap |= HWCAP_VFPD32;		}#endif		/*		 * Check for the presence of the Advanced SIMD		 * load/store instructions, integer and single		 * precision floating point operations. Only check		 * for NEON if the hardware has the MVFR registers.		 */		if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) {#ifdef CONFIG_NEON			if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100)				elf_hwcap |= HWCAP_NEON;#endif			if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000)				elf_hwcap |= HWCAP_VFPv4;		}	}	return 0;}
开发者ID:InhyukYee,项目名称:PeanutButterWolf,代码行数:80,


示例3: vfp_init

static int __init vfp_init(void){	unsigned int vfpsid;	unsigned int cpu_arch = cpu_architecture();#ifdef CONFIG_PROC_FS	static struct proc_dir_entry *procfs_entry;#endif	if (cpu_arch >= CPU_ARCH_ARMv6)		on_each_cpu(vfp_enable, NULL, 1);	vfp_vector = vfp_testing_entry;	barrier();	vfpsid = fmrx(FPSID);	barrier();	vfp_vector = vfp_null_entry;	printk(KERN_INFO "VFP support v0.3: ");	if (VFP_arch)		printk("not present/n");	else if (vfpsid & FPSID_NODOUBLE) {		printk("no double precision support/n");	} else {		hotcpu_notifier(vfp_hotplug, 0);		VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT;  		printk("implementor %02x architecture %d part %02x variant %x rev %x/n",			(vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT,			(vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT,			(vfpsid & FPSID_PART_MASK) >> FPSID_PART_BIT,			(vfpsid & FPSID_VARIANT_MASK) >> FPSID_VARIANT_BIT,			(vfpsid & FPSID_REV_MASK) >> FPSID_REV_BIT);		vfp_vector = vfp_support_entry;		thread_register_notifier(&vfp_notifier_block);		vfp_pm_init();		elf_hwcap |= HWCAP_VFP;#ifdef CONFIG_VFPv3		if (VFP_arch >= 2) {			elf_hwcap |= HWCAP_VFPv3;			/*			 * Check for VFPv3 D16 and VFPv4 D16.  CPUs in			 * this configuration only have 16 x 64bit			 * registers.			 */			if (((fmrx(MVFR0) & MVFR0_A_SIMD_MASK)) == 1)				elf_hwcap |= HWCAP_VFPv3D16; /* also v4-D16 */			else				elf_hwcap |= HWCAP_VFPD32;		}#endif		if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) {#ifdef CONFIG_NEON			if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100)				elf_hwcap |= HWCAP_NEON;#endif#ifdef CONFIG_VFPv3			if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000)				elf_hwcap |= HWCAP_VFPv4;#endif		}	}#ifdef CONFIG_PROC_FS	procfs_entry = create_proc_entry("cpu/vfp_bounce", S_IRUGO, NULL);	if (procfs_entry)		procfs_entry->read_proc = proc_read_status;	else		pr_err("Failed to create procfs node for VFP bounce reporting/n");#endif	return 0;}
开发者ID:MarcoMas6,项目名称:android_kernel_htc_liberty-villec2,代码行数:76,


示例4: vfp_init

/* * VFP support code initialisation. */static int __init vfp_init(void){	unsigned int vfpsid;	unsigned int cpu_arch = cpu_architecture();#ifdef CONFIG_USA_MODEL_SGH_I757	struct cpumask cpus_curr, cpus;	sched_getaffinity(current->pid,&cpus_curr);	cpumask_clear(&cpus);	cpumask_set_cpu(smp_processor_id(), &cpus);	if (sched_setaffinity(current->pid, &cpus))		pr_err("%s: vfp_init set CPU affinity failed Proceeding on Risk/n",				__func__);	else		pr_err("%s : affinity set to CPU %d/n",__func__,smp_processor_id());#endif	if (cpu_arch >= CPU_ARCH_ARMv6)		vfp_enable(NULL);	/*	 * First check that there is a VFP that we can use.	 * The handler is already setup to just log calls, so	 * we just need to read the VFPSID register.	 */	vfp_vector = vfp_testing_entry;	barrier();	vfpsid = fmrx(FPSID);	barrier();	vfp_vector = vfp_null_entry;	printk(KERN_INFO "VFP support v0.3: ");	if (VFP_arch)		printk("not present/n");	else if (vfpsid & FPSID_NODOUBLE) {		printk("no double precision support/n");	} else {		hotcpu_notifier(vfp_hotplug, 0);		smp_call_function(vfp_enable, NULL, 1);		VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT;  /* Extract the architecture version */		printk("implementor %02x architecture %d part %02x variant %x rev %x/n",			(vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT,			(vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT,			(vfpsid & FPSID_PART_MASK) >> FPSID_PART_BIT,			(vfpsid & FPSID_VARIANT_MASK) >> FPSID_VARIANT_BIT,			(vfpsid & FPSID_REV_MASK) >> FPSID_REV_BIT);		vfp_vector = vfp_support_entry;		thread_register_notifier(&vfp_notifier_block);		vfp_pm_init();		/*		 * We detected VFP, and the support code is		 * in place; report VFP support to userspace.		 */		elf_hwcap |= HWCAP_VFP;#ifdef CONFIG_VFPv3		if (VFP_arch >= 2) {			elf_hwcap |= HWCAP_VFPv3;			/*			 * Check for VFPv3 D16 and VFPv4 D16.  CPUs in			 * this configuration only have 16 x 64bit			 * registers.			 */			if (((fmrx(MVFR0) & MVFR0_A_SIMD_MASK)) == 1)				elf_hwcap |= HWCAP_VFPv3D16; /* also v4-D16 */			else				elf_hwcap |= HWCAP_VFPD32;		}#endif		/*		 * Check for the presence of the Advanced SIMD		 * load/store instructions, integer and single		 * precision floating point operations. Only check		 * for NEON if the hardware has the MVFR registers.		 */		if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) {#ifdef CONFIG_NEON			if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100)				elf_hwcap |= HWCAP_NEON;#endif			if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000 ||			    (read_cpuid_id() & 0xff00fc00) == 0x51000400)				elf_hwcap |= HWCAP_VFPv4;		}	}#ifdef CONFIG_USA_MODEL_SGH_I757	if (sched_setaffinity(current->pid, &cpus_curr))		pr_err("%s: vfp_init restore CPU affinity failed Proceeding on Risk/n",			__func__);	else		pr_err("%s : affinity restored to %x/n",__func__,*((int *)(cpus_curr.bits)));#endif//.........这里部分代码省略.........
开发者ID:BlownFuze,项目名称:Koding,代码行数:101,



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


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