linux/include/asm-generic
Mark Salter 6b0f68e32e mm: add utility for early copy from unmapped ram
When booting an arm64 kernel w/initrd using UEFI/grub, use of mem= will
likely cut off part or all of the initrd.  This leaves it outside the
kernel linear map which leads to failure when unpacking.  The x86 code
has a similar need to relocate an initrd outside of mapped memory in
some cases.

The current x86 code uses early_memremap() to copy the original initrd
from unmapped to mapped RAM.  This patchset creates a generic
copy_from_early_mem() utility based on that x86 code and has arm64 and
x86 share it in their respective initrd relocation code.

This patch (of 3):

In some early boot circumstances, it may be necessary to copy from RAM
outside the kernel linear mapping to mapped RAM.  The need to relocate
an initrd is one example in the x86 code.  This patch creates a helper
function based on current x86 code.

Signed-off-by: Mark Salter <msalter@redhat.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-09-08 15:35:28 -07:00
..
bitops
4level-fixup.h
asm-offsets.h asm-generic: Add common asm-offsets.h 2015-06-23 13:35:49 +09:00
atomic-long.h locking, asm-generic: Add _{relaxed|acquire|release}() variants for 'atomic_long_t' 2015-08-12 11:59:01 +02:00
atomic.h atomic: Collapse all atomic_{set,clear}_mask definitions 2015-07-27 14:06:24 +02:00
atomic64.h atomic: Provide atomic_{or,xor,and} 2015-07-27 14:06:24 +02:00
audit_change_attr.h
audit_dir_write.h
audit_read.h
audit_signal.h
audit_write.h
barrier.h locking, arch: use WRITE_ONCE()/READ_ONCE() in smp_store_release()/smp_load_acquire() 2015-08-03 10:59:30 +02:00
bitops.h
bitsperlong.h
bug.h
bugs.h
cache.h
cacheflush.h
checksum.h
clkdev.h
cmpxchg-local.h
cmpxchg.h locking/rtmutex: Drop usage of __HAVE_ARCH_CMPXCHG 2015-05-13 10:51:28 +02:00
cputime.h
cputime_jiffies.h
cputime_nsecs.h
current.h
delay.h
device.h
div64.h
dma-coherent.h
dma-contiguous.h
dma-mapping-broken.h
dma-mapping-common.h asm/dma-mapping-common: Clarify output of dma_map_sg_attrs 2015-03-09 13:05:47 +01:00
dma.h
early_ioremap.h mm: add utility for early copy from unmapped ram 2015-09-08 15:35:28 -07:00
emergency-restart.h
exec.h
fb.h
fixmap.h
ftrace.h
futex.h sched/preempt, futex: Disable preemption in UP futex_atomic_cmpxchg_inatomic() explicitly 2015-05-19 08:39:16 +02:00
getorder.h
gpio.h gpio: remove gpiod_sysfs_set_active_low 2015-05-12 10:46:53 +02:00
hardirq.h
hugetlb.h
hw_irq.h
ide_iops.h
int-ll64.h
io-64-nonatomic-hi-lo.h
io-64-nonatomic-lo-hi.h
io.h x86/mm, asm-generic: Add IOMMU ioremap_uc() variant default 2015-07-21 10:47:03 +02:00
ioctl.h
iomap.h x86/mm, asm-generic: Add ioremap_wt() for creating Write-Through mappings 2015-06-07 15:28:56 +02:00
irq.h
irq_regs.h
irq_work.h
irqflags.h
Kbuild.asm
kdebug.h
kmap_types.h
kvm_para.h
libata-portmap.h
linkage.h
local.h
local64.h
mcs_spinlock.h
memory_model.h
mm-arch-hooks.h mm: clean up per architecture MM hook header files 2015-07-17 16:39:53 -07:00
mm_hooks.h
mmu.h
mmu_context.h
module.h
msi.h
mutex-dec.h
mutex-null.h
mutex-xchg.h
mutex.h
page.h
param.h
parport.h
pci-bridge.h
pci-dma-compat.h
pci.h PCI: Remove unused pcibios_select_root() (again) 2015-06-08 07:56:21 -05:00
pci_iomap.h PCI: Add pci_iomap_wc() variants 2015-08-25 09:59:45 +02:00
percpu.h
pgalloc.h
pgtable-nopmd.h
pgtable-nopud.h
pgtable.h mm: clarify that the function operates on hugepage pte 2015-06-24 17:49:44 -07:00
preempt.h sched/preempt: Fix cond_resched_lock() and cond_resched_softirq() 2015-08-03 12:21:24 +02:00
ptrace.h
qrwlock.h locking/qrwlock: Make use of _{acquire|release|relaxed}() atomics 2015-08-12 11:59:06 +02:00
qrwlock_types.h
qspinlock.h locking/qspinlock: Revert to test-and-set on hypervisors 2015-05-08 12:36:58 +02:00
qspinlock_types.h locking/qspinlock: Optimize for smaller NR_CPUS 2015-05-08 12:36:48 +02:00
resource.h
rtc.h
rwsem.h
seccomp.h seccomp: allow COMPAT sigreturn overrides 2015-04-17 09:04:09 -04:00
sections.h
segment.h
serial.h
siginfo.h
signal.h
simd.h
sizes.h
spinlock.h
statfs.h
string.h
switch_to.h
syscall.h
syscalls.h
termios-base.h
termios.h
timex.h
tlb.h
tlbflush.h
topology.h
trace_clock.h
uaccess-unaligned.h
uaccess.h
unaligned.h
unistd.h
user.h
vga.h
vmlinux.lds.h TTY/Serial patches for 4.1-rc1 2015-04-21 09:33:10 -07:00
vtime.h
word-at-a-time.h
xor.h