Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jul 2013 16:42:29 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r253709 - head/sys/dev/drm2/i915
Message-ID:  <201307271642.r6RGgTlR049636@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sat Jul 27 16:42:29 2013
New Revision: 253709
URL: http://svnweb.freebsd.org/changeset/base/253709

Log:
  The pmap_qenter() and pmap_qremove() perform TLB invalidation on its
  own, no need to call pmap_invalidate_range() one more time.
  
  Noted by:	alc
  MFC after:	1 week

Modified:
  head/sys/dev/drm2/i915/intel_ringbuffer.c

Modified: head/sys/dev/drm2/i915/intel_ringbuffer.c
==============================================================================
--- head/sys/dev/drm2/i915/intel_ringbuffer.c	Sat Jul 27 16:32:34 2013	(r253708)
+++ head/sys/dev/drm2/i915/intel_ringbuffer.c	Sat Jul 27 16:42:29 2013	(r253709)
@@ -365,8 +365,6 @@ init_pipe_control(struct intel_ring_buff
 	if (pc->cpu_page == NULL)
 		goto err_unpin;
 	pmap_qenter((uintptr_t)pc->cpu_page, &obj->pages[0], 1);
-	pmap_invalidate_range(kernel_pmap, (vm_offset_t)pc->cpu_page,
-	    (vm_offset_t)pc->cpu_page + PAGE_SIZE);
 	pmap_invalidate_cache_range((vm_offset_t)pc->cpu_page,
 	    (vm_offset_t)pc->cpu_page + PAGE_SIZE);
 
@@ -394,8 +392,6 @@ cleanup_pipe_control(struct intel_ring_b
 
 	obj = pc->obj;
 	pmap_qremove((vm_offset_t)pc->cpu_page, 1);
-	pmap_invalidate_range(kernel_pmap, (vm_offset_t)pc->cpu_page,
-	    (vm_offset_t)pc->cpu_page + PAGE_SIZE);
 	kmem_free(kernel_map, (uintptr_t)pc->cpu_page, PAGE_SIZE);
 	i915_gem_object_unpin(obj);
 	drm_gem_object_unreference(&obj->base);
@@ -972,9 +968,6 @@ static void cleanup_status_page(struct i
 		return;
 
 	pmap_qremove((vm_offset_t)ring->status_page.page_addr, 1);
-	pmap_invalidate_range(kernel_pmap,
-	    (vm_offset_t)ring->status_page.page_addr,
-	    (vm_offset_t)ring->status_page.page_addr + PAGE_SIZE);
 	kmem_free(kernel_map, (vm_offset_t)ring->status_page.page_addr,
 	    PAGE_SIZE);
 	i915_gem_object_unpin(obj);
@@ -1014,9 +1007,6 @@ static int init_status_page(struct intel
 	}
 	pmap_qenter((vm_offset_t)ring->status_page.page_addr, &obj->pages[0],
 	    1);
-	pmap_invalidate_range(kernel_pmap,
-	    (vm_offset_t)ring->status_page.page_addr,
-	    (vm_offset_t)ring->status_page.page_addr + PAGE_SIZE);
 	pmap_invalidate_cache_range((vm_offset_t)ring->status_page.page_addr,
 	    (vm_offset_t)ring->status_page.page_addr + PAGE_SIZE);
 	ring->status_page.obj = obj;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307271642.r6RGgTlR049636>