Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/acpi When getting the frequency, use APERF/MPER...
details: https://anonhg.NetBSD.org/src/rev/53cd0c7ef611
branches: trunk
changeset: 765790:53cd0c7ef611
user: jruoho <jruoho%NetBSD.org@localhost>
date: Mon Jun 06 07:42:32 2011 +0000
description:
When getting the frequency, use APERF/MPERF as a fallback method.
diffstat:
sys/arch/x86/acpi/acpi_cpu_md.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 55579c44a7db -r 53cd0c7ef611 sys/arch/x86/acpi/acpi_cpu_md.c
--- a/sys/arch/x86/acpi/acpi_cpu_md.c Mon Jun 06 06:59:16 2011 +0000
+++ b/sys/arch/x86/acpi/acpi_cpu_md.c Mon Jun 06 07:42:32 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_md.c,v 1.59 2011/05/31 14:45:36 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_md.c,v 1.60 2011/06/06 07:42:32 jruoho Exp $ */
/*-
* Copyright (c) 2010, 2011 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.59 2011/05/31 14:45:36 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.60 2011/06/06 07:42:32 jruoho Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -755,6 +755,18 @@
}
}
+ /*
+ * If the value was not found, try APERF/MPERF.
+ * The state is P0 if the return value is 100 %.
+ */
+ if ((sc->sc_flags & ACPICPU_FLAG_P_HWF) != 0) {
+
+ if (acpicpu_md_pstate_hwf(sc->sc_ci) == 100) {
+ *freq = sc->sc_pstate[0].ps_freq;
+ return 0;
+ }
+ }
+
return EIO;
}
Home |
Main Index |
Thread Index |
Old Index