[PATCH 2/2] arm: add early_ioremap support
Russell King - ARM Linux
linux at arm.linux.org.uk
Wed Jul 9 02:49:26 PDT 2014
On Wed, Jul 09, 2014 at 10:39:52AM +0100, Leif Lindholm wrote:
> +config EARLY_IOREMAP
> + depends on MMU
> + bool "Provide early_ioremap() support for kernel initialization."
> + select GENERIC_EARLY_IOREMAP
Nit: please order as bool, then depends, then select.
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index 8a16ee5..aa2621a 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -36,6 +36,7 @@
> #include <asm/cpu.h>
> #include <asm/cputype.h>
> #include <asm/elf.h>
> +#include <asm/io.h>
Please always use linux/io.h in preference to asm/io.h.
> +static inline pmd_t * __init early_ioremap_pmd(unsigned long addr)
> +{
> + unsigned int index = pgd_index(addr);
> + pgd_t *pgd = cpu_get_pgd() + index;
What is the reasoning for using cpu_get_pgd() ? Is there some specific
reason you want to read from the hardware register rather than using
the pgd_offset_k() macro here?
> +void __init
> +early_ioremap_shutdown(void)
Nit: should be a single line.
The rest of the patch looks fine, thanks.
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
More information about the linux-arm-kernel
mailing list