162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu> 462306a36Sopenharmony_ci * Copyright (C) 2008-2009 PetaLogix 562306a36Sopenharmony_ci * Copyright (C) 2006 Atmark Techno, Inc. 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#ifndef _ASM_MICROBLAZE_TLBFLUSH_H 962306a36Sopenharmony_ci#define _ASM_MICROBLAZE_TLBFLUSH_H 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#include <linux/sched.h> 1262306a36Sopenharmony_ci#include <linux/threads.h> 1362306a36Sopenharmony_ci#include <asm/processor.h> /* For TASK_SIZE */ 1462306a36Sopenharmony_ci#include <asm/mmu.h> 1562306a36Sopenharmony_ci#include <asm/page.h> 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ciextern void _tlbie(unsigned long address); 1862306a36Sopenharmony_ciextern void _tlbia(void); 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci#define __tlbia() { preempt_disable(); _tlbia(); preempt_enable(); } 2162306a36Sopenharmony_ci#define __tlbie(x) { _tlbie(x); } 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_cistatic inline void local_flush_tlb_all(void) 2462306a36Sopenharmony_ci { __tlbia(); } 2562306a36Sopenharmony_cistatic inline void local_flush_tlb_mm(struct mm_struct *mm) 2662306a36Sopenharmony_ci { __tlbia(); } 2762306a36Sopenharmony_cistatic inline void local_flush_tlb_page(struct vm_area_struct *vma, 2862306a36Sopenharmony_ci unsigned long vmaddr) 2962306a36Sopenharmony_ci { __tlbie(vmaddr); } 3062306a36Sopenharmony_cistatic inline void local_flush_tlb_range(struct vm_area_struct *vma, 3162306a36Sopenharmony_ci unsigned long start, unsigned long end) 3262306a36Sopenharmony_ci { __tlbia(); } 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci#define flush_tlb_kernel_range(start, end) do { } while (0) 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci#define update_mmu_cache_range(vmf, vma, addr, ptep, nr) do { } while (0) 3762306a36Sopenharmony_ci#define update_mmu_cache(vma, addr, pte) \ 3862306a36Sopenharmony_ci update_mmu_cache_range(NULL, vma, addr, ptep, 1) 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci#define flush_tlb_all local_flush_tlb_all 4162306a36Sopenharmony_ci#define flush_tlb_mm local_flush_tlb_mm 4262306a36Sopenharmony_ci#define flush_tlb_page local_flush_tlb_page 4362306a36Sopenharmony_ci#define flush_tlb_range local_flush_tlb_range 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci/* 4662306a36Sopenharmony_ci * This is called in munmap when we have freed up some page-table 4762306a36Sopenharmony_ci * pages. We don't need to do anything here, there's nothing special 4862306a36Sopenharmony_ci * about our page-table pages. -- paulus 4962306a36Sopenharmony_ci */ 5062306a36Sopenharmony_cistatic inline void flush_tlb_pgtables(struct mm_struct *mm, 5162306a36Sopenharmony_ci unsigned long start, unsigned long end) { } 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci#endif /* _ASM_MICROBLAZE_TLBFLUSH_H */ 54