1 // SPDX-License-Identifier: GPL-2.0
3 * crash_dump.c - Memory preserving reboot related code.
5 * Created by: Hariprasad Nellitheertha (hari@in.ibm.com)
6 * Copyright (C) IBM Corporation, 2004. All rights reserved
8 #include <linux/errno.h>
9 #include <linux/crash_dump.h>
11 #include <linux/uio.h>
12 #include <linux/uaccess.h>
14 ssize_t
copy_oldmem_page(struct iov_iter
*iter
, unsigned long pfn
,
15 size_t csize
, unsigned long offset
)
22 vaddr
= ioremap(pfn
<< PAGE_SHIFT
, PAGE_SIZE
);
23 csize
= copy_to_iter(vaddr
+ offset
, csize
, iter
);