mm: create generic early_ioremap() support

This patch creates a generic implementation of early_ioremap() support
based on the existing x86 implementation.  early_ioremp() is useful for
early boot code which needs to temporarily map I/O or memory regions
before normal mapping functions such as ioremap() are available.

Some architectures have optional MMU.  In the no-MMU case, the remap
functions simply return the passed in physical address and the unmap
functions do nothing.

Signed-off-by: Mark Salter <>
Acked-by: Catalin Marinas <>
Acked-by: H. Peter Anvin <>
Cc: Borislav Petkov <>
Cc: Dave Young <>
Cc: Will Deacon <>
Cc: Ingo Molnar <>
Cc: Thomas Gleixner <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
4 files changed