diff options
author | Felix Kuehling <Felix.Kuehling@amd.com> | 2017-08-24 19:22:32 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 14:53:19 -0400 |
commit | 5d86b2c391965cbcb295e8fa795276977b2a416e (patch) | |
tree | 96be27e6b37d06394065da328377c6626e374c6c /drivers/gpu/drm/amd/lib/Makefile | |
parent | 00ecd8a27c03b6dd463ab8755dd6d58751d76297 (diff) | |
download | linux-5d86b2c391965cbcb295e8fa795276977b2a416e.tar.gz |
drm/amd: Closed hash table with low overhead (v2)
This adds a statically sized closed hash table implementation with
low memory and CPU overhead. The API is inspired by kfifo.
Storing, retrieving and deleting data does not involve any dynamic
memory management, which makes it ideal for use in interrupt context.
Static memory usage per entry comprises a 32 or 64 bit hash key, two
bits for occupancy tracking and the value size stored in the table.
No list heads or pointers are needed. Therefore this data structure
should be quite cache-friendly, too.
It uses linear probing and lazy deletion. During lookups free space
is reclaimed and entries relocated to speed up future lookups.
v2: squash in do_div and _BITOPS_LONG_SHIFT fixes
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/lib/Makefile')
-rw-r--r-- | drivers/gpu/drm/amd/lib/Makefile | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/lib/Makefile b/drivers/gpu/drm/amd/lib/Makefile new file mode 100644 index 000000000000..87cd7009e80f --- /dev/null +++ b/drivers/gpu/drm/amd/lib/Makefile @@ -0,0 +1,11 @@ +# +# Makefile for AMD library routines, which are used by AMD driver +# components. +# +# This is for common library routines that can be shared between AMD +# driver components or later moved to kernel/lib for sharing with +# other drivers. + +ccflags-y := -I$(src)/../include + +obj-$(CONFIG_CHASH) += chash.o |