[PATCH v34 04/14] arm64: kdump: reserve memory for crash dump kernel

David Woodhouse dwmw2 at infradead.org
Mon Apr 3 01:18:12 PDT 2017


On Tue, 2017-03-28 at 15:51 +0900, AKASHI Takahiro wrote:
> 
> +       if (crash_base == 0) {
> +               /* Current arm64 boot protocol requires 2MB alignment */
> +               crash_base = memblock_find_in_range(0, ARCH_LOW_ADDRESS_LIMIT,
> +                               crash_size, SZ_2M);
> +               if (crash_base == 0) {
> +                       pr_warn("cannot allocate crashkernel (size:0x%llx)\n",
> +                               crash_size);
> +                       return;
> +               }
> +       } else {
> +               /* User specifies base address explicitly. */
> +               if (!memblock_is_region_memory(crash_base, crash_size)) {
> +                       pr_warn("cannot reserve crashkernel: region is not memory\n");
> +                       return;
> +               }
> +
> +               if (memblock_is_region_reserved(crash_base, crash_size)) {
> +                       pr_warn("cannot reserve crashkernel: region overlaps reserved memory\n");
> +                       return;
> +               }
> +
> +               if (!IS_ALIGNED(crash_base, SZ_2M)) {
> +                       pr_warn("cannot reserve crashkernel: base address is not 2MB aligned\n");
> +                       return;
> +               }

You still have typos here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4938 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/kexec/attachments/20170403/34889fe5/attachment.bin>


More information about the kexec mailing list