From 089405dd59157c3a652fcc5d1b28141bb0546eb9 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 11 Jan 2024 21:17:10 -0500 Subject: kernel: vm: Move vm_ctx structure to pmap.h Signed-off-by: Ian Moffett --- sys/include/vm/pmap.h | 14 ++++++++++++++ sys/include/vm/vm.h | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'sys/include') diff --git a/sys/include/vm/pmap.h b/sys/include/vm/pmap.h index cfcf28c..4d7a06f 100644 --- a/sys/include/vm/pmap.h +++ b/sys/include/vm/pmap.h @@ -45,6 +45,20 @@ */ #include +#include +#include +#include + +/* + * vm_ctx - Per core virtual memory context + */ +struct vm_ctx { + uintptr_t dynalloc_pool_phys; + size_t dynalloc_pool_sz; /* In bytes */ + tlsf_t tlsf_ctx; + struct spinlock dynalloc_lock; +}; + /* * Read virtual address space descriptor * and return it. diff --git a/sys/include/vm/vm.h b/sys/include/vm/vm.h index d68ec20..1bbe500 100644 --- a/sys/include/vm/vm.h +++ b/sys/include/vm/vm.h @@ -37,10 +37,8 @@ #include #include #include -#include #include #include -#include extern volatile struct limine_hhdm_request g_hhdm_request; @@ -49,18 +47,6 @@ extern volatile struct limine_hhdm_request g_hhdm_request; #define PHYS_TO_VIRT(phys) (void *)((uintptr_t)phys + VM_HIGHER_HALF) #define VIRT_TO_PHYS(virt) ((uintptr_t)virt - VM_HIGHER_HALF) -/* - * vm_ctx - Per core virtual memory context - * - * Holds per core virtual memory information. - */ -struct vm_ctx { - uintptr_t dynalloc_pool_phys; - size_t dynalloc_pool_sz; /* In bytes */ - tlsf_t tlsf_ctx; - struct spinlock dynalloc_lock; -}; - /* * Returns the machine's pagesize: * -- cgit v1.2.3