Commit 90f2a140 authored by Pavel Machek's avatar Pavel Machek Committed by Linus Torvalds

[PATCH] swsusp.S: meaningful assembly labels

This introduces meaningfull labels instead of .L1234, meaning code is
readable, kills alignment where unneccessary, and kills TLB flush that was
only pure paranoia (and slows it down a lot on emulated systems).
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 203492fb
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
ENTRY(do_magic) ENTRY(do_magic)
pushl %ebx pushl %ebx
cmpl $0,8(%esp) cmpl $0,8(%esp)
jne .L1450 jne resume
call do_magic_suspend_1 call do_magic_suspend_1
call save_processor_state call save_processor_state
...@@ -33,21 +33,21 @@ ENTRY(do_magic) ...@@ -33,21 +33,21 @@ ENTRY(do_magic)
pushfl ; popl saved_context_eflags pushfl ; popl saved_context_eflags
call do_magic_suspend_2 call do_magic_suspend_2
jmp .L1449 popl %ebx
.p2align 4,,7 ret
.L1450:
resume:
movl $swsusp_pg_dir-__PAGE_OFFSET,%ecx movl $swsusp_pg_dir-__PAGE_OFFSET,%ecx
movl %ecx,%cr3 movl %ecx,%cr3
call do_magic_resume_1 call do_magic_resume_1
movl $0,loop movl $0,loop
cmpl $0,nr_copy_pages cmpl $0,nr_copy_pages
je .L1453 je copy_done
.p2align 4,,7 copy_loop:
.L1455:
movl $0,loop2 movl $0,loop2
.p2align 4,,7 .p2align 4,,7
.L1459: copy_one_page:
movl pagedir_nosave,%ecx movl pagedir_nosave,%ecx
movl loop,%eax movl loop,%eax
movl loop2,%edx movl loop2,%edx
...@@ -56,23 +56,21 @@ ENTRY(do_magic) ...@@ -56,23 +56,21 @@ ENTRY(do_magic)
movl (%ecx,%eax),%eax movl (%ecx,%eax),%eax
movb (%edx,%eax),%al movb (%edx,%eax),%al
movb %al,(%edx,%ebx) movb %al,(%edx,%ebx)
movl %cr3, %eax;
movl %eax, %cr3; # flush TLB
movl loop2,%eax movl loop2,%eax
leal 1(%eax),%edx leal 1(%eax),%edx
movl %edx,loop2 movl %edx,loop2
movl %edx,%eax movl %edx,%eax
cmpl $4095,%eax cmpl $4095,%eax
jbe .L1459 jbe copy_one_page
movl loop,%eax movl loop,%eax
leal 1(%eax),%edx leal 1(%eax),%edx
movl %edx,loop movl %edx,loop
movl %edx,%eax movl %edx,%eax
cmpl nr_copy_pages,%eax cmpl nr_copy_pages,%eax
jb .L1455 jb copy_loop
.p2align 4,,7
.L1453: copy_done:
movl $__USER_DS,%eax movl $__USER_DS,%eax
movw %ax, %ds movw %ax, %ds
...@@ -88,7 +86,6 @@ ENTRY(do_magic) ...@@ -88,7 +86,6 @@ ENTRY(do_magic)
call restore_processor_state call restore_processor_state
pushl saved_context_eflags ; popfl pushl saved_context_eflags ; popfl
call do_magic_resume_2 call do_magic_resume_2
.L1449:
popl %ebx popl %ebx
ret ret
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment