Skip to content

Commit 19b9c0b

Browse files
committed
panfrost: Remove unneeded pmap_zero_page() calls
For a few years now, VM_ALLOC_ZERO means, "please zero the returned pages", so these calls are redundant. Remove them.
1 parent 511363d commit 19b9c0b

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

sys/dev/drm/freebsd/drm_gem_cma_helper.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ drm_gem_cma_alloc_contig(size_t npages, u_long alignment, vm_memattr_t memattr,
105105
}
106106

107107
for (i = 0; i < npages; i++, m++) {
108-
if ((m->flags & PG_ZERO) == 0)
109-
pmap_zero_page(m);
110108
m->valid = VM_PAGE_BITS_ALL;
111109
(*ret_page)[i] = m;
112110
}

sys/dev/drm/panfrost/panfrost_gem.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,6 @@ panfrost_alloc_pages_iommu(struct panfrost_gem_object *bo)
607607

608608
return (ENOMEM);
609609
}
610-
if ((m->flags & PG_ZERO) == 0)
611-
pmap_zero_page(m);
612610
va = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m));
613611
cpu_dcache_wb_range((void *)va, PAGE_SIZE);
614612
m->valid = VM_PAGE_BITS_ALL;
@@ -654,8 +652,6 @@ panfrost_alloc_pages_contig(struct panfrost_gem_object *bo)
654652
return (ENOMEM);
655653
}
656654
for (i = 0; i < bo->npages; i++) {
657-
if ((m->flags & PG_ZERO) == 0)
658-
pmap_zero_page(m);
659655
va = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m));
660656
cpu_dcache_wb_range((void *)va, PAGE_SIZE);
661657
m->valid = VM_PAGE_BITS_ALL;

0 commit comments

Comments
 (0)