diff options
Diffstat (limited to 'meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1319-drm-amdkfd-Allocate-gtt_sa_bitmap-in-long-units.patch')
-rw-r--r-- | meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1319-drm-amdkfd-Allocate-gtt_sa_bitmap-in-long-units.patch | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1319-drm-amdkfd-Allocate-gtt_sa_bitmap-in-long-units.patch b/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1319-drm-amdkfd-Allocate-gtt_sa_bitmap-in-long-units.patch deleted file mode 100644 index acd2be30..00000000 --- a/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1319-drm-amdkfd-Allocate-gtt_sa_bitmap-in-long-units.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 5f4cbf831d328417adb7580067b33a340d74a42b Mon Sep 17 00:00:00 2001 -From: Felix Kuehling <Felix.Kuehling@amd.com> -Date: Sat, 29 Jul 2017 04:46:48 -0400 -Subject: [PATCH 1319/4131] drm/amdkfd: Allocate gtt_sa_bitmap in long units - -gtt_sa_bitmap is accessed by bitmap functions, which operate on longs. -Therefore the array should be allocated in long units. Also round up -in case the number of bits is not a multiple of BITS_PER_LONG. - -Change-Id: I023409ace88bee694a0b5d59df1b6b06ef85c5ef -Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> ---- - drivers/gpu/drm/amd/amdkfd/kfd_device.c | 11 ++++------- - 1 file changed, 4 insertions(+), 7 deletions(-) - -diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c -index d28a8ee..da05b68 100644 ---- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c -+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c -@@ -1072,18 +1072,15 @@ void kfd_evict_bo_worker(struct work_struct *work) - static int kfd_gtt_sa_init(struct kfd_dev *kfd, unsigned int buf_size, - unsigned int chunk_size) - { -- unsigned int num_of_bits; -+ unsigned int num_of_longs; - - kfd->gtt_sa_chunk_size = chunk_size; - kfd->gtt_sa_num_of_chunks = buf_size / chunk_size; - -- num_of_bits = kfd->gtt_sa_num_of_chunks / BITS_PER_BYTE; -- if (num_of_bits == 0) { -- pr_err("Number of bits is 0 in %s", __func__); -- return -EINVAL; -- } -+ num_of_longs = (kfd->gtt_sa_num_of_chunks + BITS_PER_LONG - 1) / -+ BITS_PER_LONG; - -- kfd->gtt_sa_bitmap = kzalloc(num_of_bits, GFP_KERNEL); -+ kfd->gtt_sa_bitmap = kcalloc(num_of_longs, sizeof(long), GFP_KERNEL); - - if (!kfd->gtt_sa_bitmap) - return -ENOMEM; --- -2.7.4 - |