Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Remove the currently unnecessary mutex.
details: https://anonhg.NetBSD.org/src/rev/e52a0b020229
branches: trunk
changeset: 756575:e52a0b020229
user: jruoho <jruoho%NetBSD.org@localhost>
date: Sat Jul 24 22:44:00 2010 +0000
description:
Remove the currently unnecessary mutex.
diffstat:
sys/dev/acpi/acpi_cpu.c | 15 +++------------
sys/dev/acpi/acpi_cpu_cstate.c | 5 ++---
2 files changed, 5 insertions(+), 15 deletions(-)
diffs (98 lines):
diff -r 85ea25ea1eaf -r e52a0b020229 sys/dev/acpi/acpi_cpu.c
--- a/sys/dev/acpi/acpi_cpu.c Sat Jul 24 21:53:53 2010 +0000
+++ b/sys/dev/acpi/acpi_cpu.c Sat Jul 24 22:44:00 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu.c,v 1.5 2010/07/23 05:32:02 jruoho Exp $ */
+/* $NetBSD: acpi_cpu.c,v 1.6 2010/07/24 22:44:00 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.c,v 1.5 2010/07/23 05:32:02 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu.c,v 1.6 2010/07/24 22:44:00 jruoho Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -62,7 +62,6 @@
static bool acpicpu_suspend(device_t, const pmf_qual_t *);
static bool acpicpu_resume(device_t, const pmf_qual_t *);
-kmutex_t acpicpu_mtx;
struct acpicpu_softc **acpicpu_sc = NULL;
static const char * const acpicpu_hid[] = {
@@ -114,27 +113,22 @@
KASSERT(acpicpu_sc != NULL);
- mutex_enter(&acpicpu_mtx);
-
sc->sc_dev = self;
sc->sc_iot = aa->aa_iot;
sc->sc_node = aa->aa_node;
sc->sc_cpuid = acpicpu_id(sc->sc_object.ao_procid);
if (sc->sc_cpuid == 0xFFFFFF) {
- mutex_exit(&acpicpu_mtx);
aprint_error(": invalid CPU ID\n");
return;
}
if (acpicpu_sc[sc->sc_cpuid] != NULL) {
- mutex_exit(&acpicpu_mtx);
- aprint_error(": already probed\n");
+ aprint_error(": already attached\n");
return;
}
acpicpu_sc[sc->sc_cpuid] = sc;
- mutex_exit(&acpicpu_mtx);
sc->sc_cap = acpicpu_cap(sc);
sc->sc_flags |= acpicpu_md_quirks();
@@ -210,8 +204,6 @@
for (i = 0; i < maxcpus; i++)
acpicpu_sc[i] = NULL;
- mutex_init(&acpicpu_mtx, MUTEX_DEFAULT, IPL_VM);
-
return 0;
}
@@ -222,7 +214,6 @@
KASSERT(acpicpu_sc != NULL);
- mutex_destroy(&acpicpu_mtx);
kmem_free(acpicpu_sc, maxcpus * sizeof(*sc));
acpicpu_sc = NULL;
diff -r 85ea25ea1eaf -r e52a0b020229 sys/dev/acpi/acpi_cpu_cstate.c
--- a/sys/dev/acpi/acpi_cpu_cstate.c Sat Jul 24 21:53:53 2010 +0000
+++ b/sys/dev/acpi/acpi_cpu_cstate.c Sat Jul 24 22:44:00 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_cstate.c,v 1.8 2010/07/23 13:54:21 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_cstate.c,v 1.9 2010/07/24 22:44:00 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.8 2010/07/23 13:54:21 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.9 2010/07/24 22:44:00 jruoho Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -76,7 +76,6 @@
static bool acpicpu_cstate_bm_check(void);
static void acpicpu_cstate_idle_enter(struct acpicpu_softc *,int);
-extern kmutex_t acpicpu_mtx;
extern struct acpicpu_softc **acpicpu_sc;
extern int acpi_suspended;
Home |
Main Index |
Thread Index |
Old Index