aboutsummaryrefslogtreecommitdiffstats
path: root/arch/nios2/mm/tlb.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2018-11-05 10:00:15 +0800
committerLey Foon Tan <ley.foon.tan@intel.com>2019-03-07 05:29:35 +0800
commit195568a10a264a733ec7151a657ab054a0af768f (patch)
treea2db0ec2f201c8fd492d4807ecb89e0c8aa44707 /arch/nios2/mm/tlb.c
parentnios2: update_mmu_cache clear the old entry from the TLB (diff)
downloadlinux-dev-195568a10a264a733ec7151a657ab054a0af768f.tar.xz
linux-dev-195568a10a264a733ec7151a657ab054a0af768f.zip
nios2: flush_tlb_page use PID based flush
flush_tlb_page is for flushing user pages, so it should not be using flush_tlb_one (which flushes all pages). This patch implements it with the flush_tlb_range, which is a user flush that does the right thing. flush_tlb_one is made static to mm/tlb.c because it's a bit confusing. It is used in do_page_fault to flush the kernel non-linear mappings, so that is replaced with flush_tlb_kernel_page. The end result is that functionality is identical. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Diffstat (limited to '')
-rw-r--r--arch/nios2/mm/tlb.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/nios2/mm/tlb.c b/arch/nios2/mm/tlb.c
index cf10326aab1c..99e047082993 100644
--- a/arch/nios2/mm/tlb.c
+++ b/arch/nios2/mm/tlb.c
@@ -102,19 +102,11 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
}
}
-void flush_tlb_kernel_range(unsigned long start, unsigned long end)
-{
- while (start < end) {
- flush_tlb_one(start);
- start += PAGE_SIZE;
- }
-}
-
/*
* This one is only used for pages with the global bit set so we don't care
* much about the ASID.
*/
-void flush_tlb_one(unsigned long addr)
+static void flush_tlb_one(unsigned long addr)
{
unsigned int way;
unsigned long org_misc, pid_misc;
@@ -154,6 +146,14 @@ void flush_tlb_one(unsigned long addr)
WRCTL(CTL_TLBMISC, org_misc);
}
+void flush_tlb_kernel_range(unsigned long start, unsigned long end)
+{
+ while (start < end) {
+ flush_tlb_one(start);
+ start += PAGE_SIZE;
+ }
+}
+
void dump_tlb_line(unsigned long line)
{
unsigned int way;