diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/buddy_allocator.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/buddy_allocator.c b/drivers/gpu/nvgpu/common/mm/buddy_allocator.c index 3e305bb8..a2e6c44a 100644 --- a/drivers/gpu/nvgpu/common/mm/buddy_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/buddy_allocator.c | |||
@@ -785,8 +785,6 @@ static u64 nvgpu_buddy_balloc(struct nvgpu_allocator *__a, u64 len) | |||
785 | int pte_size; | 785 | int pte_size; |
786 | struct nvgpu_buddy_allocator *a = __a->priv; | 786 | struct nvgpu_buddy_allocator *a = __a->priv; |
787 | 787 | ||
788 | nvgpu_alloc_trace_func(); | ||
789 | |||
790 | alloc_lock(__a); | 788 | alloc_lock(__a); |
791 | 789 | ||
792 | order = balloc_get_order(a, len); | 790 | order = balloc_get_order(a, len); |
@@ -794,7 +792,6 @@ static u64 nvgpu_buddy_balloc(struct nvgpu_allocator *__a, u64 len) | |||
794 | if (order > a->max_order) { | 792 | if (order > a->max_order) { |
795 | alloc_unlock(__a); | 793 | alloc_unlock(__a); |
796 | alloc_dbg(balloc_owner(a), "Alloc fail\n"); | 794 | alloc_dbg(balloc_owner(a), "Alloc fail\n"); |
797 | nvgpu_alloc_trace_func_done(); | ||
798 | return 0; | 795 | return 0; |
799 | } | 796 | } |
800 | 797 | ||
@@ -822,7 +819,6 @@ static u64 nvgpu_buddy_balloc(struct nvgpu_allocator *__a, u64 len) | |||
822 | 819 | ||
823 | alloc_unlock(__a); | 820 | alloc_unlock(__a); |
824 | 821 | ||
825 | nvgpu_alloc_trace_func_done(); | ||
826 | return addr; | 822 | return addr; |
827 | } | 823 | } |
828 | 824 | ||
@@ -838,8 +834,6 @@ static u64 __nvgpu_balloc_fixed_buddy(struct nvgpu_allocator *__a, | |||
838 | struct nvgpu_fixed_alloc *falloc = NULL; | 834 | struct nvgpu_fixed_alloc *falloc = NULL; |
839 | struct nvgpu_buddy_allocator *a = __a->priv; | 835 | struct nvgpu_buddy_allocator *a = __a->priv; |
840 | 836 | ||
841 | nvgpu_alloc_trace_func(); | ||
842 | |||
843 | /* If base isn't aligned to an order 0 block, fail. */ | 837 | /* If base isn't aligned to an order 0 block, fail. */ |
844 | if (base & (a->blk_size - 1)) | 838 | if (base & (a->blk_size - 1)) |
845 | goto fail; | 839 | goto fail; |
@@ -890,14 +884,12 @@ static u64 __nvgpu_balloc_fixed_buddy(struct nvgpu_allocator *__a, | |||
890 | 884 | ||
891 | alloc_dbg(balloc_owner(a), "Alloc (fixed) 0x%llx\n", base); | 885 | alloc_dbg(balloc_owner(a), "Alloc (fixed) 0x%llx\n", base); |
892 | 886 | ||
893 | nvgpu_alloc_trace_func_done(); | ||
894 | return base; | 887 | return base; |
895 | 888 | ||
896 | fail_unlock: | 889 | fail_unlock: |
897 | alloc_unlock(__a); | 890 | alloc_unlock(__a); |
898 | fail: | 891 | fail: |
899 | nvgpu_kfree(nvgpu_alloc_to_gpu(__a), falloc); | 892 | nvgpu_kfree(nvgpu_alloc_to_gpu(__a), falloc); |
900 | nvgpu_alloc_trace_func_done(); | ||
901 | return 0; | 893 | return 0; |
902 | } | 894 | } |
903 | 895 | ||
@@ -932,12 +924,8 @@ static void nvgpu_buddy_bfree(struct nvgpu_allocator *__a, u64 addr) | |||
932 | struct nvgpu_fixed_alloc *falloc; | 924 | struct nvgpu_fixed_alloc *falloc; |
933 | struct nvgpu_buddy_allocator *a = __a->priv; | 925 | struct nvgpu_buddy_allocator *a = __a->priv; |
934 | 926 | ||
935 | nvgpu_alloc_trace_func(); | 927 | if (!addr) |
936 | |||
937 | if (!addr) { | ||
938 | nvgpu_alloc_trace_func_done(); | ||
939 | return; | 928 | return; |
940 | } | ||
941 | 929 | ||
942 | alloc_lock(__a); | 930 | alloc_lock(__a); |
943 | 931 | ||
@@ -966,7 +954,6 @@ static void nvgpu_buddy_bfree(struct nvgpu_allocator *__a, u64 addr) | |||
966 | done: | 954 | done: |
967 | alloc_unlock(__a); | 955 | alloc_unlock(__a); |
968 | alloc_dbg(balloc_owner(a), "Free 0x%llx\n", addr); | 956 | alloc_dbg(balloc_owner(a), "Free 0x%llx\n", addr); |
969 | nvgpu_alloc_trace_func_done(); | ||
970 | return; | 957 | return; |
971 | } | 958 | } |
972 | 959 | ||