aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/kernel/perf_event.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c
index e48651dace1b..9e96f849a744 100644
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -1738,8 +1738,6 @@ static void perf_callchain_user_64(struct perf_callchain_entry *entry,
1738{ 1738{
1739 unsigned long ufp; 1739 unsigned long ufp;
1740 1740
1741 perf_callchain_store(entry, regs->tpc);
1742
1743 ufp = regs->u_regs[UREG_I6] + STACK_BIAS; 1741 ufp = regs->u_regs[UREG_I6] + STACK_BIAS;
1744 do { 1742 do {
1745 struct sparc_stackf *usf, sf; 1743 struct sparc_stackf *usf, sf;
@@ -1760,8 +1758,6 @@ static void perf_callchain_user_32(struct perf_callchain_entry *entry,
1760{ 1758{
1761 unsigned long ufp; 1759 unsigned long ufp;
1762 1760
1763 perf_callchain_store(entry, regs->tpc);
1764
1765 ufp = regs->u_regs[UREG_I6] & 0xffffffffUL; 1761 ufp = regs->u_regs[UREG_I6] & 0xffffffffUL;
1766 do { 1762 do {
1767 struct sparc_stackf32 *usf, sf; 1763 struct sparc_stackf32 *usf, sf;
@@ -1780,6 +1776,11 @@ static void perf_callchain_user_32(struct perf_callchain_entry *entry,
1780void 1776void
1781perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs) 1777perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
1782{ 1778{
1779 perf_callchain_store(entry, regs->tpc);
1780
1781 if (!current->mm)
1782 return;
1783
1783 flushw_user(); 1784 flushw_user();
1784 if (test_thread_flag(TIF_32BIT)) 1785 if (test_thread_flag(TIF_32BIT))
1785 perf_callchain_user_32(entry, regs); 1786 perf_callchain_user_32(entry, regs);