From 1c01dd3be0cf252fd56e65ccc49b6d617fb3e852 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 10 Jun 2010 13:22:44 +0000 Subject: [PATCH] Added InvalidatePage() which adds a new address to the invalidation cache. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37084 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/arch/x86/paging/X86VMTranslationMap.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/system/kernel/arch/x86/paging/X86VMTranslationMap.h b/src/system/kernel/arch/x86/paging/X86VMTranslationMap.h index a96a106bb3..fdb02411a4 100644 --- a/src/system/kernel/arch/x86/paging/X86VMTranslationMap.h +++ b/src/system/kernel/arch/x86/paging/X86VMTranslationMap.h @@ -31,6 +31,8 @@ struct X86VMTranslationMap : VMTranslationMap { virtual X86PagingStructures* PagingStructures() const = 0; + inline void InvalidatePage(addr_t address); + protected: TranslationMapPhysicalPageMapper* fPageMapper; int fInvalidPagesCount; @@ -39,4 +41,14 @@ protected: }; +void +X86VMTranslationMap::InvalidatePage(addr_t address) +{ + if (fInvalidPagesCount < PAGE_INVALIDATE_CACHE_SIZE) + fInvalidPages[fInvalidPagesCount] = address; + + fInvalidPagesCount++; +} + + #endif // KERNEL_ARCH_X86_X86_VM_TRANSLATION_MAP_H