ia64/linux-2.6.18-xen.hg

annotate include/asm-i386/suspend.h @ 452:c7ed6fe5dca0

kexec: dont initialise regions in reserve_memory()

There is no need to initialise efi_memmap_res and boot_param_res in
reserve_memory() for the initial xen domain as it is done in
machine_kexec_setup_resources() using values from the kexec hypercall.

Signed-off-by: Simon Horman <horms@verge.net.au>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 28 10:55:18 2008 +0000 (2008-02-28)
parents 831230e53067
children
rev   line source
ian@0 1 /*
ian@0 2 * Copyright 2001-2002 Pavel Machek <pavel@suse.cz>
ian@0 3 * Based on code
ian@0 4 * Copyright 2001 Patrick Mochel <mochel@osdl.org>
ian@0 5 */
ian@0 6 #include <asm/desc.h>
ian@0 7 #include <asm/i387.h>
ian@0 8
ian@0 9 static inline int
ian@0 10 arch_prepare_suspend(void)
ian@0 11 {
ian@0 12 /* If you want to make non-PSE machine work, turn off paging
ian@0 13 in swsusp_arch_suspend. swsusp_pg_dir should have identity mapping, so
ian@0 14 it could work... */
ian@0 15 if (!cpu_has_pse) {
ian@0 16 printk(KERN_ERR "PSE is required for swsusp.\n");
ian@0 17 return -EPERM;
ian@0 18 }
ian@0 19 return 0;
ian@0 20 }
ian@0 21
ian@0 22 /* image of the saved processor state */
ian@0 23 struct saved_context {
ian@0 24 u16 es, fs, gs, ss;
ian@0 25 unsigned long cr0, cr2, cr3, cr4;
ian@0 26 u16 gdt_pad;
ian@0 27 u16 gdt_limit;
ian@0 28 unsigned long gdt_base;
ian@0 29 u16 idt_pad;
ian@0 30 u16 idt_limit;
ian@0 31 unsigned long idt_base;
ian@0 32 u16 ldt;
ian@0 33 u16 tss;
ian@0 34 unsigned long tr;
ian@0 35 unsigned long safety;
ian@0 36 unsigned long return_address;
ian@0 37 } __attribute__((packed));
ian@0 38
ian@0 39 #ifdef CONFIG_ACPI_SLEEP
ian@0 40 extern unsigned long saved_eip;
ian@0 41 extern unsigned long saved_esp;
ian@0 42 extern unsigned long saved_ebp;
ian@0 43 extern unsigned long saved_ebx;
ian@0 44 extern unsigned long saved_esi;
ian@0 45 extern unsigned long saved_edi;
ian@0 46
ian@0 47 static inline void acpi_save_register_state(unsigned long return_point)
ian@0 48 {
ian@0 49 saved_eip = return_point;
ian@0 50 asm volatile ("movl %%esp,%0" : "=m" (saved_esp));
ian@0 51 asm volatile ("movl %%ebp,%0" : "=m" (saved_ebp));
ian@0 52 asm volatile ("movl %%ebx,%0" : "=m" (saved_ebx));
ian@0 53 asm volatile ("movl %%edi,%0" : "=m" (saved_edi));
ian@0 54 asm volatile ("movl %%esi,%0" : "=m" (saved_esi));
ian@0 55 }
ian@0 56
ian@0 57 #define acpi_restore_register_state() do {} while (0)
ian@0 58
ian@0 59 /* routines for saving/restoring kernel state */
ian@0 60 extern int acpi_save_state_mem(void);
ian@0 61 #endif