18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _SPARC64_TLB_H 38c2ecf20Sopenharmony_ci#define _SPARC64_TLB_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/swap.h> 68c2ecf20Sopenharmony_ci#include <linux/pagemap.h> 78c2ecf20Sopenharmony_ci#include <asm/tlbflush.h> 88c2ecf20Sopenharmony_ci#include <asm/mmu_context.h> 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#ifdef CONFIG_SMP 118c2ecf20Sopenharmony_civoid smp_flush_tlb_pending(struct mm_struct *, 128c2ecf20Sopenharmony_ci unsigned long, unsigned long *); 138c2ecf20Sopenharmony_ci#endif 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#ifdef CONFIG_SMP 168c2ecf20Sopenharmony_civoid smp_flush_tlb_mm(struct mm_struct *mm); 178c2ecf20Sopenharmony_ci#define do_flush_tlb_mm(mm) smp_flush_tlb_mm(mm) 188c2ecf20Sopenharmony_ci#else 198c2ecf20Sopenharmony_ci#define do_flush_tlb_mm(mm) __flush_tlb_mm(CTX_HWBITS(mm->context), SECONDARY_CONTEXT) 208c2ecf20Sopenharmony_ci#endif 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_civoid __flush_tlb_pending(unsigned long, unsigned long, unsigned long *); 238c2ecf20Sopenharmony_civoid flush_tlb_pending(void); 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#define tlb_start_vma(tlb, vma) do { } while (0) 268c2ecf20Sopenharmony_ci#define tlb_end_vma(tlb, vma) do { } while (0) 278c2ecf20Sopenharmony_ci#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0) 288c2ecf20Sopenharmony_ci#define tlb_flush(tlb) flush_tlb_pending() 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci/* 318c2ecf20Sopenharmony_ci * SPARC64's hardware TLB fill does not use the Linux page-tables 328c2ecf20Sopenharmony_ci * and therefore we don't need a TLBI when freeing page-table pages. 338c2ecf20Sopenharmony_ci */ 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#ifdef CONFIG_MMU_GATHER_RCU_TABLE_FREE 368c2ecf20Sopenharmony_ci#define tlb_needs_table_invalidate() (false) 378c2ecf20Sopenharmony_ci#endif 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#include <asm-generic/tlb.h> 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci#endif /* _SPARC64_TLB_H */ 42