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>
This commit is contained in:

committed by
Dave Airlie

parent
5952fba501
commit
99c09e745d
@@ -234,14 +234,18 @@ int drm_vma_info(struct seq_file *m, void *data)
|
||||
struct drm_device *dev = node->minor->dev;
|
||||
struct drm_vma_entry *pt;
|
||||
struct vm_area_struct *vma;
|
||||
unsigned long vma_count = 0;
|
||||
#if defined(__i386__)
|
||||
unsigned int pgprot;
|
||||
#endif
|
||||
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
seq_printf(m, "vma use count: %d, high_memory = %pK, 0x%pK\n",
|
||||
atomic_read(&dev->vma_count),
|
||||
high_memory, (void *)(unsigned long)virt_to_phys(high_memory));
|
||||
list_for_each_entry(pt, &dev->vmalist, head)
|
||||
vma_count++;
|
||||
|
||||
seq_printf(m, "vma use count: %lu, high_memory = %pK, 0x%pK\n",
|
||||
vma_count, high_memory,
|
||||
(void *)(unsigned long)virt_to_phys(high_memory));
|
||||
|
||||
list_for_each_entry(pt, &dev->vmalist, head) {
|
||||
vma = pt->vma;
|
||||
|
Reference in New Issue
Block a user