powerpc/mm: Add SMP support to no-hash TLB handling
[deliverable/linux.git] / arch / powerpc / mm / fault.c
index 565b7a237c847929e885eb5597fe4cdb14746cf3..87f1f955dea428cb832b3ee8f3e7762d39bd4b86 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/kprobes.h>
 #include <linux/kdebug.h>
 
+#include <asm/firmware.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/mmu.h>
@@ -283,7 +284,7 @@ good_area:
                                }
                                pte_update(ptep, 0, _PAGE_HWEXEC |
                                           _PAGE_ACCESSED);
-                               _tlbie(address, mm->context.id);
+                               local_flush_tlb_page(vma, address);
                                pte_unmap_unlock(ptep, ptl);
                                up_read(&mm->mmap_sem);
                                return 0;
@@ -318,9 +319,16 @@ good_area:
                        goto do_sigbus;
                BUG();
        }
-       if (ret & VM_FAULT_MAJOR)
+       if (ret & VM_FAULT_MAJOR) {
                current->maj_flt++;
-       else
+#ifdef CONFIG_PPC_SMLPAR
+               if (firmware_has_feature(FW_FEATURE_CMO)) {
+                       preempt_disable();
+                       get_lppaca()->page_ins += (1 << PAGE_FACTOR);
+                       preempt_enable();
+               }
+#endif
+       } else
                current->min_flt++;
        up_read(&mm->mmap_sem);
        return 0;
This page took 0.043644 seconds and 5 git commands to generate.