diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-03-17 13:18:48 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-03-17 13:18:48 +0000 |
commit | 3d945c7ae401b425bbcb8b2ac6c947b6c044bff6 (patch) | |
tree | 25560fa7812189e474dc74e9af9f30534336e0c3 /sys/dev | |
parent | 5f743a2d8b406a317180efcac6c7c8955ff2a10a (diff) |
Replace curcpu_is_idle() by cpu_is_idle() and use it instead of rolling
our own.
From Michal Mazurek, ok mmcc@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpi/acpicpu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/acpi/acpicpu.c b/sys/dev/acpi/acpicpu.c index 211485622fc..fc8d36a9108 100644 --- a/sys/dev/acpi/acpicpu.c +++ b/sys/dev/acpi/acpicpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpicpu.c,v 1.73 2016/03/14 06:37:31 guenther Exp $ */ +/* $OpenBSD: acpicpu.c,v 1.74 2016/03/17 13:18:47 mpi Exp $ */ /* * Copyright (c) 2005 Marco Peereboom <marco@openbsd.org> * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> @@ -1188,7 +1188,7 @@ acpicpu_idle(void) #endif /* something already queued? */ - if (ci->ci_schedstate.spc_whichqs != 0) + if (!cpu_is_idle(ci)) return; /* @@ -1204,7 +1204,7 @@ acpicpu_idle(void) hints = (unsigned)best->address; microuptime(&start); atomic_setbits_int(&ci->ci_mwait, MWAIT_IDLING); - if (ci->ci_schedstate.spc_whichqs == 0) { + if (cpu_is_idle(ci)) { /* intel errata AAI65: cflush before monitor */ if (ci->ci_cflushsz != 0) { membar_sync(); |