~ubuntu-branches/ubuntu/quantal/linux-ti-omap4/quantal-proposed

« back to all changes in this revision

Viewing changes to arch/sparc/mm/tlb.c

  • Committer: Package Import Robot
  • Author(s): Brad Figg, Brad Figg
  • Date: 2013-06-08 09:09:23 UTC
  • Revision ID: package-import@ubuntu.com-20130608090923-ibtnp6edtrn3sxik
Tags: 3.5.0-226.39
[ Brad Figg ]

UBUNTU: Fixup missing abi files causing FTBS

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
void flush_tlb_pending(void)
25
25
{
26
26
        struct tlb_batch *tb = &get_cpu_var(tlb_batch);
27
 
 
28
 
        if (tb->tlb_nr) {
29
 
                flush_tsb_user(tb);
30
 
 
31
 
                if (CTX_VALID(tb->mm->context)) {
 
27
        struct mm_struct *mm = tb->mm;
 
28
 
 
29
        if (!tb->tlb_nr)
 
30
                goto out;
 
31
 
 
32
        flush_tsb_user(tb);
 
33
 
 
34
        if (CTX_VALID(mm->context)) {
 
35
                if (tb->tlb_nr == 1) {
 
36
                        global_flush_tlb_page(mm, tb->vaddrs[0]);
 
37
                } else {
32
38
#ifdef CONFIG_SMP
33
39
                        smp_flush_tlb_pending(tb->mm, tb->tlb_nr,
34
40
                                              &tb->vaddrs[0]);
37
43
                                            tb->tlb_nr, &tb->vaddrs[0]);
38
44
#endif
39
45
                }
40
 
                tb->tlb_nr = 0;
41
46
        }
42
47
 
 
48
        tb->tlb_nr = 0;
 
49
 
 
50
out:
43
51
        put_cpu_var(tlb_batch);
44
52
}
45
53
 
 
54
void arch_enter_lazy_mmu_mode(void)
 
55
{
 
56
        struct tlb_batch *tb = &__get_cpu_var(tlb_batch);
 
57
 
 
58
        tb->active = 1;
 
59
}
 
60
 
 
61
void arch_leave_lazy_mmu_mode(void)
 
62
{
 
63
        struct tlb_batch *tb = &__get_cpu_var(tlb_batch);
 
64
 
 
65
        if (tb->tlb_nr)
 
66
                flush_tlb_pending();
 
67
        tb->active = 0;
 
68
}
 
69
 
46
70
void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr,
47
71
                   pte_t *ptep, pte_t orig, int fullmm)
48
72
{
90
114
                nr = 0;
91
115
        }
92
116
 
 
117
        if (!tb->active) {
 
118
                global_flush_tlb_page(mm, vaddr);
 
119
                flush_tsb_user_page(mm, vaddr);
 
120
                goto out;
 
121
        }
 
122
 
93
123
        if (nr == 0)
94
124
                tb->mm = mm;
95
125
 
98
128
        if (nr >= TLB_BATCH_NR)
99
129
                flush_tlb_pending();
100
130
 
 
131
out:
101
132
        put_cpu_var(tlb_batch);
102
133
}