1 #ifndef _PARISC_TLBFLUSH_H
2 #define _PARISC_TLBFLUSH_H
4 /* TLB flushing routines.... */
7 #include <asm/mmu_context.h>
9 extern void flush_tlb_all(void);
14 * XXX This code is NOT valid for HP-UX compatibility processes,
15 * (although it will probably work 99% of the time). HP-UX
16 * processes are free to play with the space id's and save them
17 * over long periods of time, etc. so we have to preserve the
18 * space and just flush the entire tlb. We need to check the
19 * personality in order to do that, but the personality is not
20 * currently being set correctly.
22 * Of course, Linux processes could do the same thing, but
23 * we don't support that (and the compilers, dynamic linker,
24 * etc. do not do that).
27 static inline void flush_tlb_mm(struct mm_struct
*mm
)
29 if (mm
== &init_mm
) BUG(); /* Should never happen */
36 free_sid(mm
->context
);
37 mm
->context
= alloc_sid();
38 if (mm
== current
->active_mm
)
39 load_context(mm
->context
);
44 extern __inline__
void flush_tlb_pgtables(struct mm_struct
*mm
, unsigned long start
, unsigned long end
)
48 static inline void flush_tlb_page(struct vm_area_struct
*vma
,
51 /* For one page, it's not worth testing the split_tlb variable */
53 mtsp(vma
->vm_mm
->context
,1);
58 static inline void flush_tlb_range(struct vm_area_struct
*vma
,
59 unsigned long start
, unsigned long end
)
63 npages
= ((end
- (start
& PAGE_MASK
)) + (PAGE_SIZE
- 1)) >> PAGE_SHIFT
;
64 if (npages
>= 512) /* XXX arbitrary, should be tuned */
68 mtsp(vma
->vm_mm
->context
,1);
84 #define flush_tlb_kernel_range(start, end) flush_tlb_all()