18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * TLB flush support for Hexagon
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef _ASM_TLBFLUSH_H
98c2ecf20Sopenharmony_ci#define _ASM_TLBFLUSH_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include <linux/mm.h>
128c2ecf20Sopenharmony_ci#include <asm/processor.h>
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci/*
158c2ecf20Sopenharmony_ci * TLB flushing -- in "SMP", these routines get defined to be the
168c2ecf20Sopenharmony_ci * ones from smp.c, else they are some local flavors.
178c2ecf20Sopenharmony_ci */
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci/*
208c2ecf20Sopenharmony_ci * These functions are commonly macros, but in the interests of
218c2ecf20Sopenharmony_ci * VM vs. native implementation and code size, we simply declare
228c2ecf20Sopenharmony_ci * the function prototypes here.
238c2ecf20Sopenharmony_ci */
248c2ecf20Sopenharmony_ciextern void tlb_flush_all(void);
258c2ecf20Sopenharmony_ciextern void flush_tlb_mm(struct mm_struct *mm);
268c2ecf20Sopenharmony_ciextern void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
278c2ecf20Sopenharmony_ciextern void flush_tlb_range(struct vm_area_struct *vma,
288c2ecf20Sopenharmony_ci				unsigned long start, unsigned long end);
298c2ecf20Sopenharmony_ciextern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
308c2ecf20Sopenharmony_ciextern void flush_tlb_one(unsigned long);
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci/*
338c2ecf20Sopenharmony_ci * "This is called in munmap when we have freed up some page-table pages.
348c2ecf20Sopenharmony_ci * We don't need to do anything here..."
358c2ecf20Sopenharmony_ci *
368c2ecf20Sopenharmony_ci * The VM kernel doesn't walk page tables, and they are passed to the VMM
378c2ecf20Sopenharmony_ci * by logical address. There doesn't seem to be any possibility that they
388c2ecf20Sopenharmony_ci * could be referenced by the VM kernel based on a stale mapping, since
398c2ecf20Sopenharmony_ci * they would only be located by consulting the mm structure, and they
408c2ecf20Sopenharmony_ci * will have been purged from that structure by the munmap.  Seems like
418c2ecf20Sopenharmony_ci * a noop on HVM as well.
428c2ecf20Sopenharmony_ci */
438c2ecf20Sopenharmony_ci#define flush_tlb_pgtables(mm, start, end)
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci#endif
46