All of lore.kernel.org
 help / color / mirror / Atom feed
* [pm] Strange cleanups in -test8 kernel/acpi/wakeup.S
@ 2003-10-18 20:12 Pavel Machek
  2003-10-20 18:26 ` Patrick Mochel
  0 siblings, 1 reply; 5+ messages in thread
From: Pavel Machek @ 2003-10-18 20:12 UTC (permalink / raw)
  To: Patrick Mochel, kernel list

Hi!

Some more changes landed in -test8. I have not seen them
before. Patrick, please, if you change something, can you post patch
somewhere for review before merging with Linus?

bkcvs info is:
BitKeeper to RCS/CVS export
----------------------------
revision 1.5
date: 2003/10/08 22:55:45;  author: mochel;  state: Exp;  lines: +37
-89
[power] Clean up ACPI STR assembly.

diff -Nru a/arch/i386/kernel/acpi/wakeup.S
b/arch/i386/kernel/acpi/wakeup.S
--- a/arch/i386/kernel/acpi/wakeup.S    Fri Oct 17 14:43:50 2003
+++ b/arch/i386/kernel/acpi/wakeup.S    Fri Oct 17 14:43:50 2003
@@ -172,14 +172,13 @@
 .org   0x1000

 wakeup_pmode_return:
-       movl    $__KERNEL_DS, %eax
-       movl    %eax, %ds
-       movw    $0x0e00 + 'u', %ds:(0xb8016)
-
-       # restore other segment registers
-       xorl    %eax, %eax
+       movw    $__KERNEL_DS, %ax
+       movw    %ax, %ss
+       movw    %ax, %ds
+       movw    %ax, %es
        movw    %ax, %fs
        movw    %ax, %gs
+       movw    $0x0e00 + 'u', 0xb8016

        # reload the gdt, as we need the full 32 bit address
        lgdt    saved_gdt
	~~~~~~~~~~~~~~~~~

Notice lgdt here. You have moved setup of segment registers before
loading gdt. This is actually okay, if you can be sure that all such
registers are in gdt (and not in ldt, for example).

Now, if you are sure this is okay (there is another load of gdt in
real mode), you can kill this lgdt, too, and  kill the comment below.

@@ -192,46 +191,30 @@
        wbinvd

        # and restore the stack ... but you need gdt for this to work
-       movl    $__KERNEL_DS, %eax
-       movw    %ax, %ss
-       movw    %ax, %ds
-       movw    %ax, %es
-       movw    %ax, %fs
-       movw    %ax, %gs
-       movl    saved_esp, %esp
+       movl    saved_context_esp, %esp

...

-       movw    $0x0e00 + 'W', %ds:(0xb8018)
-       movl    $(1024*1024*3), %ecx
-       movl    $0, %esi
-       rep     lodsb
-       movw    $0x0e00 + 'O', %ds:(0xb8018)
+       movw    $0x0e00 + 'W', 0xb8018
+       outl    %eax, $0x80
+       outl    %eax, $0x80
+       movw    $0x0e00 + 'O', 0xb8018

What are these outl-s? I do not see %ax being initialized... Some kind
of debugging hack? If you are trying to emulate delays, those are not
needed, what you killed were debugging hacks.

You no longer save %eax, %ecx, %edx, %esp, %ebp, %edi, %esi. This
means you probably need to add asmlinkage somewhere...
							Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-10-20 20:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-18 20:12 [pm] Strange cleanups in -test8 kernel/acpi/wakeup.S Pavel Machek
2003-10-20 18:26 ` Patrick Mochel
2003-10-20 19:31   ` Pavel Machek
2003-10-20 19:41     ` Patrick Mochel
2003-10-20 20:34   ` Mika Penttilä

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.