mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
vmm: redo tlb shootdowns
This commit is contained in:
+3
-2
@@ -156,10 +156,11 @@ static int mmap(int minor, void *addr, uintmax_t offset, int flags) {
|
||||
|
||||
static int munmap(int minor, void *addr, uintmax_t offset, int flags) {
|
||||
void *phys = arch_mmu_getphysical(current_vmm_context()->pagetable, addr);
|
||||
bool release = (flags & V_FFLAGS_SHARED) && arch_mmu_iswritable(current_vmm_context()->pagetable, addr);
|
||||
arch_mmu_unmap(current_vmm_context()->pagetable, addr);
|
||||
if ((flags & V_FFLAGS_SHARED) == 0) {
|
||||
arch_mmu_invalidate_range(addr, PAGE_SIZE);
|
||||
if (release)
|
||||
pmm_release(phys);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user