aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm/fault_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/mm/fault_64.c')
-rw-r--r--arch/sparc/mm/fault_64.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c
index 6081936bf03..b9d4ff02b8f 100644
--- a/arch/sparc/mm/fault_64.c
+++ b/arch/sparc/mm/fault_64.c
@@ -16,6 +16,7 @@
16#include <linux/mm.h> 16#include <linux/mm.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/perf_event.h>
19#include <linux/interrupt.h> 20#include <linux/interrupt.h>
20#include <linux/kprobes.h> 21#include <linux/kprobes.h>
21#include <linux/kdebug.h> 22#include <linux/kdebug.h>
@@ -296,6 +297,8 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
296 if (in_atomic() || !mm) 297 if (in_atomic() || !mm)
297 goto intr_or_no_mm; 298 goto intr_or_no_mm;
298 299
300 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address);
301
299 if (!down_read_trylock(&mm->mmap_sem)) { 302 if (!down_read_trylock(&mm->mmap_sem)) {
300 if ((regs->tstate & TSTATE_PRIV) && 303 if ((regs->tstate & TSTATE_PRIV) &&
301 !search_exception_tables(regs->tpc)) { 304 !search_exception_tables(regs->tpc)) {
@@ -400,11 +403,15 @@ good_area:
400 goto do_sigbus; 403 goto do_sigbus;
401 BUG(); 404 BUG();
402 } 405 }
403 if (fault & VM_FAULT_MAJOR) 406 if (fault & VM_FAULT_MAJOR) {
404 current->maj_flt++; 407 current->maj_flt++;
405 else 408 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0,
409 regs, address);
410 } else {
406 current->min_flt++; 411 current->min_flt++;
407 412 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0,
413 regs, address);
414 }
408 up_read(&mm->mmap_sem); 415 up_read(&mm->mmap_sem);
409 416
410 mm_rss = get_mm_rss(mm); 417 mm_rss = get_mm_rss(mm);