Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Revert the changes made in the commit:
details: https://anonhg.NetBSD.org/src/rev/f992face5063
branches: trunk
changeset: 760378:f992face5063
user: jruoho <jruoho%NetBSD.org@localhost>
date: Tue Jan 04 05:48:48 2011 +0000
description:
Revert the changes made in the commit:
"Do not queue functions via sysmon_taskq(9) in the pmf(9) resume hooks.
There is a small and unlikely race when the drivers are loaded as modules;
suspend, resume, queue a function, and immediately unload the module."
Queueing the checks in the resume hooks was observed to improve the resume
time by several seconds (!) on a system with poorly implemented AML code.
The observed race condition is a wider issue related to modules; things like
sysmon_taskq(9) should be modified to allow cancelling of queued functions.
diffstat:
sys/dev/acpi/acpi_acad.c | 6 +++---
sys/dev/acpi/acpi_bat.c | 8 ++++----
sys/dev/acpi/acpi_cpu_cstate.c | 8 ++++----
3 files changed, 11 insertions(+), 11 deletions(-)
diffs (94 lines):
diff -r 2adbc5969417 -r f992face5063 sys/dev/acpi/acpi_acad.c
--- a/sys/dev/acpi/acpi_acad.c Tue Jan 04 04:28:48 2011 +0000
+++ b/sys/dev/acpi/acpi_acad.c Tue Jan 04 05:48:48 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_acad.c,v 1.47 2010/10/28 18:03:11 jruoho Exp $ */
+/* $NetBSD: acpi_acad.c,v 1.48 2011/01/04 05:48:48 jruoho Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_acad.c,v 1.47 2010/10/28 18:03:11 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_acad.c,v 1.48 2011/01/04 05:48:48 jruoho Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -159,7 +159,7 @@
acpiacad_resume(device_t dv, const pmf_qual_t *qual)
{
- acpiacad_get_status(dv);
+ (void)AcpiOsExecute(OSL_NOTIFY_HANDLER, acpiacad_get_status, dv);
return true;
}
diff -r 2adbc5969417 -r f992face5063 sys/dev/acpi/acpi_bat.c
--- a/sys/dev/acpi/acpi_bat.c Tue Jan 04 04:28:48 2011 +0000
+++ b/sys/dev/acpi/acpi_bat.c Tue Jan 04 05:48:48 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_bat.c,v 1.105 2010/10/25 07:48:03 jruoho Exp $ */
+/* $NetBSD: acpi_bat.c,v 1.106 2011/01/04 05:48:48 jruoho Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.105 2010/10/25 07:48:03 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.106 2011/01/04 05:48:48 jruoho Exp $");
#include <sys/param.h>
#include <sys/condvar.h>
@@ -786,8 +786,8 @@
acpibat_resume(device_t dv, const pmf_qual_t *qual)
{
- acpibat_update_info(dv);
- acpibat_update_status(dv);
+ (void)AcpiOsExecute(OSL_NOTIFY_HANDLER, acpibat_update_info, dv);
+ (void)AcpiOsExecute(OSL_NOTIFY_HANDLER, acpibat_update_status, dv);
return true;
}
diff -r 2adbc5969417 -r f992face5063 sys/dev/acpi/acpi_cpu_cstate.c
--- a/sys/dev/acpi/acpi_cpu_cstate.c Tue Jan 04 04:28:48 2011 +0000
+++ b/sys/dev/acpi/acpi_cpu_cstate.c Tue Jan 04 05:48:48 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_cstate.c,v 1.34 2010/11/30 04:31:00 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_cstate.c,v 1.35 2011/01/04 05:48:48 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_cstate.c,v 1.34 2010/11/30 04:31:00 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.35 2011/01/04 05:48:48 jruoho Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -224,17 +224,17 @@
bool
acpicpu_cstate_suspend(device_t self)
{
-
return true;
}
bool
acpicpu_cstate_resume(device_t self)
{
+ static const ACPI_OSD_EXEC_CALLBACK func = acpicpu_cstate_callback;
struct acpicpu_softc *sc = device_private(self);
if ((sc->sc_flags & ACPICPU_FLAG_C_FADT) == 0)
- acpicpu_cstate_callback(self);
+ (void)AcpiOsExecute(OSL_NOTIFY_HANDLER, func, sc->sc_dev);
return true;
}
Home |
Main Index |
Thread Index |
Old Index