From: cpandya@codeaurora.org (Chintan Pandya)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v12 5/5] arm64: Allow huge io mappings again
Date: Fri, 1 Jun 2018 18:09:18 +0530 [thread overview]
Message-ID: <1527856758-27169-6-git-send-email-cpandya@codeaurora.org> (raw)
In-Reply-To: <1527856758-27169-1-git-send-email-cpandya@codeaurora.org>
Huge mappings have had stability issues due to stale
TLB entry and memory leak issues. Since, those are
addressed in this series of patches, it is now safe
to allow huge mappings.
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
---
arch/arm64/mm/mmu.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index 6e7e16c..c65abc4 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -934,15 +934,8 @@ int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot)
{
pgprot_t sect_prot = __pgprot(PUD_TYPE_SECT |
pgprot_val(mk_sect_prot(prot)));
- pud_t new_pud = pfn_pud(__phys_to_pfn(phys), sect_prot);
-
- /* Only allow permission changes for now */
- if (!pgattr_change_is_safe(READ_ONCE(pud_val(*pudp)),
- pud_val(new_pud)))
- return 0;
-
BUG_ON(phys & ~PUD_MASK);
- set_pud(pudp, new_pud);
+ set_pud(pudp, pfn_pud(__phys_to_pfn(phys), sect_prot));
return 1;
}
@@ -950,15 +943,8 @@ int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot)
{
pgprot_t sect_prot = __pgprot(PMD_TYPE_SECT |
pgprot_val(mk_sect_prot(prot)));
- pmd_t new_pmd = pfn_pmd(__phys_to_pfn(phys), sect_prot);
-
- /* Only allow permission changes for now */
- if (!pgattr_change_is_safe(READ_ONCE(pmd_val(*pmdp)),
- pmd_val(new_pmd)))
- return 0;
-
BUG_ON(phys & ~PMD_MASK);
- set_pmd(pmdp, new_pmd);
+ set_pmd(pmdp, pfn_pmd(__phys_to_pfn(phys), sect_prot));
return 1;
}
--
Qualcomm India Private Limited, on behalf of Qualcomm Innovation
Center, Inc., is a member of Code Aurora Forum, a Linux Foundation
Collaborative Project
next prev parent reply other threads:[~2018-06-01 12:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-01 12:39 [PATCH v12 0/5] Fix issues with huge mapping in ioremap for ARM64 Chintan Pandya
2018-06-01 12:39 ` [PATCH v12 1/5] ioremap: Update pgtable free interfaces with addr Chintan Pandya
2018-06-01 12:39 ` [PATCH v12 2/5] arm64: tlbflush: Introduce __flush_tlb_kernel_pgtable Chintan Pandya
2018-06-01 12:39 ` [PATCH v12 3/5] arm64: pgtable: Add p*d_page_vaddr helper macros Chintan Pandya
2018-06-04 12:13 ` Will Deacon
2018-06-04 13:43 ` Chintan Pandya
2018-06-04 15:10 ` Will Deacon
2018-06-01 12:39 ` [PATCH v12 4/5] arm64: Implement page table free interfaces Chintan Pandya
2018-06-04 12:13 ` Will Deacon
2018-06-04 13:43 ` Chintan Pandya
2018-06-04 15:07 ` Will Deacon
2018-06-01 12:39 ` Chintan Pandya [this message]
2018-06-04 12:14 ` [PATCH v12 5/5] arm64: Allow huge io mappings again Will Deacon
2018-06-04 13:42 ` Chintan Pandya
2018-06-04 5:56 ` [PATCH v12 0/5] Fix issues with huge mapping in ioremap for ARM64 Chintan Pandya
2018-06-04 10:33 ` Will Deacon
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=1527856758-27169-6-git-send-email-cpandya@codeaurora.org \
--to=cpandya@codeaurora.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).