lkml.org 
[lkml]   [2015]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] x86, acpi: Eliminate saved_eip
On 06/16/2015 12:05 PM, Pavel Machek wrote:
>
>> diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S
>> index 665c6b7..eef2bd3 100644
>> --- a/arch/x86/kernel/acpi/wakeup_32.S
>> +++ b/arch/x86/kernel/acpi/wakeup_32.S
>> @@ -31,17 +31,11 @@ wakeup_pmode_return:
>>
>> movl %cs:saved_magic, %eax
>> cmpl $0x12345678, %eax
>> - jne bogus_magic
>> -
>> - # jump to place where we left off
>> - movl saved_eip, %eax
>> - jmp *%eax
>> -
>> + je ret_point
>> bogus_magic:
>
> Longjump is supposed to flush the prefetch, but hopefully nothing
> depends on that detail... ...
>
> no.
>
> https://en.wikibooks.org/wiki/X86_Assembly/Protected_Mode#Entering_Protected_Mode
>
> longjump is supposed to be there. Sorry about that. I guess indirect
> jump is not neccessary, and we should add a comment there.

What "long jump"? It's not a far (segment:offset) jump, it's a near
jump (one which only changes the offset), indirect one through a register.

And we aren't switching to or from protected mode here.


\
 
 \ /
  Last update: 2015-06-16 15:21    [W:0.201 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site