]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/mm/fault.c
Merge branch 'thinkpad-acpi' into release
[linux-2.6-omap-h63xx.git] / arch / powerpc / mm / fault.c
index 565b7a237c847929e885eb5597fe4cdb14746cf3..91c7b8636b8a751ba160a7791df929be25d32543 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;
@@ -339,7 +347,7 @@ bad_area_nosemaphore:
            && printk_ratelimit())
                printk(KERN_CRIT "kernel tried to execute NX-protected"
                       " page (%lx) - exploit attempt? (uid: %d)\n",
-                      address, current->uid);
+                      address, current_uid());
 
        return SIGSEGV;