public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] arm64: mm: make create_mapping_late() non-allocating
Date: Mon, 25 Jul 2016 14:46:26 +0100	[thread overview]
Message-ID: <20160725134550.GA14465@leverpostej> (raw)
In-Reply-To: <1469208745-6693-2-git-send-email-ard.biesheuvel@linaro.org>

Hi Ard,

On Fri, Jul 22, 2016 at 07:32:24PM +0200, Ard Biesheuvel wrote:
> The only purpose served by create_mapping_late() is to remap the already
> mapped .text and .rodata kernel segments with read-only permissions. Since
> we no longer allow block mappings to be split or merged,
> create_mapping_late() should not pass an allocation function pointer into
> __create_pgd_mapping(). So pass NULL instead.
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  arch/arm64/mm/mmu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
> index a96a2413fa18..33f36cede02d 100644
> --- a/arch/arm64/mm/mmu.c
> +++ b/arch/arm64/mm/mmu.c
> @@ -312,7 +312,7 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt,
>  	}
>  
>  	__create_pgd_mapping(init_mm.pgd, phys, virt, size, prot,
> -			     late_pgtable_alloc, !debug_pagealloc_enabled());
> +			     NULL, !debug_pagealloc_enabled());
>  }

How about we drop the __init marker from create_mapping_noalloc(), and
update the callers in mark_rodata_ro() to use that, so that we can drop
create_mapping_late() entirely.

Other than the __init marker and name, create_mapping_late() and
create_mapping_noalloc() would be identical after this change, and the
naming of create_mapping_noalloc() does better describe what we're
trying to achieve in mark_rodata_ro().

Thanks,
Mark.

  reply	other threads:[~2016-07-25 13:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22 17:32 [PATCH 0/2] arm64: mm: use fully constructed struct pages from EFI page tables Ard Biesheuvel
2016-07-22 17:32 ` [PATCH 1/2] arm64: mm: make create_mapping_late() non-allocating Ard Biesheuvel
2016-07-25 13:46   ` Mark Rutland [this message]
2016-07-25 14:10     ` Ard Biesheuvel
2016-07-25 14:22       ` Mark Rutland
2016-07-22 17:32 ` [PATCH 2/2] arm64: mm: run pgtable_page_ctor() on non-swapper translation table pages Ard Biesheuvel
2016-07-25 14:31   ` Suzuki K Poulose
2016-07-25 14:43     ` Suzuki K Poulose
2016-07-25 16:46       ` Catalin Marinas
2016-07-25 17:03         ` Suzuki K Poulose
2016-07-22 21:53 ` [PATCH 0/2] arm64: mm: use fully constructed struct pages from EFI page tables Laura Abbott
2016-07-25 13:48 ` Sudeep Holla
2016-07-25 17:14 ` Catalin Marinas

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=20160725134550.GA14465@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