From 56ff60294ba81457e453b688cbec314f92f0fff3 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 27 Nov 2008 01:37:52 +0000 Subject: 2008-11-27 Samuel Thibault * i386/i386/proc_reg.h (invlpg): New macro. * i386/intel/pmap.c (INVALIDATE_TLB): If portion to be flushed is less than 32 pages, use calls to invlpg instead of flush_tlb. --- i386/intel/pmap.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'i386/intel/pmap.c') diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c index 697e5f8..02482ae 100644 --- a/i386/intel/pmap.c +++ b/i386/intel/pmap.c @@ -332,7 +332,13 @@ lock_data_t pmap_system_lock; #define MAX_TBIS_SIZE 32 /* > this -> TBIA */ /* XXX */ #define INVALIDATE_TLB(s, e) { \ - flush_tlb(); \ + if (((e) - (s)) > 32 * PAGE_SIZE) { \ + flush_tlb(); \ + } else { \ + vm_offset_t i; \ + for (i = s; i < e; i += PAGE_SIZE) \ + invlpg(i); \ + } \ } -- cgit v1.2.3