]> git.baikalelectronics.ru Git - kernel.git/commitdiff
xen: Convert kmap() to kmap_local_page()
authorAlaa Mohamed <eng.alaamohamedsoliman.am@gmail.com>
Tue, 19 Apr 2022 23:43:28 +0000 (01:43 +0200)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Wed, 20 Apr 2022 20:22:18 +0000 (15:22 -0500)
kmap() is being deprecated and these usages are all local to the thread
so there is no reason kmap_local_page() can't be used.

Replace kmap() calls with kmap_local_page().

Signed-off-by: Alaa Mohamed <eng.alaamohamedsoliman.am@gmail.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20220419234328.10346-1-eng.alaamohamedsoliman.am@gmail.com
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
drivers/xen/gntalloc.c

index 4849f94372a45d6d5667e8dd3cef912d6ff44542..55acb32842a3a7296176c85113850124f7c9d97b 100644 (file)
@@ -178,9 +178,9 @@ static void __del_gref(struct gntalloc_gref *gref)
        unsigned long addr;
 
        if (gref->notify.flags & UNMAP_NOTIFY_CLEAR_BYTE) {
-               uint8_t *tmp = kmap(gref->page);
+               uint8_t *tmp = kmap_local_page(gref->page);
                tmp[gref->notify.pgoff] = 0;
-               kunmap(gref->page);
+               kunmap_local(tmp);
        }
        if (gref->notify.flags & UNMAP_NOTIFY_SEND_EVENT) {
                notify_remote_via_evtchn(gref->notify.event);