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 Put ACPI idle under ACPICPU_ENABLE_C3 unti...



details:   https://anonhg.NetBSD.org/src/rev/7a73c3294b36
branches:  trunk
changeset: 1008190:7a73c3294b36
user:      ad <ad%NetBSD.org@localhost>
date:      Sat Mar 14 13:50:46 2020 +0000

description:
Put ACPI idle under ACPICPU_ENABLE_C3 until the wrinkles are ironed out.
This seems well written and basically all good, but currently doesn't enter
a low power state, and imposes a big performance penalty.  Proposed on
port-i386 & port-amd64.

diffstat:

 sys/arch/x86/acpi/acpi_cpu_md.c |  20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diffs (71 lines):

diff -r 824405e7755d -r 7a73c3294b36 sys/arch/x86/acpi/acpi_cpu_md.c
--- a/sys/arch/x86/acpi/acpi_cpu_md.c   Sat Mar 14 13:39:36 2020 +0000
+++ b/sys/arch/x86/acpi/acpi_cpu_md.c   Sat Mar 14 13:50:46 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_md.c,v 1.81 2019/11/05 20:21:34 maxv Exp $ */
+/* $NetBSD: acpi_cpu_md.c,v 1.82 2020/03/14 13:50:46 ad 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.81 2019/11/05 20:21:34 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.82 2020/03/14 13:50:46 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -103,8 +103,10 @@
 
 #define FID_TO_VCO_FID(fidd)   (((fid) < 8) ? (8 + ((fid) << 1)) : (fid))
 
+#ifdef ACPICPU_ENABLE_C3
 static char      native_idle_text[16];
 void           (*native_idle)(void) = NULL;
+#endif
 
 static int      acpicpu_md_quirk_piix4(const struct pci_attach_args *);
 static void     acpicpu_md_pstate_hwf_reset(void *, void *);
@@ -348,6 +350,12 @@
 int
 acpicpu_md_cstate_start(struct acpicpu_softc *sc)
 {
+#ifdef ACPICPU_ENABLE_C3
+       /*
+        * XXX There are performance problems with the ACPI idle loop, and
+        * it does not enter deep sleep.  Once those are resolved it'll be
+        * re-enabled.
+        */
        const size_t size = sizeof(native_idle_text);
        struct acpicpu_cstate *cs;
        bool ipi = false;
@@ -369,6 +377,7 @@
        }
 
        x86_cpu_idle_set(acpicpu_cstate_idle, "acpi", ipi);
+#endif /* ACPICPU_ENABLE_C3 */
 
        return 0;
 }
@@ -376,6 +385,12 @@
 int
 acpicpu_md_cstate_stop(void)
 {
+#ifdef ACPICPU_ENABLE_C3
+       /*
+        * XXX There are performance problems with the ACPI idle loop, and
+        * it does not enter deep sleep.  Once those are resolved it'll be
+        * re-enabled.
+        */
        static char text[16];
        void (*func)(void);
        bool ipi;
@@ -393,6 +408,7 @@
         * out from the ACPI idle-loop before detachment.
         */
        xc_barrier(0);
+#endif /* ACPICPU_ENABLE_C3 */
 
        return 0;
 }



Home | Main Index | Thread Index | Old Index