Skip to content

Commit 36975ec

Browse files
Zhang Hengdaniel-thompson
authored andcommitted
kdb: use kmap_local_page()
Use kmap_local_page() instead of kmap_atomic() which has been deprecated. Signed-off-by: Zhang Heng <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Thompson (RISCstar) <[email protected]>
1 parent 9d89551 commit 36975ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/debug/kdb/kdb_support.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ int kdb_putarea_size(unsigned long addr, void *res, size_t size)
305305

306306
/*
307307
* kdb_getphys - Read data from a physical address. Validate the
308-
* address is in range, use kmap_atomic() to get data
308+
* address is in range, use kmap_local_page() to get data
309309
* similar to kdb_getarea() - but for phys addresses
310310
* Inputs:
311311
* res Pointer to the word to receive the result
@@ -324,9 +324,9 @@ static int kdb_getphys(void *res, unsigned long addr, size_t size)
324324
if (!pfn_valid(pfn))
325325
return 1;
326326
page = pfn_to_page(pfn);
327-
vaddr = kmap_atomic(page);
327+
vaddr = kmap_local_page(page);
328328
memcpy(res, vaddr + (addr & (PAGE_SIZE - 1)), size);
329-
kunmap_atomic(vaddr);
329+
kunmap_local(vaddr);
330330

331331
return 0;
332332
}

0 commit comments

Comments
 (0)