Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ia64: split off early_ioremap() declarations into asm/early_ioremap.h

Unlike x86, arm64 and ARM, ia64 does not declare its implementations
of early_ioremap/early_iounmap/early_memremap/early_memunmap in a header
file called <asm/early_ioremap.h>

This complicates the use of these functions in generic code, since the
header cannot be included directly, and we have to rely on transitive
includes, which is fragile.

So create a <asm/early_ioremap.h> for ia64, and move the existing
definitions into it.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>

authored by

Ard Biesheuvel and committed by
Tony Luck
80926770 67990608

+11 -4
+10
arch/ia64/include/asm/early_ioremap.h
··· 1 + #ifndef _ASM_IA64_EARLY_IOREMAP_H 2 + #define _ASM_IA64_EARLY_IOREMAP_H 3 + 4 + extern void __iomem * early_ioremap (unsigned long phys_addr, unsigned long size); 5 + #define early_memremap(phys_addr, size) early_ioremap(phys_addr, size) 6 + 7 + extern void early_iounmap (volatile void __iomem *addr, unsigned long size); 8 + #define early_memunmap(addr, size) early_iounmap(addr, size) 9 + 10 + #endif
+1 -4
arch/ia64/include/asm/io.h
··· 20 20 */ 21 21 22 22 #include <asm/unaligned.h> 23 + #include <asm/early_ioremap.h> 23 24 24 25 /* We don't use IO slowdowns on the ia64, but.. */ 25 26 #define __SLOW_DOWN_IO do { } while (0) ··· 428 427 extern void __iomem * ioremap(unsigned long offset, unsigned long size); 429 428 extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size); 430 429 extern void iounmap (volatile void __iomem *addr); 431 - extern void __iomem * early_ioremap (unsigned long phys_addr, unsigned long size); 432 - #define early_memremap(phys_addr, size) early_ioremap(phys_addr, size) 433 - extern void early_iounmap (volatile void __iomem *addr, unsigned long size); 434 - #define early_memunmap(addr, size) early_iounmap(addr, size) 435 430 static inline void __iomem * ioremap_cache (unsigned long phys_addr, unsigned long size) 436 431 { 437 432 return ioremap(phys_addr, size);