Add and use a generic copy_oldmem_page()

From: Palmer Dabbelt
Date: Sat Jul 11 2020 - 00:01:33 EST


While adding support for kexec, Nick recently copied the arm64
copy_oldmem_page() into the RISC-V port. Since this is shared verbatim with
arm and arm64 already, I'd like to add a generic version and so we can use it
instead. I haven't converted over the MIPS, PPC, or SH ports: while I think we
could figure out how to share a version, they're not exactly the same right
now. S/390 and x86 are definitely meaningfully different.

Unless there are any objections I'll include the first patch along with the
RISC-V kexec support, which I'm hoping to have for 5.9. The code, based on
5.8-rc4, is at
ssh://git@xxxxxxxxxxxxxxxxxxx/pub/scm/linux/kernel/git/palmer/linux.git -b
copy_oldmem_page .