Module Name:    src
Committed By:   jruoho
Date:           Fri Mar  4 04:53:28 UTC 2011

Modified Files:
        src/sys/arch/x86/x86: est.c powernow.c

Log Message:
Raise the return value of the match-function of est(4) and powernow(4).
The assigned priorities are now: 10 for acpicpu(4), 5 for est(4) and
powernow(4), and 1 for odcm(4). These are used to pick the preferred driver.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/x86/x86/est.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x86/x86/powernow.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/est.c
diff -u src/sys/arch/x86/x86/est.c:1.23 src/sys/arch/x86/x86/est.c:1.24
--- src/sys/arch/x86/x86/est.c:1.23	Thu Feb 24 15:47:59 2011
+++ src/sys/arch/x86/x86/est.c	Fri Mar  4 04:53:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: est.c,v 1.23 2011/02/24 15:47:59 jruoho Exp $	*/
+/*	$NetBSD: est.c,v 1.24 2011/03/04 04:53:28 jruoho Exp $	*/
 /*
  * Copyright (c) 2003 Michael Eriksson.
  * All rights reserved.
@@ -76,7 +76,7 @@
  *   http://www.codemonkey.org.uk/projects/cpufreq/cpufreq-2.4.22-pre6-1.gz
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: est.c,v 1.23 2011/02/24 15:47:59 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: est.c,v 1.24 2011/03/04 04:53:28 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -1025,7 +1025,7 @@
 	if ((ci->ci_feat_val[1] & CPUID2_EST) == 0)
 		return 0;
 
-	return (est_bus_clock(ci) != 0) ? 1 : 0;
+	return (est_bus_clock(ci) != 0) ? 5 : 0;
 }
 
 static void

Index: src/sys/arch/x86/x86/powernow.c
diff -u src/sys/arch/x86/x86/powernow.c:1.2 src/sys/arch/x86/x86/powernow.c:1.3
--- src/sys/arch/x86/x86/powernow.c:1.2	Thu Feb 24 15:42:17 2011
+++ src/sys/arch/x86/x86/powernow.c	Fri Mar  4 04:53:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: powernow.c,v 1.2 2011/02/24 15:42:17 jruoho Exp $ */
+/*	$NetBSD: powernow.c,v 1.3 2011/03/04 04:53:28 jruoho Exp $ */
 /*	$OpenBSD: powernow-k8.c,v 1.8 2006/06/16 05:58:50 gwk Exp $ */
 
 /*-
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: powernow.c,v 1.2 2011/02/24 15:42:17 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: powernow.c,v 1.3 2011/03/04 04:53:28 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -164,9 +164,12 @@
 			return 0;
 
 		x86_cpuid(0x80000007, regs);
+
+		if ((regs[3] & AMD_PN_FID_VID) == AMD_PN_FID_VID)
+			return 5;
 	}
 
-	return (regs[3] & AMD_PN_FID_VID) == AMD_PN_FID_VID;
+	return 0;
 }
 
 static void

Reply via email to