gpu: nvgpu: Move code to utils unit

The utils unit contains utilities that are useful to everyone. Things
like rbtree, enabled, string, etc go here. This helps prevent clutter
in the top level common directory. Also by organizing source code into
these top level units we reduce our SWUD burden: all utility code may
be described by one SWUD instead of many tiny SWUDs.

JIRA NVGPU-3544

Change-Id: Idc6169f375ba87b8a5d325712bf09aee8f27fb96
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2127479
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Alex Waterman
2019-05-29 14:37:11 -07:00
committed by mobile promotions
parent 7a35ee6aaa
commit 9e3f0b22e9
8 changed files with 17 additions and 40 deletions

View File

@@ -61,14 +61,6 @@ ecc:
include/nvgpu/ecc.h ]
deps:
enabled:
safe: yes
owner: Alex W
sources: [ common/enabled.c,
include/nvgpu/enabled.h ]
deps:
tags: unit-testable
# Pretty sure this can be marked as not-safe since we plan to use
# usermode submits in the safety build.
fence:
@@ -159,12 +151,6 @@ ptimer:
include/nvgpu/ptimer.h ]
deps:
rbtree:
safe: yes
owner: Deepak N
sources: [ common/rbtree.c ]
deps:
semaphore:
safe: no
owner: Alex W
@@ -194,12 +180,6 @@ sim:
include/nvgpu/hw_sim_pci.h,
include/nvgpu/sim.h ]
string:
safe: yes
owner: Terje B
sources: [ common/string.c ]
deps:
unit:
safe: yes
owner: Terje B
@@ -208,12 +188,14 @@ unit:
utils:
safe: yes
owner: Terje B
sources: [ include/nvgpu/utils.h ]
worker:
safe: yes
sources: [ common/worker.c,
include/nvgpu/worker.h ]
sources: [ include/nvgpu/utils.h,
include/nvgpu/worker.h,
include/nvgpu/rbtree.h,
include/nvgpu/enabled.h,
common/utils/string.c,
common/utils/worker.c,
common/utils/rbtree.c,
common/utils/enabled.c ]
##
## Common elements.

View File

@@ -82,11 +82,6 @@ log2:
safe: yes
sources: [ include/nvgpu/log2.h ]
rbtree:
safe: yes
sources: [ include/nvgpu/rbtree.h ]
tags: unit-testable
rwsem:
safe: yes
sources: [ include/nvgpu/rwsem.h ]

View File

@@ -38,12 +38,15 @@ obj-$(CONFIG_GK20A) := nvgpu.o
# is in progress.
nvgpu-y += \
common/utils/enabled.o \
common/utils/rbtree.o \
common/utils/string.o \
common/utils/worker.o \
common/ptimer/ptimer.o \
common/perf/perfbuf.o \
common/xve/xve_gp106.o \
common/therm/therm.o \
common/mc/mc.o \
common/worker.o \
common/sync/channel_sync.o \
common/sync/channel_sync_semaphore.o \
common/semaphore/semaphore_sea.o \
@@ -520,10 +523,7 @@ nvgpu-y += \
common/mm/comptags.o \
common/mm/mm.o \
common/mm/dma.o \
common/enabled.o \
common/string.o \
common/pramin.o \
common/rbtree.o \
common/vbios/bios.o \
common/vbios/nvlink_bios.o \
common/vbios/bios_sw_gv100.o \

View File

@@ -62,7 +62,11 @@ srcs += os/posix/bug.c \
os/posix/bitmap.c \
os/posix/kmem.c
srcs += common/sim/sim.c \
srcs += common/utils/enabled.c \
common/utils/rbtree.c \
common/utils/string.c \
common/utils/worker.c \
common/sim/sim.c \
common/sim/sim_pci.c \
common/sim/sim_netlist.c \
common/init/nvgpu_init.c \
@@ -85,10 +89,7 @@ srcs += common/sim/sim.c \
common/xve/xve_gp106.c \
common/therm/therm.c \
common/perf/perfbuf.c \
common/enabled.c \
common/pramin.c \
common/string.c \
common/rbtree.c \
common/ltc/ltc.c \
common/cbc/cbc.c \
common/fbp/fbp.c \
@@ -123,7 +124,6 @@ srcs += common/sim/sim.c \
common/acr/acr_bootstrap.c \
common/acr/acr_sw_gv11b.c \
common/ptimer/ptimer.c \
common/worker.c \
common/sync/channel_sync.c \
common/sync/channel_sync_syncpt.c \
common/sync/channel_sync_semaphore.c \