From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: matthieu castet <castet.matthieu@free.fr>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
linux-acpi@vger.kernel.org, x86@kernel.org,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH 2/2] clean acpi wakeup code after merge
Date: Sun, 13 Mar 2011 23:32:55 +0100 [thread overview]
Message-ID: <201103132332.55783.rjw@sisk.pl> (raw)
In-Reply-To: <4D7D3F6B.8060504@free.fr>
On Sunday, March 13, 2011, matthieu castet wrote:
>
> This remove unsued pmode_* entry in wakeup header and saved_*dt
> in wakeup_32.
>
> Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> arch/x86/kernel/acpi/realmode/wakeup.S | 8 --------
> arch/x86/kernel/acpi/realmode/wakeup.h | 11 +----------
> arch/x86/kernel/acpi/sleep.c | 2 --
> arch/x86/kernel/acpi/wakeup_32.S | 24 +-----------------------
> 4 files changed, 2 insertions(+), 43 deletions(-)
>
> diff --git a/arch/x86/kernel/acpi/realmode/wakeup.S b/arch/x86/kernel/acpi/realmode/wakeup.S
> index 150a734..aefa400 100644
> --- a/arch/x86/kernel/acpi/realmode/wakeup.S
> +++ b/arch/x86/kernel/acpi/realmode/wakeup.S
> @@ -20,14 +20,6 @@ _start:
> .globl wakeup_header
> wakeup_header:
> video_mode: .short 0 /* Video mode number */
> -pmode_return: .byte 0x66, 0xea /* ljmpl */
> - .long 0 /* offset goes here */
> - .short __KERNEL_CS
> -pmode_cr0: .long 0 /* Saved %cr0 */
> -pmode_cr3: .long 0 /* Saved %cr3 */
> -pmode_cr4: .long 0 /* Saved %cr4 */
> -pmode_efer: .quad 0 /* Saved EFER */
> -pmode_gdt: .quad 0
> realmode_flags: .long 0
> real_magic: .long 0
> trampoline_segment: .word 0
> diff --git a/arch/x86/kernel/acpi/realmode/wakeup.h b/arch/x86/kernel/acpi/realmode/wakeup.h
> index e1828c0..5f302e1 100644
> --- a/arch/x86/kernel/acpi/realmode/wakeup.h
> +++ b/arch/x86/kernel/acpi/realmode/wakeup.h
> @@ -12,18 +12,9 @@
> /* This must match data at wakeup.S */
> struct wakeup_header {
> u16 video_mode; /* Video mode number */
> - u16 _jmp1; /* ljmpl opcode, 32-bit only */
> - u32 pmode_entry; /* Protected mode resume point, 32-bit only */
> - u16 _jmp2; /* CS value, 32-bit only */
> - u32 pmode_cr0; /* Protected mode cr0 */
> - u32 pmode_cr3; /* Protected mode cr3 */
> - u32 pmode_cr4; /* Protected mode cr4 */
> - u32 pmode_efer_low; /* Protected mode EFER */
> - u32 pmode_efer_high;
> - u64 pmode_gdt;
> u32 realmode_flags;
> u32 real_magic;
> - u16 trampoline_segment; /* segment with trampoline code, 64-bit only */
> + u16 trampoline_segment; /* segment with trampoline code */
> u8 _pad1;
> u8 wakeup_jmp;
> u16 wakeup_jmp_off;
> diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
> index 58a0b4b..bab18ed 100644
> --- a/arch/x86/kernel/acpi/sleep.c
> +++ b/arch/x86/kernel/acpi/sleep.c
> @@ -67,8 +67,6 @@ int acpi_save_state_mem(void)
> header->wakeup_gdt[2] =
> GDT_ENTRY(0x8093, acpi_wakeup_address, 0xfffff);
>
> - header->pmode_cr0 = read_cr0();
> - header->pmode_cr4 = read_cr4_safe();
> header->realmode_flags = acpi_realmode_flags;
> header->real_magic = 0x12345678;
> header->trampoline_segment = trampoline_address() >> 4;
> diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S
> index 13ab720..56f8de4 100644
> --- a/arch/x86/kernel/acpi/wakeup_32.S
> +++ b/arch/x86/kernel/acpi/wakeup_32.S
> @@ -17,17 +17,7 @@ wakeup_pmode_return:
> movw %ax, %fs
> movw %ax, %gs
>
> - # reload the gdt, as we need the full 32 bit address
> - lgdt saved_gdt
> - lidt saved_idt
> - lldt saved_ldt
> - ljmp $(__KERNEL_CS), $1f
> -1:
> - movl %cr3, %eax
> - movl %eax, %cr3
> - wbinvd
> -
> - # and restore the stack ... but you need gdt for this to work
> + # and restore the stack ...
> movl saved_context_esp, %esp
>
> movl %cs:saved_magic, %eax
> @@ -44,11 +34,6 @@ bogus_magic:
>
>
> save_registers:
> - sgdt saved_gdt
> - sidt saved_idt
> - sldt saved_ldt
> - str saved_tss
> -
> leal 4(%esp), %eax
> movl %eax, saved_context_esp
> movl %ebx, saved_context_ebx
> @@ -91,10 +76,3 @@ ret_point:
> ALIGN
> ENTRY(saved_magic) .long 0
> ENTRY(saved_eip) .long 0
> -
> -# saved registers
> -saved_gdt: .long 0,0
> -saved_idt: .long 0,0
> -saved_ldt: .long 0
> -saved_tss: .long 0
> -
>
next prev parent reply other threads:[~2011-03-13 22:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-13 22:04 [PATCH 2/2] clean acpi wakeup code after merge matthieu castet
2011-03-13 22:32 ` Rafael J. Wysocki [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-07-02 17:43 [PATCH 1/2] merge 32 and 64 realmode wakeup code Matthieu CASTET
2011-07-02 17:43 ` [PATCH 2/2] clean acpi wakeup code after merge Matthieu CASTET
2011-12-16 20:13 [PATCH 1/2] merge 32 and 64 realmode wakeup code Matthieu CASTET
2011-12-16 20:13 ` [PATCH 2/2] clean acpi wakeup code after merge Matthieu CASTET
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201103132332.55783.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=castet.matthieu@free.fr \
--cc=hpa@zytor.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.