Commit 55aa914e authored by Akinobu Mita's avatar Akinobu Mita Committed by Dave Airlie

drm/ttm: remove unneeded preempt_disable/enable

It is unnecessary to disable preemption explicitly while calling
copy_highpage().  Because copy_highpage() will do it again through
kmap_atomic/kunmap_atomic.
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Reviewed-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent ac207ed2
...@@ -308,9 +308,7 @@ int ttm_tt_swapin(struct ttm_tt *ttm) ...@@ -308,9 +308,7 @@ int ttm_tt_swapin(struct ttm_tt *ttm)
if (unlikely(to_page == NULL)) if (unlikely(to_page == NULL))
goto out_err; goto out_err;
preempt_disable();
copy_highpage(to_page, from_page); copy_highpage(to_page, from_page);
preempt_enable();
page_cache_release(from_page); page_cache_release(from_page);
} }
...@@ -358,9 +356,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage) ...@@ -358,9 +356,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage)
ret = PTR_ERR(to_page); ret = PTR_ERR(to_page);
goto out_err; goto out_err;
} }
preempt_disable();
copy_highpage(to_page, from_page); copy_highpage(to_page, from_page);
preempt_enable();
set_page_dirty(to_page); set_page_dirty(to_page);
mark_page_accessed(to_page); mark_page_accessed(to_page);
page_cache_release(to_page); page_cache_release(to_page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment