mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: remove lockless_allocator from safe build
Bracket the functionality of lockless_allocator under the CONFIG_NVGPU_FENCE to allow it to be compiled out for safety builds. Bug 200538092 Change-Id: If8a44a4d4aa03adbe5734db3e99c2e8cc27d7a37 Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2174907 Reviewed-by: Deepak Nibade <dnibade@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
b10547792b
commit
bac6070509
@@ -53,6 +53,7 @@ ccflags-y += -DCONFIG_NVGPU_COMMON_NON_FUSA
|
||||
ccflags-y += -DCONFIG_NVGPU_INJECT_HWERR
|
||||
ccflags-y += -DCONFIG_NVGPU_GR_FALCON_NON_SECURE_BOOT
|
||||
ccflags-y += -DCONFIG_NVGPU_SW_SEMAPHORE
|
||||
ccflags-y += -DCONFIG_NVGPU_FENCE
|
||||
|
||||
ifeq ($(CONFIG_NVGPU_LOGGING),y)
|
||||
ccflags-y += -DCONFIG_NVGPU_LOGGING=1
|
||||
|
||||
@@ -79,6 +79,7 @@ NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_KERNEL_MODE_SUBMIT
|
||||
|
||||
# Enable fences for safety build till until we switch to user mode submits only
|
||||
CONFIG_NVGPU_FENCE := 1
|
||||
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_FENCE
|
||||
|
||||
# Enable Channel/TSG Scheduling for safety build until devctl whitelisting is done
|
||||
CONFIG_NVGPU_CHANNEL_TSG_SCHEDULING := 1
|
||||
|
||||
@@ -89,7 +89,6 @@ srcs += common/utils/assert.c \
|
||||
common/mm/allocators/nvgpu_allocator.c \
|
||||
common/mm/allocators/bitmap_allocator.c \
|
||||
common/mm/allocators/buddy_allocator.c \
|
||||
common/mm/allocators/lockless_allocator.c \
|
||||
common/mm/gmmu/page_table.c \
|
||||
common/mm/gmmu/pd_cache.c \
|
||||
common/mm/as.c \
|
||||
@@ -397,7 +396,8 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NVGPU_FENCE),1)
|
||||
srcs += common/fence/fence.c
|
||||
srcs += common/fence/fence.c \
|
||||
common/mm/allocators/lockless_allocator.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NVGPU_FECS_TRACE),1)
|
||||
|
||||
@@ -259,6 +259,7 @@ int nvgpu_allocator_init(struct gk20a *g, struct nvgpu_allocator *na,
|
||||
u64 base, u64 length, u64 blk_size, u64 max_order,
|
||||
u64 flags, enum nvgpu_allocator_type alloc_type);
|
||||
|
||||
#ifdef CONFIG_NVGPU_FENCE
|
||||
/*
|
||||
* Lockless allocatior initializers.
|
||||
* Note: This allocator can only allocate fixed-size structures of a
|
||||
@@ -267,6 +268,7 @@ int nvgpu_allocator_init(struct gk20a *g, struct nvgpu_allocator *na,
|
||||
int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *na,
|
||||
const char *name, u64 base, u64 length,
|
||||
u64 blk_size, u64 flags);
|
||||
#endif
|
||||
|
||||
#define GPU_BALLOC_MAX_ORDER 63U
|
||||
|
||||
|
||||
Reference in New Issue
Block a user