* Re: swsusp: fix x86-64 suspend in -rc3
[not found] <41962C50.4020303@vt.edu>
@ 2004-10-14 9:08 ` Pavel Machek
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2004-10-14 9:08 UTC (permalink / raw)
To: William Wolf; +Cc: kernel list
Hi!
> Hey, I have been trying to get swsusp working on my x86_64 laptop for a
> while, and I finally found this email posted to the lkml by you, and
> someone responded saying that it worked for them. I assume it is for
> 2.6.9-rc3, which is what i am currently running. Im not sure if i tried
> to apply this patch correctly though. I do have some experience
> patching with the -mm patches and the -rc patches and such. What I did
> to try to apply your patch was copy your patch straight into a textfile
> (lets call it swsusp_patch), like this:
What about just going to -rc4?
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 3+ messages in thread
* swsusp: fix x86-64 suspend in -rc3
@ 2004-10-02 16:34 Pavel Machek
2004-10-02 20:05 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2004-10-02 16:34 UTC (permalink / raw)
To: kernel list, rjw
Hi!
Try this one, tell me if it helps.
Pavel
--- clean/arch/x86_64/kernel/suspend_asm.S 2004-10-01 00:30:08.000000000 +0200
+++ /data/l/64/linux64.mm/arch/x86_64/kernel/suspend_asm.S 2004-09-16 22:20:21.000000000 +0200
@@ -39,29 +39,28 @@
/* set up cr3 */
leaq init_level4_pgt(%rip),%rax
subq $__START_KERNEL_map,%rax
- movq %rax,%cr3
+ movq %rax,%cr3
movq mmu_cr4_features(%rip), %rax
movq %rax, %rdx
-
andq $~(1<<7), %rdx # PGE
- movq %rdx, %cr4; # turn off PGE
- movq %cr3, %rcx; # flush TLB
- movq %rcx, %cr3;
- movq %rax, %cr4; # turn PGE back on
+ movq %rdx, %cr4; # turn off PGE
+ movq %cr3, %rcx; # flush TLB
+ movq %rcx, %cr3;
+ movq %rax, %cr4; # turn PGE back on
movl nr_copy_pages(%rip), %eax
xorl %ecx, %ecx
- movq $0, loop(%rip)
+ movq $0, %r10
testl %eax, %eax
- je .L108
+ jz done
.L105:
xorl %esi, %esi
- movq $0, loop2(%rip)
+ movq $0, %r11
jmp .L104
.p2align 4,,7
-.L111:
- movq loop(%rip), %rcx
+copy_one_page:
+ movq %r10, %rcx
.L104:
movq pagedir_nosave(%rip), %rdx
movq %rcx, %rax
@@ -71,27 +70,26 @@
movzbl (%rsi,%rax), %eax
movb %al, (%rsi,%rcx)
- movq %cr3, %rax; # flush TLB
- movq %rax, %cr3;
+ movq %cr3, %rax; # flush TLB
+ movq %rax, %cr3;
- movq loop2(%rip), %rax
+ movq %r11, %rax
incq %rax
cmpq $4095, %rax
movq %rax, %rsi
- movq %rax, loop2(%rip)
- jbe .L111
- movq loop(%rip), %rax
+ movq %rax, %r11
+ jbe copy_one_page
+ movq %r10, %rax
incq %rax
movq %rax, %rcx
- movq %rax, loop(%rip)
+ movq %rax, %r10
mov nr_copy_pages(%rip), %eax
cmpq %rax, %rcx
jb .L105
-.L108:
- .align 4
+done:
movl $24, %eax
-
- movl %eax, %ds
+ movl %eax, %ds
+
movq saved_context_esp(%rip), %rsp
movq saved_context_ebp(%rip), %rbp
movq saved_context_eax(%rip), %rax
@@ -111,10 +109,3 @@
pushq saved_context_eflags(%rip) ; popfq
call swsusp_restore
ret
-
- .section .data.nosave
-loop:
- .quad 0
-loop2:
- .quad 0
- .previous
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: swsusp: fix x86-64 suspend in -rc3
2004-10-02 16:34 Pavel Machek
@ 2004-10-02 20:05 ` Rafael J. Wysocki
0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2004-10-02 20:05 UTC (permalink / raw)
To: Pavel Machek; +Cc: kernel list
On Saturday 02 of October 2004 18:34, Pavel Machek wrote:
> Hi!
>
> Try this one, tell me if it helps.
[--snip --]
It apparently does. I have successfully suspended and resumed the box for
five or six times in a row (I've lost the count ;-)). It's _much_ better
than it used to be! Of course I will torment it further and I'll let you
know if anything goes wrong.
Thanks a lot for the great job!
Greets,
RJW
--
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-14 9:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <41962C50.4020303@vt.edu>
2004-10-14 9:08 ` swsusp: fix x86-64 suspend in -rc3 Pavel Machek
2004-10-02 16:34 Pavel Machek
2004-10-02 20:05 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®