1 /* MN10300 TLB flushing functions
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
11 #ifndef _ASM_TLBFLUSH_H
12 #define _ASM_TLBFLUSH_H
14 #include <asm/processor.h>
16 #define __flush_tlb() \
19 __asm__ __volatile__ \
24 : "m"(MMUCTR), "i"(MMUCTR_IIV|MMUCTR_DIV) \
29 #define __flush_tlb_all() __flush_tlb()
30 #define __flush_tlb_one(addr) __flush_tlb()
36 * - flush_tlb() flushes the current mm struct TLBs
37 * - flush_tlb_all() flushes all processes TLBs
38 * - flush_tlb_mm(mm) flushes the specified mm context TLB's
39 * - flush_tlb_page(vma, vmaddr) flushes one page
40 * - flush_tlb_range(mm, start, end) flushes a range of pages
41 * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables
43 #define flush_tlb_all() \
50 #define flush_tlb_mm(mm) \
57 #define flush_tlb_range(vma, start, end) \
59 unsigned long __s __attribute__((unused)) = (start); \
60 unsigned long __e __attribute__((unused)) = (end); \
67 #define __flush_tlb_global() flush_tlb_all()
68 #define flush_tlb() flush_tlb_all()
69 #define flush_tlb_kernel_range(start, end) \
71 unsigned long __s __attribute__((unused)) = (start); \
72 unsigned long __e __attribute__((unused)) = (end); \
76 extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
78 #define flush_tlb_pgtables(mm, start, end) do {} while (0)
80 #endif /* _ASM_TLBFLUSH_H */