From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: mm: drop fixup_init() and mm.h
Date: Mon, 5 Sep 2016 10:52:39 +0100 [thread overview]
Message-ID: <20160905095239.GA6826@leverpostej> (raw)
In-Reply-To: <1473067775-26284-1-git-send-email-wangkefeng.wang@huawei.com>
On Mon, Sep 05, 2016 at 05:29:35PM +0800, Kefeng Wang wrote:
> There is only fixup_init() in mm.h , and it is only called
> in free_initmem(), so move the codes from fixup_init() into
> free_initmem(), then drop fixup_init() and mm.h.
[...]
> +++ b/arch/arm64/mm/init.c
> @@ -47,8 +47,6 @@
> #include <asm/tlb.h>
> #include <asm/alternative.h>
>
> -#include "mm.h"
> -
> /*
> * We need to be able to catch inadvertent references to memstart_addr
> * that occur (potentially in generic code) before arm64_memblock_init()
> @@ -485,7 +483,12 @@ void free_initmem(void)
> {
> free_reserved_area(__va(__pa(__init_begin)), __va(__pa(__init_end)),
> 0, "unused kernel");
> - fixup_init();
> + /*
> + * Unmap the __init region but leave the VM area in place. This
> + * prevents the region from being reused for kernel modules, which
> + * is not supported by kallsyms.
> + */
> + unmap_kernel_range((u64)__init_begin, (u64)(__init_end - __init_begin));
Please also include <linux/vmalloc.h> above. That is where the prototype
of unmap_kernel_range is defined.
We were getting away without that in mm/mmu.c, but we should fix it up
now.
Otherwise, the patch looks good to me. With the above fixed up:
Acked-by: Mark Rutland <mark.rutland@arm.com>
Thanks,
Mark.
next prev parent reply other threads:[~2016-09-05 9:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-05 9:29 [PATCH] arm64: mm: drop fixup_init() and mm.h Kefeng Wang
2016-09-05 9:52 ` Mark Rutland [this message]
2016-09-05 11:30 ` [PATCH v2] " Kefeng Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160905095239.GA6826@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox