Module Name: src
Committed By: jruoho
Date: Sat Aug 21 09:16:28 UTC 2010
Modified Files:
src/sys/arch/x86/acpi: acpi_cpu_md.c
Log Message:
Use an inverse logic when filling the (X)PSS structures -- if we know
the addresses, we trust ourselves more than a random BIOS in the field.
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/x86/acpi/acpi_cpu_md.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/acpi/acpi_cpu_md.c
diff -u src/sys/arch/x86/acpi/acpi_cpu_md.c:1.26 src/sys/arch/x86/acpi/acpi_cpu_md.c:1.27
--- src/sys/arch/x86/acpi/acpi_cpu_md.c:1.26 Sat Aug 21 07:18:34 2010
+++ src/sys/arch/x86/acpi/acpi_cpu_md.c Sat Aug 21 09:16:28 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_md.c,v 1.26 2010/08/21 07:18:34 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_md.c,v 1.27 2010/08/21 09:16:28 jruoho Exp $ */
/*-
* Copyright (c) 2010 Jukka Ruohonen <[email protected]>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.26 2010/08/21 07:18:34 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.27 2010/08/21 09:16:28 jruoho Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -402,24 +402,24 @@
/*
* Fill the P-state structures with MSR addresses that are
- * known to be correct. But only do this when the values
- * reported by BIOS are absent. If a vendor uses XPSS, we
- * do not necessary need to do anything to support new CPUs.
+ * known to be correct. If we do not know the addresses,
+ * leave the values intact. If a vendor uses XPSS, we do
+ * not necessary need to do anything to support new CPUs.
*/
while (i < sc->sc_pstate_count) {
ps = &sc->sc_pstate[i];
- if (ps->ps_status_addr == 0)
+ if (msr.ps_status_addr != 0)
ps->ps_status_addr = msr.ps_status_addr;
- if (ps->ps_status_mask == 0)
+ if (msr.ps_status_mask != 0)
ps->ps_status_mask = msr.ps_status_mask;
- if (ps->ps_control_addr == 0)
+ if (msr.ps_control_addr != 0)
ps->ps_control_addr = msr.ps_control_addr;
- if (ps->ps_control_mask == 0)
+ if (msr.ps_control_mask != 0)
ps->ps_control_mask = msr.ps_control_mask;
i++;