diff options
author | Alex Waterman <alexw@nvidia.com> | 2015-04-28 17:07:09 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2015-05-11 11:51:38 -0400 |
commit | e206fdecb3e380adced41dd432779c848d18caa0 (patch) | |
tree | b236e1362e259212eddf0bd79d7267a40468c08f /drivers/gpu | |
parent | 4d405809a9d97efeadd7c33bce4ecf0470c386f2 (diff) |
gpu: nvgpu: Fix off-by-one error in PDE calculations
The number of entries in the next level PDE data structure was one
half of what was needed since the bit shift was 1 bit too small.
Change-Id: Id4981f230dd206ae94336cddab117312e143e6a1
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/740727
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 30bfd5a2..7d359ff4 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -2134,7 +2134,7 @@ static int update_gmmu_level_locked(struct vm_gk20a *vm, | |||
2134 | int num_entries = | 2134 | int num_entries = |
2135 | 1 << | 2135 | 1 << |
2136 | (l->hi_bit[pgsz_idx] | 2136 | (l->hi_bit[pgsz_idx] |
2137 | - l->lo_bit[pgsz_idx]); | 2137 | - l->lo_bit[pgsz_idx] + 1); |
2138 | pte->entries = | 2138 | pte->entries = |
2139 | kzalloc(sizeof(struct gk20a_mm_entry) * | 2139 | kzalloc(sizeof(struct gk20a_mm_entry) * |
2140 | num_entries, GFP_KERNEL); | 2140 | num_entries, GFP_KERNEL); |