powerpc/mm: Fix mapped range information print during boot
Michael Ellerman
patch-notifications at ellerman.id.au
Thu Aug 31 21:35:53 AEST 2017
On Wed, 2017-05-03 at 09:32:35 UTC, Michael Ellerman wrote:
> diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c
> index c28165d8970b..519cfef569d1 100644
> --- a/arch/powerpc/mm/pgtable-radix.c
> +++ b/arch/powerpc/mm/pgtable-radix.c
> @@ -8,9 +8,14 @@
> * as published by the Free Software Foundation; either version
> * 2 of the License, or (at your option) any later version.
> */
> +
> +#define pr_fmt(fmt) "radix-mmu: " fmt
> +
> +#include <linux/kernel.h>
> #include <linux/sched/mm.h>
> #include <linux/memblock.h>
> #include <linux/of_fdt.h>
> +#include <linux/string_helpers.h>
>
> #include <asm/pgtable.h>
> #include <asm/pgalloc.h>
> @@ -112,10 +117,14 @@ static inline void __meminit print_mapping(unsigned long start,
> unsigned long end,
> unsigned long size)
> {
> + char buf[10];
> +
> if (end <= start)
> return;
>
> - pr_info("Mapped range 0x%lx - 0x%lx with 0x%lx\n", start, end, size);
> + string_get_size(size, 1, STRING_UNITS_2, buf, sizeof(buf));
> +
> + pr_info("Mapped 0x%016lx-0x%016lx with %s pages\n", start, end, buf);
> }
>
> static int __meminit create_physical_mapping(unsigned long start,
Applied to powerpc next.
https://git.kernel.org/powerpc/c/6deb6b474bda4d2d3fbee066f20561
cheers
More information about the Linuxppc-dev
mailing list