* + gpu-drm-ttm-use-copy_highpage.patch added to -mm tree
@ 2012-09-25 19:33 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2012-09-25 19:33 UTC (permalink / raw)
To: mm-commits; +Cc: akinobu.mita, airlied
The patch titled
Subject: gpu/drm/ttm: use copy_highpage
has been added to the -mm tree. Its filename is
gpu-drm-ttm-use-copy_highpage.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Akinobu Mita <akinobu.mita@gmail.com>
Subject: gpu/drm/ttm: use copy_highpage
Use copy_highpage() to copy from one page to another.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/gpu/drm/ttm/ttm_tt.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff -puN drivers/gpu/drm/ttm/ttm_tt.c~gpu-drm-ttm-use-copy_highpage drivers/gpu/drm/ttm/ttm_tt.c
--- a/drivers/gpu/drm/ttm/ttm_tt.c~gpu-drm-ttm-use-copy_highpage
+++ a/drivers/gpu/drm/ttm/ttm_tt.c
@@ -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;
@@ -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);
}
@@ -336,8 +330,6 @@ int ttm_tt_swapout(struct ttm_tt *ttm, s
struct file *swap_storage;
struct page *from_page;
struct page *to_page;
- void *from_virtual;
- void *to_virtual;
int i;
int ret = -ENOMEM;
@@ -367,11 +359,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, s
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);
_
Patches currently in -mm which might be from akinobu.mita@gmail.com are
linux-next.patch
gpu-drm-ttm-use-copy_highpage.patch
cciss-cleanup-bitops-usage.patch
cciss-use-check_signature.patch
drbd-use-copy_highpage.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-09-25 19:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-25 19:33 + gpu-drm-ttm-use-copy_highpage.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).