aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/acpi
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@in.ibm.com>2007-05-02 13:27:07 -0400
committerAndi Kleen <andi@basil.nowhere.org>2007-05-02 13:27:07 -0400
commit7c17e70613d2c70f9d5d0b5d37126fd5e8e9b728 (patch)
tree9e6aac1a33f5f8830242b76ea83ddc2160f525b2 /arch/x86_64/kernel/acpi
parent90b1c2085ea1955641e60a4f0acd63fdc271cd0b (diff)
[PATCH] x86-64: Get rid of dead code in suspend resume
o Get rid of dead code in wakeup.S o We never restore from saved_gdt, saved_idt, saved_ltd, saved_tss, saved_cr3, saved_cr4, saved_cr0, real_save_gdt, saved_efer, saved_efer2. Get rid of of associated code. o Get rid of bogus_magic, bogus_31_magic and bogus_magic2. No longer being used. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64/kernel/acpi')
-rw-r--r--arch/x86_64/kernel/acpi/wakeup.S57
1 files changed, 1 insertions, 56 deletions
diff --git a/arch/x86_64/kernel/acpi/wakeup.S b/arch/x86_64/kernel/acpi/wakeup.S
index 185faa911db5..6ece70e91a32 100644
--- a/arch/x86_64/kernel/acpi/wakeup.S
+++ b/arch/x86_64/kernel/acpi/wakeup.S
@@ -258,8 +258,6 @@ gdt_48a:
258 .word 0, 0 # gdt base (filled in later) 258 .word 0, 0 # gdt base (filled in later)
259 259
260 260
261real_save_gdt: .word 0
262 .quad 0
263real_magic: .quad 0 261real_magic: .quad 0
264video_mode: .quad 0 262video_mode: .quad 0
265video_flags: .quad 0 263video_flags: .quad 0
@@ -272,10 +270,6 @@ bogus_32_magic:
272 movb $0xb3,%al ; outb %al,$0x80 270 movb $0xb3,%al ; outb %al,$0x80
273 jmp bogus_32_magic 271 jmp bogus_32_magic
274 272
275bogus_31_magic:
276 movb $0xb1,%al ; outb %al,$0x80
277 jmp bogus_31_magic
278
279bogus_cpu: 273bogus_cpu:
280 movb $0xbc,%al ; outb %al,$0x80 274 movb $0xbc,%al ; outb %al,$0x80
281 jmp bogus_cpu 275 jmp bogus_cpu
@@ -346,16 +340,6 @@ check_vesaa:
346 340
347_setbada: jmp setbada 341_setbada: jmp setbada
348 342
349 .code64
350bogus_magic:
351 movw $0x0e00 + 'B', %ds:(0xb8018)
352 jmp bogus_magic
353
354bogus_magic2:
355 movw $0x0e00 + '2', %ds:(0xb8018)
356 jmp bogus_magic2
357
358
359wakeup_stack_begin: # Stack grows down 343wakeup_stack_begin: # Stack grows down
360 344
361.org 0xff0 345.org 0xff0
@@ -373,28 +357,11 @@ ENTRY(wakeup_end)
373# 357#
374# Returned address is location of code in low memory (past data and stack) 358# Returned address is location of code in low memory (past data and stack)
375# 359#
360 .code64
376ENTRY(acpi_copy_wakeup_routine) 361ENTRY(acpi_copy_wakeup_routine)
377 pushq %rax 362 pushq %rax
378 pushq %rcx
379 pushq %rdx 363 pushq %rdx
380 364
381 sgdt saved_gdt
382 sidt saved_idt
383 sldt saved_ldt
384 str saved_tss
385
386 movq %cr3, %rdx
387 movq %rdx, saved_cr3
388 movq %cr4, %rdx
389 movq %rdx, saved_cr4
390 movq %cr0, %rdx
391 movq %rdx, saved_cr0
392 sgdt real_save_gdt - wakeup_start (,%rdi)
393 movl $MSR_EFER, %ecx
394 rdmsr
395 movl %eax, saved_efer
396 movl %edx, saved_efer2
397
398 movl saved_video_mode, %edx 365 movl saved_video_mode, %edx
399 movl %edx, video_mode - wakeup_start (,%rdi) 366 movl %edx, video_mode - wakeup_start (,%rdi)
400 movl acpi_video_flags, %edx 367 movl acpi_video_flags, %edx
@@ -407,17 +374,8 @@ ENTRY(acpi_copy_wakeup_routine)
407 cmpl $0x9abcdef0, %eax 374 cmpl $0x9abcdef0, %eax
408 jne bogus_32_magic 375 jne bogus_32_magic
409 376
410 # make sure %cr4 is set correctly (features, etc)
411 movl saved_cr4 - __START_KERNEL_map, %eax
412 movq %rax, %cr4
413
414 movl saved_cr0 - __START_KERNEL_map, %eax
415 movq %rax, %cr0
416 jmp 1f # Flush pipelines
4171:
418 # restore the regs we used 377 # restore the regs we used
419 popq %rdx 378 popq %rdx
420 popq %rcx
421 popq %rax 379 popq %rax
422ENTRY(do_suspend_lowlevel_s4bios) 380ENTRY(do_suspend_lowlevel_s4bios)
423 ret 381 ret
@@ -512,16 +470,3 @@ ENTRY(saved_eip) .quad 0
512ENTRY(saved_esp) .quad 0 470ENTRY(saved_esp) .quad 0
513 471
514ENTRY(saved_magic) .quad 0 472ENTRY(saved_magic) .quad 0
515
516ALIGN
517# saved registers
518saved_gdt: .quad 0,0
519saved_idt: .quad 0,0
520saved_ldt: .quad 0
521saved_tss: .quad 0
522
523saved_cr0: .quad 0
524saved_cr3: .quad 0
525saved_cr4: .quad 0
526saved_efer: .quad 0
527saved_efer2: .quad 0