~ubuntu-branches/ubuntu/precise/linux-lowlatency/precise

« back to all changes in this revision

Viewing changes to arch/sparc/include/asm/tlbflush_32.h

  • Committer: Package Import Robot
  • Author(s): Alessio Igor Bogani
  • Date: 2011-10-26 11:13:05 UTC
  • Revision ID: package-import@ubuntu.com-20111026111305-tz023xykf0i6eosh
Tags: upstream-3.2.0
ImportĀ upstreamĀ versionĀ 3.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _SPARC_TLBFLUSH_H
 
2
#define _SPARC_TLBFLUSH_H
 
3
 
 
4
#include <linux/mm.h>
 
5
// #include <asm/processor.h>
 
6
 
 
7
/*
 
8
 * TLB flushing:
 
9
 *
 
10
 *  - flush_tlb() flushes the current mm struct TLBs    XXX Exists?
 
11
 *  - flush_tlb_all() flushes all processes TLBs
 
12
 *  - flush_tlb_mm(mm) flushes the specified mm context TLB's
 
13
 *  - flush_tlb_page(vma, vmaddr) flushes one page
 
14
 *  - flush_tlb_range(vma, start, end) flushes a range of pages
 
15
 *  - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
 
16
 */
 
17
 
 
18
#ifdef CONFIG_SMP
 
19
 
 
20
BTFIXUPDEF_CALL(void, local_flush_tlb_all, void)
 
21
BTFIXUPDEF_CALL(void, local_flush_tlb_mm, struct mm_struct *)
 
22
BTFIXUPDEF_CALL(void, local_flush_tlb_range, struct vm_area_struct *, unsigned long, unsigned long)
 
23
BTFIXUPDEF_CALL(void, local_flush_tlb_page, struct vm_area_struct *, unsigned long)
 
24
 
 
25
#define local_flush_tlb_all() BTFIXUP_CALL(local_flush_tlb_all)()
 
26
#define local_flush_tlb_mm(mm) BTFIXUP_CALL(local_flush_tlb_mm)(mm)
 
27
#define local_flush_tlb_range(vma,start,end) BTFIXUP_CALL(local_flush_tlb_range)(vma,start,end)
 
28
#define local_flush_tlb_page(vma,addr) BTFIXUP_CALL(local_flush_tlb_page)(vma,addr)
 
29
 
 
30
extern void smp_flush_tlb_all(void);
 
31
extern void smp_flush_tlb_mm(struct mm_struct *mm);
 
32
extern void smp_flush_tlb_range(struct vm_area_struct *vma,
 
33
                                  unsigned long start,
 
34
                                  unsigned long end);
 
35
extern void smp_flush_tlb_page(struct vm_area_struct *mm, unsigned long page);
 
36
 
 
37
#endif /* CONFIG_SMP */
 
38
 
 
39
BTFIXUPDEF_CALL(void, flush_tlb_all, void)
 
40
BTFIXUPDEF_CALL(void, flush_tlb_mm, struct mm_struct *)
 
41
BTFIXUPDEF_CALL(void, flush_tlb_range, struct vm_area_struct *, unsigned long, unsigned long)
 
42
BTFIXUPDEF_CALL(void, flush_tlb_page, struct vm_area_struct *, unsigned long)
 
43
 
 
44
#define flush_tlb_all() BTFIXUP_CALL(flush_tlb_all)()
 
45
#define flush_tlb_mm(mm) BTFIXUP_CALL(flush_tlb_mm)(mm)
 
46
#define flush_tlb_range(vma,start,end) BTFIXUP_CALL(flush_tlb_range)(vma,start,end)
 
47
#define flush_tlb_page(vma,addr) BTFIXUP_CALL(flush_tlb_page)(vma,addr)
 
48
 
 
49
// #define flush_tlb() flush_tlb_mm(current->active_mm) /* XXX Sure? */
 
50
 
 
51
/*
 
52
 * This is a kludge, until I know better. --zaitcev XXX
 
53
 */
 
54
static inline void flush_tlb_kernel_range(unsigned long start,
 
55
                                          unsigned long end)
 
56
{
 
57
        flush_tlb_all();
 
58
}
 
59
 
 
60
#endif /* _SPARC_TLBFLUSH_H */