Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329508
b: refs/heads/master
c: 259a290
h: refs/heads/master
v: v3
  • Loading branch information
Akinobu Mita authored and Dave Airlie committed Oct 1, 2012
1 parent 7431645 commit d14a53e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27796b465d25bc48f785c235be33cdc334a624e6
refs/heads/master: 259a290e78d639bd02d0e408ceb72967318abb13
16 changes: 2 additions & 14 deletions trunk/drivers/gpu/drm/ttm/ttm_tt.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,6 @@ int ttm_tt_swapin(struct ttm_tt *ttm)
struct file *swap_storage;
struct page *from_page;
struct page *to_page;
void *from_virtual;
void *to_virtual;
int i;
int ret = -ENOMEM;

Expand All @@ -311,11 +309,7 @@ int ttm_tt_swapin(struct ttm_tt *ttm)
goto out_err;

preempt_disable();
from_virtual = kmap_atomic(from_page);
to_virtual = kmap_atomic(to_page);
memcpy(to_virtual, from_virtual, PAGE_SIZE);
kunmap_atomic(to_virtual);
kunmap_atomic(from_virtual);
copy_highpage(to_page, from_page);
preempt_enable();
page_cache_release(from_page);
}
Expand All @@ -336,8 +330,6 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage)
struct file *swap_storage;
struct page *from_page;
struct page *to_page;
void *from_virtual;
void *to_virtual;
int i;
int ret = -ENOMEM;

Expand Down Expand Up @@ -367,11 +359,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage)
goto out_err;
}
preempt_disable();
from_virtual = kmap_atomic(from_page);
to_virtual = kmap_atomic(to_page);
memcpy(to_virtual, from_virtual, PAGE_SIZE);
kunmap_atomic(to_virtual);
kunmap_atomic(from_virtual);
copy_highpage(to_page, from_page);
preempt_enable();
set_page_dirty(to_page);
mark_page_accessed(to_page);
Expand Down

0 comments on commit d14a53e

Please sign in to comment.