Skip to content

Commit

Permalink
Revert "ARM64: unwind: Fix PC calculation"
Browse files Browse the repository at this point in the history
This reverts commit e306dfd.

With this patch applied, we were the only architecture making this sort
of adjustment to the PC calculation in the unwinder. This causes
problems for ftrace, where the PC values are matched against the
contents of the stack frames in the callchain and fail to match any
records after the address adjustment.

Whilst there has been some effort to change ftrace to workaround this,
those patches are not yet ready for mainline and, since we're the odd
architecture in this regard, let's just step in line with other
architectures (like arch/arm/) for now.

Cc: <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
  • Loading branch information
wildea01 committed Oct 28, 2015
1 parent e13d918 commit 9702970
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions arch/arm64/kernel/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ int notrace unwind_frame(struct stackframe *frame)

frame->sp = fp + 0x10;
frame->fp = *(unsigned long *)(fp);
/*
* -4 here because we care about the PC at time of bl,
* not where the return will go.
*/
frame->pc = *(unsigned long *)(fp + 8) - 4;
frame->pc = *(unsigned long *)(fp + 8);

return 0;
}
Expand Down

0 comments on commit 9702970

Please sign in to comment.