Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200396
b: refs/heads/master
c: 9cbfa18
h: refs/heads/master
v: v3
  • Loading branch information
Bob Moore authored and Len Brown committed Jun 12, 2010
1 parent 8b62394 commit 7d6f202
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d70326689b70b35527765bd3decbb1229459e928
refs/heads/master: 9cbfa18e8a7b34a32eddbd914a07f085962f50a8
4 changes: 4 additions & 0 deletions trunk/drivers/acpi/acpica/acconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@

#define ACPI_MAX_LOOP_ITERATIONS 0xFFFF

/* Maximum sleep allowed via Sleep() operator */

#define ACPI_MAX_SLEEP 20000 /* Two seconds */

/******************************************************************************
*
* ACPI Specification constants (Do not change unless the specification changes)
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/acpi/acpica/exsystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@ acpi_status acpi_ex_system_do_sleep(u64 how_long)

acpi_ex_relinquish_interpreter();

/*
* For compatibility with other ACPI implementations and to prevent
* accidental deep sleeps, limit the sleep time to something reasonable.
*/
if (how_long > ACPI_MAX_SLEEP) {
how_long = ACPI_MAX_SLEEP;
}

acpi_os_sleep(how_long);

/* And now we must get the interpreter again */
Expand Down

0 comments on commit 7d6f202

Please sign in to comment.