Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Properly deal with the previous FADT-issue.



details:   https://anonhg.NetBSD.org/src/rev/429403df1f82
branches:  trunk
changeset: 757106:429403df1f82
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Sun Aug 15 04:35:16 2010 +0000

description:
Properly deal with the previous FADT-issue.

diffstat:

 sys/dev/acpi/acpi_cpu_tstate.c |  18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diffs (44 lines):

diff -r 2875972f3764 -r 429403df1f82 sys/dev/acpi/acpi_cpu_tstate.c
--- a/sys/dev/acpi/acpi_cpu_tstate.c    Sun Aug 15 02:39:46 2010 +0000
+++ b/sys/dev/acpi/acpi_cpu_tstate.c    Sun Aug 15 04:35:16 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_tstate.c,v 1.7 2010/08/14 17:50:57 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_tstate.c,v 1.8 2010/08/15 04:35:16 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_tstate.c,v 1.7 2010/08/14 17:50:57 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_tstate.c,v 1.8 2010/08/15 04:35:16 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/evcnt.h>
@@ -549,15 +549,21 @@
                sc->sc_tstate[i].ts_control = (count - i) | __BIT(3);
 
        /*
-        * Fake values for THROTTLE_CTLR.
+        * Fake values for throttling registers.
         */
+       (void)memset(&sc->sc_tstate_status, 0, sizeof(struct acpicpu_reg));
+       (void)memset(&sc->sc_tstate_control, 0, sizeof(struct acpicpu_reg));
+
+       sc->sc_tstate_status.reg_bitwidth = width;
+       sc->sc_tstate_status.reg_bitoffset = offset;
+       sc->sc_tstate_status.reg_addr = sc->sc_object.ao_pblkaddr;
+       sc->sc_tstate_status.reg_spaceid = ACPI_ADR_SPACE_SYSTEM_IO;
+
        sc->sc_tstate_control.reg_bitwidth = width;
        sc->sc_tstate_control.reg_bitoffset = offset;
+       sc->sc_tstate_control.reg_addr = sc->sc_object.ao_pblkaddr;
        sc->sc_tstate_control.reg_spaceid = ACPI_ADR_SPACE_SYSTEM_IO;
 
-       sc->sc_tstate_status.reg_addr = sc->sc_object.ao_pblkaddr;
-       sc->sc_tstate_control.reg_addr = sc->sc_object.ao_pblkaddr;
-
        return AE_OK;
 }
 



Home | Main Index | Thread Index | Old Index