1 // SPDX-License-Identifier: GPL-2.0
3 * This code comes from arch/arm64/kernel/crash_dump.c
4 * Created by: AKASHI Takahiro <takahiro.akashi@linaro.org>
5 * Copyright (C) 2017 Linaro Limited
8 #include <linux/crash_dump.h>
10 #include <linux/uio.h>
12 ssize_t
copy_oldmem_page(struct iov_iter
*iter
, unsigned long pfn
,
13 size_t csize
, unsigned long offset
)
20 vaddr
= memremap(__pfn_to_phys(pfn
), PAGE_SIZE
, MEMREMAP_WB
);
24 csize
= copy_to_iter(vaddr
+ offset
, csize
, iter
);