]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
linux/x86-64: use xen_new_user_pt() rather than open-coding it
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 8 Aug 2008 13:22:52 +0000 (14:22 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 8 Aug 2008 13:22:52 +0000 (14:22 +0100)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
drivers/xen/core/machine_reboot.c

index 5a13599c29b269df073e8251efec694fc43624ed..4b29bca518a425f2db4f7f2d622e679bf8c22f52 100644 (file)
@@ -184,14 +184,8 @@ static int take_machine_down(void *_suspend)
                 * We do it here just in case, but there's no need if we are
                 * in fast-suspend mode as that implies a new enough Xen.
                 */
-               if (!suspend->fast_suspend) {
-                       struct mmuext_op op;
-                       op.cmd = MMUEXT_NEW_USER_BASEPTR;
-                       op.arg1.mfn = pfn_to_mfn(__pa(__user_pgd(
-                               current->active_mm->pgd)) >> PAGE_SHIFT);
-                       if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF))
-                               BUG();
-               }
+               if (!suspend->fast_suspend)
+                       xen_new_user_pt(__pa(__user_pgd(current->active_mm->pgd));
 #endif
        }
        time_resume();