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 Add a comment.
details: https://anonhg.NetBSD.org/src/rev/ac854bce2757
branches: trunk
changeset: 760792:ac854bce2757
user: jruoho <jruoho%NetBSD.org@localhost>
date: Thu Jan 13 03:45:38 2011 +0000
description:
Add a comment.
diffstat:
sys/arch/x86/acpi/acpi_wakeup.c | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
diffs (44 lines):
diff -r ca416c711131 -r ac854bce2757 sys/arch/x86/acpi/acpi_wakeup.c
--- a/sys/arch/x86/acpi/acpi_wakeup.c Thu Jan 13 03:40:50 2011 +0000
+++ b/sys/arch/x86/acpi/acpi_wakeup.c Thu Jan 13 03:45:38 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_wakeup.c,v 1.26 2010/12/31 09:19:43 jruoho Exp $ */
+/* $NetBSD: acpi_wakeup.c,v 1.27 2011/01/13 03:45:38 jruoho Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.26 2010/12/31 09:19:43 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.27 2011/01/13 03:45:38 jruoho Exp $");
/*-
* Copyright (c) 2001 Takanori Watanabe <takawata%jp.freebsd.org@localhost>
@@ -341,12 +341,19 @@
initrtclock(TIMER_FREQ);
inittodr(time_second);
- AcpiClearEvent(ACPI_EVENT_PMTIMER);
- AcpiClearEvent(ACPI_EVENT_GLOBAL);
- AcpiClearEvent(ACPI_EVENT_POWER_BUTTON);
- AcpiClearEvent(ACPI_EVENT_SLEEP_BUTTON);
- AcpiClearEvent(ACPI_EVENT_RTC);
- AcpiHwDisableAllGpes ();
+ /*
+ * Clear fixed events (see e.g. ACPI 3.0, p. 62).
+ * Also prevent GPEs from misfiring by disabling
+ * all GPEs before interrupts are enabled. The
+ * AcpiLeaveSleepState() function will enable
+ * and handle the general purpose events later.
+ */
+ (void)AcpiClearEvent(ACPI_EVENT_PMTIMER);
+ (void)AcpiClearEvent(ACPI_EVENT_GLOBAL);
+ (void)AcpiClearEvent(ACPI_EVENT_POWER_BUTTON);
+ (void)AcpiClearEvent(ACPI_EVENT_SLEEP_BUTTON);
+ (void)AcpiClearEvent(ACPI_EVENT_RTC);
+ (void)AcpiHwDisableAllGpes();
acpi_pci_link_resume();
Home |
Main Index |
Thread Index |
Old Index