diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2009-09-27 14:00:16 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2009-09-27 14:00:16 +0000 |
commit | 71f99e637a35759dc3d4906c6ce368988025c151 (patch) | |
tree | 703db66869e285ee7f8de7e4064d32d240a0c60f /sys/dev/acpica/acpi.c | |
parent | e8c2bc2b7187eb0df56bbe68ecbbdf54d5af7e30 (diff) | |
download | src-71f99e637a35759dc3d4906c6ce368988025c151.tar.gz src-71f99e637a35759dc3d4906c6ce368988025c151.zip |
Copy apm(4) emulation from sys/i386/acpica/acpi_machdep.c and
install apm(8) and apm_bios.h on amd64.
Notes
Notes:
svn path=/head/; revision=197536
Diffstat (limited to 'sys/dev/acpica/acpi.c')
-rw-r--r-- | sys/dev/acpica/acpi.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index b31f1e7889e9..9fe823a0825c 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -2308,9 +2308,8 @@ acpi_sleep_force(void *arg) int acpi_ReqSleepState(struct acpi_softc *sc, int state) { -#if defined(__i386__) +#if defined(__amd64__) || defined(__i386__) struct apm_clone_data *clone; -#endif if (state < ACPI_STATE_S1 || state > ACPI_S_STATES_MAX) return (EINVAL); @@ -2325,7 +2324,6 @@ acpi_ReqSleepState(struct acpi_softc *sc, int state) return (ENXIO); } -#if defined(__amd64__) || defined(__i386__) /* If a suspend request is already in progress, just return. */ ACPI_LOCK(acpi); if (sc->acpi_next_sstate != 0) { @@ -2335,7 +2333,6 @@ acpi_ReqSleepState(struct acpi_softc *sc, int state) /* Record the pending state and notify all apm devices. */ sc->acpi_next_sstate = state; -#if defined(__i386__) STAILQ_FOREACH(clone, &sc->apm_cdevs, entries) { clone->notify_status = APM_EV_NONE; if ((clone->flags & ACPI_EVF_DEVD) == 0) { @@ -2343,7 +2340,6 @@ acpi_ReqSleepState(struct acpi_softc *sc, int state) KNOTE_UNLOCKED(&clone->sel_read.si_note, 0); } } -#endif /* If devd(8) is not running, immediately enter the sleep state. */ if (!devctl_process_running()) { @@ -2414,7 +2410,6 @@ acpi_AckSleepState(struct apm_clone_data *clone, int error) * are writable since read-only devices couldn't ack the request. */ sleeping = TRUE; -#if defined(__i386__) clone->notify_status = APM_EV_ACKED; STAILQ_FOREACH(clone, &sc->apm_cdevs, entries) { if ((clone->flags & ACPI_EVF_WRITE) != 0 && @@ -2423,7 +2418,6 @@ acpi_AckSleepState(struct apm_clone_data *clone, int error) break; } } -#endif /* If all devices have voted "yes", we will suspend now. */ if (sleeping) |