mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-26 11:47:31 +00:00
Make SMP code path conditional at run-time.
This commit is contained in:
parent
b93a33cded
commit
36a483bbcd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=210003
@ -46,9 +46,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/linker.h>
|
||||
#include <sys/power.h>
|
||||
#include <sys/sbuf.h>
|
||||
#ifdef SMP
|
||||
#include <sys/sched.h>
|
||||
#endif
|
||||
#include <sys/smp.h>
|
||||
#include <sys/timetc.h>
|
||||
|
||||
@ -2523,11 +2521,11 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state)
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
#ifdef SMP
|
||||
thread_lock(curthread);
|
||||
sched_bind(curthread, 0);
|
||||
thread_unlock(curthread);
|
||||
#endif
|
||||
if (smp_started) {
|
||||
thread_lock(curthread);
|
||||
sched_bind(curthread, 0);
|
||||
thread_unlock(curthread);
|
||||
}
|
||||
|
||||
/*
|
||||
* Be sure to hold Giant across DEVICE_SUSPEND/RESUME since non-MPSAFE
|
||||
@ -2608,11 +2606,11 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state)
|
||||
|
||||
mtx_unlock(&Giant);
|
||||
|
||||
#ifdef SMP
|
||||
thread_lock(curthread);
|
||||
sched_unbind(curthread);
|
||||
thread_unlock(curthread);
|
||||
#endif
|
||||
if (smp_started) {
|
||||
thread_lock(curthread);
|
||||
sched_unbind(curthread);
|
||||
thread_unlock(curthread);
|
||||
}
|
||||
|
||||
/* Allow another sleep request after a while. */
|
||||
timeout(acpi_sleep_enable, sc, hz * ACPI_MINIMUM_AWAKETIME);
|
||||
|
Loading…
Reference in New Issue
Block a user