git: cd836f600418 - main - vm: Retire kmem_arena
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 24 Jul 2024 19:32:24 UTC
The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=cd836f600418e892869d23cee857ce1a6cd5b863 commit cd836f600418e892869d23cee857ce1a6cd5b863 Author: Alan Cox <alc@FreeBSD.org> AuthorDate: 2024-07-21 19:50:47 +0000 Commit: Alan Cox <alc@FreeBSD.org> CommitDate: 2024-07-24 19:31:40 +0000 vm: Retire kmem_arena It has simply been an alias for the kernel_arena for many years now. Enough time has passed to retire it. Any out-of-tree kernel modules that directly use kmem_arena should switch to kernel_arena. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D46057 --- sys/arm/nvidia/drm2/tegra_bo.c | 4 ++-- sys/kern/subr_vmem.c | 2 -- sys/vm/vm_kern.h | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/arm/nvidia/drm2/tegra_bo.c b/sys/arm/nvidia/drm2/tegra_bo.c index c27b9f39c508..08cd3de6a3fe 100644 --- a/sys/arm/nvidia/drm2/tegra_bo.c +++ b/sys/arm/nvidia/drm2/tegra_bo.c @@ -71,7 +71,7 @@ tegra_bo_destruct(struct tegra_bo *bo) vm_object_deallocate(bo->cdev_pager); if (bo->vbase != 0) - vmem_free(kmem_arena, bo->vbase, size); + vmem_free(kernel_arena, bo->vbase, size); } static void @@ -137,7 +137,7 @@ tegra_bo_init_pager(struct tegra_bo *bo) size = round_page(bo->gem_obj.size); bo->pbase = VM_PAGE_TO_PHYS(bo->m[0]); - if (vmem_alloc(kmem_arena, size, M_WAITOK | M_BESTFIT, &bo->vbase)) + if (vmem_alloc(kernel_arena, size, M_WAITOK | M_BESTFIT, &bo->vbase)) return (ENOMEM); VM_OBJECT_WLOCK(bo->cdev_pager); diff --git a/sys/kern/subr_vmem.c b/sys/kern/subr_vmem.c index a706d944dc3f..9288b0935441 100644 --- a/sys/kern/subr_vmem.c +++ b/sys/kern/subr_vmem.c @@ -236,9 +236,7 @@ static uma_zone_t vmem_bt_zone; static struct vmem kernel_arena_storage; static struct vmem buffer_arena_storage; static struct vmem transient_arena_storage; -/* kernel and kmem arenas are aliased for backwards KPI compat. */ vmem_t *kernel_arena = &kernel_arena_storage; -vmem_t *kmem_arena = &kernel_arena_storage; vmem_t *buffer_arena = &buffer_arena_storage; vmem_t *transient_arena = &transient_arena_storage; diff --git a/sys/vm/vm_kern.h b/sys/vm/vm_kern.h index 848f28fe90b8..942c03480364 100644 --- a/sys/vm/vm_kern.h +++ b/sys/vm/vm_kern.h @@ -69,7 +69,6 @@ extern struct vm_map exec_map_store; extern struct vm_map pipe_map_store; #define pipe_map (&pipe_map_store) extern struct vmem *kernel_arena; -extern struct vmem *kmem_arena; extern struct vmem *buffer_arena; extern struct vmem *transient_arena; extern struct vmem *memguard_arena;