]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-x86/kexec.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[linux-2.6-omap-h63xx.git] / include / asm-x86 / kexec.h
index c90d3c77afc26bc7f71f3d689bdcb0eb4f822319..c0e52a14fd4dd981ee36ea66484f7f564b40bd04 100644 (file)
 # define VA_PTE_0              5
 # define PA_PTE_1              6
 # define VA_PTE_1              7
+# define PA_SWAP_PAGE          8
 # ifdef CONFIG_X86_PAE
-#  define PA_PMD_0             8
-#  define VA_PMD_0             9
-#  define PA_PMD_1             10
-#  define VA_PMD_1             11
-#  define PAGES_NR             12
+#  define PA_PMD_0             9
+#  define VA_PMD_0             10
+#  define PA_PMD_1             11
+#  define VA_PMD_1             12
+#  define PAGES_NR             13
 # else
-#  define PAGES_NR             8
+#  define PAGES_NR             9
 # endif
 #else
 # define PA_CONTROL_PAGE       0
@@ -94,10 +95,9 @@ static inline void crash_fixup_ss_esp(struct pt_regs *newregs,
 {
 #ifdef CONFIG_X86_32
        newregs->sp = (unsigned long)&(oldregs->sp);
-       __asm__ __volatile__(
-                       "xorl %%eax, %%eax\n\t"
-                       "movw %%ss, %%ax\n\t"
-                       :"=a"(newregs->ss));
+       asm volatile("xorl %%eax, %%eax\n\t"
+                    "movw %%ss, %%ax\n\t"
+                    :"=a"(newregs->ss));
 #endif
 }
 
@@ -114,50 +114,51 @@ static inline void crash_setup_regs(struct pt_regs *newregs,
                crash_fixup_ss_esp(newregs, oldregs);
        } else {
 #ifdef CONFIG_X86_32
-               __asm__ __volatile__("movl %%ebx,%0" : "=m"(newregs->bx));
-               __asm__ __volatile__("movl %%ecx,%0" : "=m"(newregs->cx));
-               __asm__ __volatile__("movl %%edx,%0" : "=m"(newregs->dx));
-               __asm__ __volatile__("movl %%esi,%0" : "=m"(newregs->si));
-               __asm__ __volatile__("movl %%edi,%0" : "=m"(newregs->di));
-               __asm__ __volatile__("movl %%ebp,%0" : "=m"(newregs->bp));
-               __asm__ __volatile__("movl %%eax,%0" : "=m"(newregs->ax));
-               __asm__ __volatile__("movl %%esp,%0" : "=m"(newregs->sp));
-               __asm__ __volatile__("movl %%ss, %%eax;" :"=a"(newregs->ss));
-               __asm__ __volatile__("movl %%cs, %%eax;" :"=a"(newregs->cs));
-               __asm__ __volatile__("movl %%ds, %%eax;" :"=a"(newregs->ds));
-               __asm__ __volatile__("movl %%es, %%eax;" :"=a"(newregs->es));
-               __asm__ __volatile__("pushfl; popl %0" :"=m"(newregs->flags));
+               asm volatile("movl %%ebx,%0" : "=m"(newregs->bx));
+               asm volatile("movl %%ecx,%0" : "=m"(newregs->cx));
+               asm volatile("movl %%edx,%0" : "=m"(newregs->dx));
+               asm volatile("movl %%esi,%0" : "=m"(newregs->si));
+               asm volatile("movl %%edi,%0" : "=m"(newregs->di));
+               asm volatile("movl %%ebp,%0" : "=m"(newregs->bp));
+               asm volatile("movl %%eax,%0" : "=m"(newregs->ax));
+               asm volatile("movl %%esp,%0" : "=m"(newregs->sp));
+               asm volatile("movl %%ss, %%eax;" :"=a"(newregs->ss));
+               asm volatile("movl %%cs, %%eax;" :"=a"(newregs->cs));
+               asm volatile("movl %%ds, %%eax;" :"=a"(newregs->ds));
+               asm volatile("movl %%es, %%eax;" :"=a"(newregs->es));
+               asm volatile("pushfl; popl %0" :"=m"(newregs->flags));
 #else
-               __asm__ __volatile__("movq %%rbx,%0" : "=m"(newregs->bx));
-               __asm__ __volatile__("movq %%rcx,%0" : "=m"(newregs->cx));
-               __asm__ __volatile__("movq %%rdx,%0" : "=m"(newregs->dx));
-               __asm__ __volatile__("movq %%rsi,%0" : "=m"(newregs->si));
-               __asm__ __volatile__("movq %%rdi,%0" : "=m"(newregs->di));
-               __asm__ __volatile__("movq %%rbp,%0" : "=m"(newregs->bp));
-               __asm__ __volatile__("movq %%rax,%0" : "=m"(newregs->ax));
-               __asm__ __volatile__("movq %%rsp,%0" : "=m"(newregs->sp));
-               __asm__ __volatile__("movq %%r8,%0" : "=m"(newregs->r8));
-               __asm__ __volatile__("movq %%r9,%0" : "=m"(newregs->r9));
-               __asm__ __volatile__("movq %%r10,%0" : "=m"(newregs->r10));
-               __asm__ __volatile__("movq %%r11,%0" : "=m"(newregs->r11));
-               __asm__ __volatile__("movq %%r12,%0" : "=m"(newregs->r12));
-               __asm__ __volatile__("movq %%r13,%0" : "=m"(newregs->r13));
-               __asm__ __volatile__("movq %%r14,%0" : "=m"(newregs->r14));
-               __asm__ __volatile__("movq %%r15,%0" : "=m"(newregs->r15));
-               __asm__ __volatile__("movl %%ss, %%eax;" :"=a"(newregs->ss));
-               __asm__ __volatile__("movl %%cs, %%eax;" :"=a"(newregs->cs));
-               __asm__ __volatile__("pushfq; popq %0" :"=m"(newregs->flags));
+               asm volatile("movq %%rbx,%0" : "=m"(newregs->bx));
+               asm volatile("movq %%rcx,%0" : "=m"(newregs->cx));
+               asm volatile("movq %%rdx,%0" : "=m"(newregs->dx));
+               asm volatile("movq %%rsi,%0" : "=m"(newregs->si));
+               asm volatile("movq %%rdi,%0" : "=m"(newregs->di));
+               asm volatile("movq %%rbp,%0" : "=m"(newregs->bp));
+               asm volatile("movq %%rax,%0" : "=m"(newregs->ax));
+               asm volatile("movq %%rsp,%0" : "=m"(newregs->sp));
+               asm volatile("movq %%r8,%0" : "=m"(newregs->r8));
+               asm volatile("movq %%r9,%0" : "=m"(newregs->r9));
+               asm volatile("movq %%r10,%0" : "=m"(newregs->r10));
+               asm volatile("movq %%r11,%0" : "=m"(newregs->r11));
+               asm volatile("movq %%r12,%0" : "=m"(newregs->r12));
+               asm volatile("movq %%r13,%0" : "=m"(newregs->r13));
+               asm volatile("movq %%r14,%0" : "=m"(newregs->r14));
+               asm volatile("movq %%r15,%0" : "=m"(newregs->r15));
+               asm volatile("movl %%ss, %%eax;" :"=a"(newregs->ss));
+               asm volatile("movl %%cs, %%eax;" :"=a"(newregs->cs));
+               asm volatile("pushfq; popq %0" :"=m"(newregs->flags));
 #endif
                newregs->ip = (unsigned long)current_text_addr();
        }
 }
 
 #ifdef CONFIG_X86_32
-asmlinkage NORET_TYPE void
+asmlinkage unsigned long
 relocate_kernel(unsigned long indirection_page,
                unsigned long control_page,
                unsigned long start_address,
-               unsigned int has_pae) ATTRIB_NORET;
+               unsigned int has_pae,
+               unsigned int preserve_context);
 #else
 NORET_TYPE void
 relocate_kernel(unsigned long indirection_page,