diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-12-11 05:35:10 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-12-17 20:43:29 -0500 |
commit | 99c09e745d078b630dbb3ea2895eaa597f1cebc4 (patch) | |
tree | 2d6ad24830e2e55a042c6fe52e70ff72e1fea74f /drivers/gpu/drm/drm_info.c | |
parent | 5952fba501b928f214f64a7a9c461ae2cd5c3f45 (diff) |
drm: remove dev->vma_count
This is just used for a debugfs file, and we can easily reconstruct
this number by just walking the list twice. Which isn't really bad for
a debugfs file anyway.
So let's rip this out.
There's the other issue that the dev->vmalist itself is a bit useless,
since that can be reconstructed with all the memory mapping
information from proc. But remove that is a different topic entirely.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_info.c')
-rw-r--r-- | drivers/gpu/drm/drm_info.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c index 31da45c582fc..7473035dd28b 100644 --- a/drivers/gpu/drm/drm_info.c +++ b/drivers/gpu/drm/drm_info.c | |||
@@ -234,14 +234,18 @@ int drm_vma_info(struct seq_file *m, void *data) | |||
234 | struct drm_device *dev = node->minor->dev; | 234 | struct drm_device *dev = node->minor->dev; |
235 | struct drm_vma_entry *pt; | 235 | struct drm_vma_entry *pt; |
236 | struct vm_area_struct *vma; | 236 | struct vm_area_struct *vma; |
237 | unsigned long vma_count = 0; | ||
237 | #if defined(__i386__) | 238 | #if defined(__i386__) |
238 | unsigned int pgprot; | 239 | unsigned int pgprot; |
239 | #endif | 240 | #endif |
240 | 241 | ||
241 | mutex_lock(&dev->struct_mutex); | 242 | mutex_lock(&dev->struct_mutex); |
242 | seq_printf(m, "vma use count: %d, high_memory = %pK, 0x%pK\n", | 243 | list_for_each_entry(pt, &dev->vmalist, head) |
243 | atomic_read(&dev->vma_count), | 244 | vma_count++; |
244 | high_memory, (void *)(unsigned long)virt_to_phys(high_memory)); | 245 | |
246 | seq_printf(m, "vma use count: %lu, high_memory = %pK, 0x%pK\n", | ||
247 | vma_count, high_memory, | ||
248 | (void *)(unsigned long)virt_to_phys(high_memory)); | ||
245 | 249 | ||
246 | list_for_each_entry(pt, &dev->vmalist, head) { | 250 | list_for_each_entry(pt, &dev->vmalist, head) { |
247 | vma = pt->vma; | 251 | vma = pt->vma; |