aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2023-12-13 14:31:07 -0500
committerIan Moffett <ian@osmora.org>2023-12-13 14:31:34 -0500
commit496862183a101a9aceaeff968441fd2ad0bbbd7d (patch)
treead018937a158fd0f4185a2df205d7d9134336eea /sys
parent88e9b3b3a6060ab1035e0576519e18bb64edda09 (diff)
kernel: vm: `cpu_vm_ctx' -> `vm_ctx'
This commit cleans up the naming of the `cpu_vm_ctx' as it already implies it is per core Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r--sys/include/vm/vm.h6
-rw-r--r--sys/vm/vm_dynalloc.c6
-rw-r--r--sys/vm/vm_init.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/sys/include/vm/vm.h b/sys/include/vm/vm.h
index d135b72..59cf3bc 100644
--- a/sys/include/vm/vm.h
+++ b/sys/include/vm/vm.h
@@ -45,11 +45,11 @@ extern volatile struct limine_hhdm_request g_hhdm_request;
#define VIRT_TO_PHYS(virt) ((uintptr_t)virt - VM_HIGHER_HALF)
/*
- * cpu_vm_ctx - Per core virtual memory context
+ * vm_ctx - Per core virtual memory context
*
* Holds per core virtual memory information.
*/
-struct cpu_vm_ctx {
+struct vm_ctx {
uintptr_t dynalloc_pool_phys;
size_t dynalloc_pool_sz; /* In bytes */
tlsf_t tlsf_ctx;
@@ -68,6 +68,6 @@ vm_get_page_size(void)
}
void vm_init(void);
-struct cpu_vm_ctx vm_get_bsp_ctx(void);
+struct vm_ctx vm_get_bsp_ctx(void);
#endif /* !_VM_H_ */
diff --git a/sys/vm/vm_dynalloc.c b/sys/vm/vm_dynalloc.c
index d43372b..e7acd19 100644
--- a/sys/vm/vm_dynalloc.c
+++ b/sys/vm/vm_dynalloc.c
@@ -39,7 +39,7 @@ void *
dynalloc(size_t sz)
{
/* TODO: Per CPU */
- struct cpu_vm_ctx vm_ctx = vm_get_bsp_ctx();
+ struct vm_ctx vm_ctx = vm_get_bsp_ctx();
return tlsf_malloc(vm_ctx.tlsf_ctx, sz);
}
@@ -54,7 +54,7 @@ void *
dynrealloc(void *old_ptr, size_t newsize)
{
/* TODO: Per CPU */
- struct cpu_vm_ctx vm_ctx = vm_get_bsp_ctx();
+ struct vm_ctx vm_ctx = vm_get_bsp_ctx();
return tlsf_realloc(vm_ctx.tlsf_ctx, old_ptr, newsize);
}
@@ -68,7 +68,7 @@ void
dynfree(void *ptr)
{
/* TODO: Per CPU */
- struct cpu_vm_ctx vm_ctx = vm_get_bsp_ctx();
+ struct vm_ctx vm_ctx = vm_get_bsp_ctx();
tlsf_free(vm_ctx.tlsf_ctx, ptr);
}
diff --git a/sys/vm/vm_init.c b/sys/vm/vm_init.c
index c298a6a..8fe12d3 100644
--- a/sys/vm/vm_init.c
+++ b/sys/vm/vm_init.c
@@ -46,14 +46,14 @@ static volatile struct vas kernel_vas;
* TODO: Move this to a per CPU structure, this kinda sucks
* how it is right now...
*/
-static volatile struct cpu_vm_ctx bsp_vm_ctx = {0};
+static volatile struct vm_ctx bsp_vm_ctx = {0};
volatile struct limine_hhdm_request g_hhdm_request = {
.id = LIMINE_HHDM_REQUEST,
.revision = 0
};
-struct cpu_vm_ctx
+struct vm_ctx
vm_get_bsp_ctx(void)
{
return bsp_vm_ctx;