Merge to Fedora kernel-2.6.7-1.492
[linux-2.6.git] / arch / ia64 / kernel / process.c
index 7455e48..f49b98c 100644 (file)
@@ -439,6 +439,10 @@ copy_thread (int nr, unsigned long clone_flags,
                ia32_save_state(p);
                if (clone_flags & CLONE_SETTLS)
                        retval = ia32_clone_tls(p, child_ptregs);
+
+               /* Copy partially mapped page list */
+               if (!retval)
+                       retval = ia32_copy_partial_page_list(p, clone_flags);
        }
 #endif
 
@@ -672,6 +676,8 @@ flush_thread (void)
        /* drop floating-point and debug-register state if it exists: */
        current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);
        ia64_drop_fpu(current);
+       if (IS_IA32_PROCESS(ia64_task_regs(current)))
+               ia32_drop_partial_page_list(current);
 }
 
 /*
@@ -691,6 +697,8 @@ exit_thread (void)
        if (current->thread.flags & IA64_THREAD_DBG_VALID)
                pfm_release_debug_registers(current);
 #endif
+       if (IS_IA32_PROCESS(ia64_task_regs(current)))
+               ia32_drop_partial_page_list(current);
 }
 
 unsigned long