[PATCH] PowerPC: move the marker in altivec_assist_exeption()

Sergei Shtylyov <[email protected]>
Newsgroups gmane.linux.kernel.tracing
Organization MontaVista Software Inc.
Message-ID <[email protected]>
Move the marker in altivec_assist_exeption() to avoid its being effectively
duplicated in _exception().

Signed-off-by: Sergei Shtylyov <[email protected]>

Index: linux-2.6-lttng/arch/powerpc/kernel/traps.c
===================================================================
--- linux-2.6-lttng.orig/arch/powerpc/kernel/traps.c
+++ linux-2.6-lttng/arch/powerpc/kernel/traps.c
@@ -985,20 +985,19 @@ void altivec_assist_exception(struct pt_
 		return;
 	}
 
-	MARK(kernel_trap_entry, "%ld struct pt_regs %p", regs->trap, regs);
-
 	if (err == -EFAULT) {
 		/* got an error reading the instruction */
 		_exception(SIGSEGV, regs, SEGV_ACCERR, regs->nip);
 	} else {
+		MARK(kernel_trap_entry, "%ld struct pt_regs %p", regs->trap, regs);
 		/* didn't recognize the instruction */
 		/* XXX quick hack for now: set the non-Java bit in the VSCR */
 		if (printk_ratelimit())
 			printk(KERN_ERR "Unrecognized altivec instruction "
 			       "in %s at %lx\n", current->comm, regs->nip);
 		current->thread.vscr.u[3] |= 0x10000;
+		MARK(kernel_trap_exit, MARK_NOARGS);
 	}
-	MARK(kernel_trap_exit, MARK_NOARGS);
 }
 #endif /* CONFIG_ALTIVEC */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.