From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 07/10] arm64: mm: avoid __pa translations for idmap_pg_dir and swapper_pg_dir
Date: Mon, 22 Feb 2016 21:54:29 +0100 [thread overview]
Message-ID: <1456174472-30028-8-git-send-email-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <1456174472-30028-1-git-send-email-ard.biesheuvel@linaro.org>
When taking the physical address of idmap_pg_dir or swapper_pg_dir,
which are static kernel globals, use __pa_symbol() not __pa().
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
arch/arm64/include/asm/mmu_context.h | 2 +-
arch/arm64/mm/mmu.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h
index b03272fc501e..a8ba62955a62 100644
--- a/arch/arm64/include/asm/mmu_context.h
+++ b/arch/arm64/include/asm/mmu_context.h
@@ -123,7 +123,7 @@ static inline void cpu_install_idmap(void)
local_flush_tlb_all();
cpu_set_idmap_tcr_t0sz();
- cpu_switch_mm(idmap_pg_dir, &init_mm);
+ cpu_do_switch_mm(__pa_symbol(idmap_pg_dir), &init_mm);
}
/*
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index 13517699bea6..980dd9cbdc19 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -557,7 +557,7 @@ void __init paging_init(void)
* We only reuse the PGD from the swapper_pg_dir, not the pud + pmd
* allocated with it.
*/
- memblock_free(__pa(swapper_pg_dir) + PAGE_SIZE,
+ memblock_free(__pa_symbol(swapper_pg_dir) + PAGE_SIZE,
SWAPPER_DIR_SIZE - PAGE_SIZE);
bootmem_init();
--
2.5.0
next prev parent reply other threads:[~2016-02-22 20:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 20:54 [RFC PATCH 00/10] arm64: restrict __pa translation to linear virtual addresses Ard Biesheuvel
2016-02-22 20:54 ` [RFC PATCH 01/10] arm64: mm: move assignment of 'high_memory' before its first use Ard Biesheuvel
2016-02-23 12:14 ` Catalin Marinas
2016-02-23 12:18 ` Ard Biesheuvel
2016-02-22 20:54 ` [RFC PATCH 02/10] arm64: introduce __kimg_to_phys() and __pa_symbol() Ard Biesheuvel
2016-02-22 20:54 ` [RFC PATCH 03/10] arm64: mm: avoid __pa translations in cpu_replace_ttbr1 Ard Biesheuvel
2016-02-22 20:54 ` [RFC PATCH 04/10] arm64: mm: avoid __pa translations on empty_zero_page Ard Biesheuvel
2016-02-22 20:54 ` [RFC PATCH 05/10] arm64: mm: avoid __pa translations in early_fixmap_init Ard Biesheuvel
2016-02-23 17:12 ` Catalin Marinas
2016-02-23 17:16 ` Ard Biesheuvel
2016-02-23 17:26 ` Catalin Marinas
2016-02-23 17:27 ` Ard Biesheuvel
2016-02-23 17:32 ` Catalin Marinas
2016-02-23 17:43 ` Ard Biesheuvel
2016-02-23 18:10 ` Catalin Marinas
2016-02-22 20:54 ` [RFC PATCH 06/10] arm64: mm: use __pa_symbol() not __pa() for section boundary symbols Ard Biesheuvel
2016-02-22 20:54 ` Ard Biesheuvel [this message]
2016-02-22 20:54 ` [RFC PATCH 08/10] arm64: vdso: avoid __pa translations Ard Biesheuvel
2016-02-22 20:54 ` [RFC PATCH 09/10] arm64: insn: " Ard Biesheuvel
2016-02-22 20:54 ` [RFC PATCH 10/10] arm64: mm: restrict __pa() translations to linear virtual addresses Ard Biesheuvel
2016-02-23 12:26 ` Will Deacon
2016-02-23 12:29 ` Ard Biesheuvel
2016-02-23 12:31 ` Will Deacon
2016-02-23 17:22 ` Catalin Marinas
2016-02-23 10:03 ` [RFC PATCH 00/10] arm64: restrict __pa translation " Ard Biesheuvel
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=1456174472-30028-8-git-send-email-ard.biesheuvel@linaro.org \
--to=ard.biesheuvel@linaro.org \
--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;
as well as URLs for NNTP newsgroup(s).