Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2528a04c authored by Rohit Vaswani's avatar Rohit Vaswani
Browse files

arm64: mm: Do not create 1GB mappings if FORCE_PAGES is enabled



With CONFIG_FORCE_PAGES enabled, we break down the section mappings
into 4K page mappings. For 1GB mappings, remapping the pages into 4K
chunks becomes unnecessarily complicated. Skip creating the 1GB mapping
if we know it's going to be separated into 4K mappings.

Change-Id: I991768210ed6e1c1e19faf0d5d851d550e51a8c6
Signed-off-by: default avatarRohit Vaswani <rvaswani@codeaurora.org>
parent b755738d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -378,7 +378,8 @@ static void alloc_init_pud(struct mm_struct *mm, pgd_t *pgd,
		 * For 4K granule only, attempt to put down a 1GB block
		 */
		if (use_1G_block(addr, next, phys) &&
				!dma_overlap(phys, phys + next - addr)) {
				!dma_overlap(phys, phys + next - addr) &&
				!IS_ENABLED(CONFIG_FORCE_PAGES)) {
			pud_t old_pud = *pud;
			set_pud(pud, __pud(phys |
					   pgprot_val(mk_sect_prot(prot))));