diff options
author | Pavel Machek <pavel@suse.cz> | 2007-07-19 04:47:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 13:04:43 -0400 |
commit | 77afcf78a2ded9a91838734234949c0ead5feb12 (patch) | |
tree | 76922017855c70d550b40241f8a144f6c098cd04 /arch/x86_64 | |
parent | 5a60d6235c8352ade8f2699e72fcdfe853730456 (diff) |
PM: Integrate beeping flag with existing acpi_sleep flags
Move "debug during resume from s2ram" into the variable we already use
for real-mode flags to simplify code. It also closes nasty trap for
the user in acpi_sleep_setup; order of parameters actually mattered there,
acpi_sleep=s3_bios,s3_mode doing something different from
acpi_sleep=s3_mode,s3_bios.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/kernel/acpi/sleep.c | 8 | ||||
-rw-r--r-- | arch/x86_64/kernel/acpi/wakeup.S | 15 |
2 files changed, 11 insertions, 12 deletions
diff --git a/arch/x86_64/kernel/acpi/sleep.c b/arch/x86_64/kernel/acpi/sleep.c index 195b7034a148..4277f2b27e6d 100644 --- a/arch/x86_64/kernel/acpi/sleep.c +++ b/arch/x86_64/kernel/acpi/sleep.c | |||
@@ -55,7 +55,7 @@ | |||
55 | 55 | ||
56 | /* address in low memory of the wakeup routine. */ | 56 | /* address in low memory of the wakeup routine. */ |
57 | unsigned long acpi_wakeup_address = 0; | 57 | unsigned long acpi_wakeup_address = 0; |
58 | unsigned long acpi_video_flags; | 58 | unsigned long acpi_realmode_flags; |
59 | extern char wakeup_start, wakeup_end; | 59 | extern char wakeup_start, wakeup_end; |
60 | 60 | ||
61 | extern unsigned long acpi_copy_wakeup_routine(unsigned long); | 61 | extern unsigned long acpi_copy_wakeup_routine(unsigned long); |
@@ -103,9 +103,11 @@ static int __init acpi_sleep_setup(char *str) | |||
103 | { | 103 | { |
104 | while ((str != NULL) && (*str != '\0')) { | 104 | while ((str != NULL) && (*str != '\0')) { |
105 | if (strncmp(str, "s3_bios", 7) == 0) | 105 | if (strncmp(str, "s3_bios", 7) == 0) |
106 | acpi_video_flags = 1; | 106 | acpi_realmode_flags |= 1; |
107 | if (strncmp(str, "s3_mode", 7) == 0) | 107 | if (strncmp(str, "s3_mode", 7) == 0) |
108 | acpi_video_flags |= 2; | 108 | acpi_realmode_flags |= 2; |
109 | if (strncmp(str, "s3_beep", 7) == 0) | ||
110 | acpi_realmode_flags |= 4; | ||
109 | str = strchr(str, ','); | 111 | str = strchr(str, ','); |
110 | if (str != NULL) | 112 | if (str != NULL) |
111 | str += strspn(str, ", \t"); | 113 | str += strspn(str, ", \t"); |
diff --git a/arch/x86_64/kernel/acpi/wakeup.S b/arch/x86_64/kernel/acpi/wakeup.S index ed63d1845792..13f1480cbec9 100644 --- a/arch/x86_64/kernel/acpi/wakeup.S +++ b/arch/x86_64/kernel/acpi/wakeup.S | |||
@@ -50,7 +50,7 @@ wakeup_code: | |||
50 | movw %ax, %ss | 50 | movw %ax, %ss |
51 | 51 | ||
52 | # Data segment must be set up before we can see whether to beep. | 52 | # Data segment must be set up before we can see whether to beep. |
53 | testl $1, beep_flags - wakeup_code | 53 | testl $4, realmode_flags - wakeup_code |
54 | jz 1f | 54 | jz 1f |
55 | BEEP | 55 | BEEP |
56 | 1: | 56 | 1: |
@@ -70,7 +70,7 @@ wakeup_code: | |||
70 | testl %eax, %eax | 70 | testl %eax, %eax |
71 | jnz no_longmode | 71 | jnz no_longmode |
72 | 72 | ||
73 | testl $1, video_flags - wakeup_code | 73 | testl $1, realmode_flags - wakeup_code |
74 | jz 1f | 74 | jz 1f |
75 | lcall $0xc000,$3 | 75 | lcall $0xc000,$3 |
76 | movw %cs, %ax | 76 | movw %cs, %ax |
@@ -78,7 +78,7 @@ wakeup_code: | |||
78 | movw %ax, %ss | 78 | movw %ax, %ss |
79 | 1: | 79 | 1: |
80 | 80 | ||
81 | testl $2, video_flags - wakeup_code | 81 | testl $2, realmode_flags - wakeup_code |
82 | jz 1f | 82 | jz 1f |
83 | mov video_mode - wakeup_code, %ax | 83 | mov video_mode - wakeup_code, %ax |
84 | call mode_seta | 84 | call mode_seta |
@@ -251,9 +251,8 @@ gdt_48a: | |||
251 | .long gdta - wakeup_code # gdt base (relocated in later) | 251 | .long gdta - wakeup_code # gdt base (relocated in later) |
252 | 252 | ||
253 | real_magic: .quad 0 | 253 | real_magic: .quad 0 |
254 | beep_flags: .quad 0 | ||
255 | video_mode: .quad 0 | 254 | video_mode: .quad 0 |
256 | video_flags: .quad 0 | 255 | realmode_flags: .quad 0 |
257 | 256 | ||
258 | .code16 | 257 | .code16 |
259 | bogus_real_magic: | 258 | bogus_real_magic: |
@@ -367,12 +366,10 @@ ENTRY(acpi_copy_wakeup_routine) | |||
367 | pushq %rax | 366 | pushq %rax |
368 | pushq %rdx | 367 | pushq %rdx |
369 | 368 | ||
370 | movl s2ram_beep, %edx | ||
371 | movl %edx, beep_flags - wakeup_start (,%rdi) | ||
372 | movl saved_video_mode, %edx | 369 | movl saved_video_mode, %edx |
373 | movl %edx, video_mode - wakeup_start (,%rdi) | 370 | movl %edx, video_mode - wakeup_start (,%rdi) |
374 | movl acpi_video_flags, %edx | 371 | movl acpi_realmode_flags, %edx |
375 | movl %edx, video_flags - wakeup_start (,%rdi) | 372 | movl %edx, realmode_flags - wakeup_start (,%rdi) |
376 | movq $0x12345678, real_magic - wakeup_start (,%rdi) | 373 | movq $0x12345678, real_magic - wakeup_start (,%rdi) |
377 | movq $0x123456789abcdef0, %rdx | 374 | movq $0x123456789abcdef0, %rdx |
378 | movq %rdx, saved_magic | 375 | movq %rdx, saved_magic |