aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-02-29 13:23:55 -0500
committerIan Moffett <ian@osmora.org>2024-02-29 13:23:55 -0500
commit1805ea2e59d90e0d14636fbac362af4e6f924d85 (patch)
treee82c1d1c02273d912c6b970daf3844d732d12e29
parent60e0827762b4cfff1a04d1287139fb23f521ff86 (diff)
kernel: vm: vm_get_bsp_ctx() -> vm_get_ctx()
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/include/vm/vm.h2
-rw-r--r--sys/vm/vm_dynalloc.c6
-rw-r--r--sys/vm/vm_init.c2
-rw-r--r--sys/vm/vm_map.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/sys/include/vm/vm.h b/sys/include/vm/vm.h
index 4ea6d22..2a24d76 100644
--- a/sys/include/vm/vm.h
+++ b/sys/include/vm/vm.h
@@ -60,6 +60,6 @@ vm_get_page_size(void)
}
void vm_init(void);
-struct vm_ctx *vm_get_bsp_ctx(void);
+struct vm_ctx *vm_get_ctx(void);
#endif /* !_VM_H_ */
diff --git a/sys/vm/vm_dynalloc.c b/sys/vm/vm_dynalloc.c
index e1b61c7..8ec7aed 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 vm_ctx *vm_ctx = vm_get_bsp_ctx();
+ struct vm_ctx *vm_ctx = vm_get_ctx();
void *tmp;
spinlock_acquire(&vm_ctx->dynalloc_lock);
@@ -58,7 +58,7 @@ void *
dynrealloc(void *old_ptr, size_t newsize)
{
/* TODO: Per CPU */
- struct vm_ctx *vm_ctx = vm_get_bsp_ctx();
+ struct vm_ctx *vm_ctx = vm_get_ctx();
void *tmp;
spinlock_acquire(&vm_ctx->dynalloc_lock);
@@ -76,7 +76,7 @@ void
dynfree(void *ptr)
{
/* TODO: Per CPU */
- struct vm_ctx *vm_ctx = vm_get_bsp_ctx();
+ struct vm_ctx *vm_ctx = vm_get_ctx();
spinlock_acquire(&vm_ctx->dynalloc_lock);
tlsf_free(vm_ctx->tlsf_ctx, ptr);
diff --git a/sys/vm/vm_init.c b/sys/vm/vm_init.c
index 2a704fe..f15cb0b 100644
--- a/sys/vm/vm_init.c
+++ b/sys/vm/vm_init.c
@@ -54,7 +54,7 @@ volatile struct limine_hhdm_request g_hhdm_request = {
};
struct vm_ctx *
-vm_get_bsp_ctx(void)
+vm_get_ctx(void)
{
return &bsp_vm_ctx;
}
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 0002dde..b3c89ab 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -81,11 +81,11 @@ vm_map_create(vaddr_t va, paddr_t pa, vm_prot_t prot, size_t bytes)
int s;
/*
- * TODO: This needs to be changed, once vm_get_bsp_ctx()
+ * TODO: This needs to be changed, once vm_get_ctx()
* is no longer used, we'll need to fetch it from
* the current process!
*/
- struct vm_ctx *ctx = vm_get_bsp_ctx();
+ struct vm_ctx *ctx = vm_get_ctx();
/* We want bytes to be aligned by the granule */
bytes = __ALIGN_UP(bytes, granule);