示例#1
0
文件: proc.c 项目: Camedpuffer/linux
static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
{
	seq_printf(m,
		   "fdiv_bug\t: %s\n"
		   "f00f_bug\t: %s\n"
		   "coma_bug\t: %s\n"
		   "fpu\t\t: %s\n"
		   "fpu_exception\t: %s\n"
		   "cpuid level\t: %d\n"
		   "wp\t\t: yes\n",
		   static_cpu_has_bug(X86_BUG_FDIV) ? "yes" : "no",
		   static_cpu_has_bug(X86_BUG_F00F) ? "yes" : "no",
		   static_cpu_has_bug(X86_BUG_COMA) ? "yes" : "no",
		   static_cpu_has(X86_FEATURE_FPU) ? "yes" : "no",
		   static_cpu_has(X86_FEATURE_FPU) ? "yes" : "no",
		   c->cpuid_level);
}
示例#2
0
static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
{
	seq_printf(m,
		   "fdiv_bug\t: %s\n"
		   "f00f_bug\t: %s\n"
		   "coma_bug\t: %s\n"
		   "fpu\t\t: %s\n"
		   "fpu_exception\t: %s\n"
		   "cpuid level\t: %d\n"
		   "wp\t\t: %s\n",
		   static_cpu_has_bug(X86_BUG_FDIV) ? "yes" : "no",
		   static_cpu_has_bug(X86_BUG_F00F) ? "yes" : "no",
		   static_cpu_has_bug(X86_BUG_COMA) ? "yes" : "no",
		   c->hard_math ? "yes" : "no",
		   c->hard_math ? "yes" : "no",
		   c->cpuid_level,
		   c->wp_works_ok ? "yes" : "no");
}
示例#3
0
/*
 * Intel Core2 and older machines prefer MWAIT over HALT for C1.
 * We can't rely on cpuidle installing MWAIT, because it will not load
 * on systems that support only C1 -- so the boot default must be MWAIT.
 *
 * Some AMD machines are the opposite, they depend on using HALT.
 *
 * So for default C1, which is used during boot until cpuidle loads,
 * use MWAIT-C1 on Intel HW that has it, else use HALT.
 */
static int prefer_mwait_c1_over_halt(const struct cpuinfo_x86 *c)
{
	if (c->x86_vendor != X86_VENDOR_INTEL)
		return 0;

	if (!cpu_has(c, X86_FEATURE_MWAIT) || static_cpu_has_bug(X86_BUG_MONITOR))
		return 0;

	return 1;
}