The patch titled Resurrect the VMI lazy mode fixes has been added to the -mm tree. Its filename is resurrect-the-vmi-lazy-mode-fixes.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Resurrect the VMI lazy mode fixes From: Zachary Amsden <zach@xxxxxxxxxx> Code changes and cleanup in the paravirt-ops queue caused the original fix for this in 2.6.21 to create conflicts. The easiest thing to do was back it out before applying the queue. In that case, this fix brings it back with the newly right properly tidied up paravirt-ops code. Wheee! Signed-off-by: Zachary Amsden <zach@xxxxxxxxxx> Cc: Andi Kleen <ak@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/i386/kernel/vmi.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff -puN arch/i386/kernel/vmi.c~resurrect-the-vmi-lazy-mode-fixes arch/i386/kernel/vmi.c --- a/arch/i386/kernel/vmi.c~resurrect-the-vmi-lazy-mode-fixes +++ a/arch/i386/kernel/vmi.c @@ -69,6 +69,7 @@ static struct { void (*flush_tlb)(int); void (*set_initial_ap_state)(int, int); void (*halt)(void); + void (*set_lazy_mode)(int mode); } vmi_ops; /* XXX move this to alternative.h */ @@ -553,6 +554,26 @@ vmi_startup_ipi_hook(int phys_apicid, un } #endif +static void vmi_set_lazy_mode(enum paravirt_lazy_mode mode) +{ + static DEFINE_PER_CPU(int, lazy_mode); + + if (!vmi_ops.set_lazy_mode) + return; + + /* Modes should never nest or overlap */ + BUG_ON(__get_cpu_var(lazy_mode) && !(mode == PARAVIRT_LAZY_NONE || + mode == PARAVIRT_LAZY_FLUSH)); + + if (mode == PARAVIRT_LAZY_FLUSH) { + vmi_ops.set_lazy_mode(0); + vmi_ops.set_lazy_mode(__get_cpu_var(lazy_mode)); + } else { + vmi_ops.set_lazy_mode(mode); + __get_cpu_var(lazy_mode) = mode; + } +} + static inline int __init check_vmi_rom(struct vrom_header *rom) { struct pci_header *pci; @@ -777,7 +798,7 @@ static inline int __init activate_vmi(vo para_wrap(load_esp0, vmi_load_esp0, set_kernel_stack, UpdateKernelStack); para_fill(set_iopl_mask, SetIOPLMask); para_fill(io_delay, IODelay); - para_fill(set_lazy_mode, SetLazyMode); + para_wrap(set_lazy_mode, vmi_set_lazy_mode, set_lazy_mode, SetLazyMode); /* user and kernel flush are just handled with different flags to FlushTLB */ para_wrap(flush_tlb_user, vmi_flush_tlb_user, flush_tlb, FlushTLB); _ Patches currently in -mm which might be from zach@xxxxxxxxxx are proper-fix-for-highmem-kmap_atomic-functions-for-vmi-for-2621.patch revert-proper-fix-for-highmem-kmap_atomic-functions-for-vmi-for-2621.patch paravirt_ops-update-maintainers.patch paravirt_ops-allow-paravirt-backend-to-choose-kernel-pmd-sharing.patch paravirt_ops-rename-struct-paravirt_patch-to-paravirt_patch_site-for-clarity.patch paravirt_ops-use-patch-site-ids-computed-from-offset-in-paravirt_ops-structure.patch paravirt_ops-fix-patch-site-clobbers-to-include-return-register.patch paravirt_ops-consistently-wrap-paravirt-ops-callsites-to-make-them-patchable.patch paravirt_ops-add-common-patching-machinery.patch paravirt_ops-revert-map_pt_hook.patch paravirt_ops-add-kmap_atomic_pte-for-mapping-highpte-pages.patch i386-relocate-vdso-elf-headers-to-match-mapped-location-with-compat_vdso.patch i386-make-compat_vdso-runtime-selectable.patch i386-sysenter-arch-pages-fix.patch i386-acpi-remove-earlyquirk-warning.patch i386-mcheck-p4-grotesque-and-needless-warning-fix.patch i386-pgd-clone-under-lock-fix.patch vmi-supports-compat-vdso.patch resurrect-the-vmi-lazy-mode-fixes.patch vmi-kmap_atomic_pte-fix.patch vmi-timer-update.patch fix-buslogic-to-stop-using-check_region.patch i386-use-pte_update_defer-in-ptep_test_and_clear_dirtyyoung.patch i386-use-pte_update_defer-in-ptep_test_and_clear_dirtyyoung-fix.patch ignore-stolen-time-in-the-softlockup-watchdog.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html