git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ARM: 7676/1: fix a wrong value returned from CALLER_ADDRn
[pandora-kernel.git]
/
arch
/
arm
/
kernel
/
return_address.c
diff --git
a/arch/arm/kernel/return_address.c
b/arch/arm/kernel/return_address.c
index
0b13a72
..
fafedd8
100644
(file)
--- a/
arch/arm/kernel/return_address.c
+++ b/
arch/arm/kernel/return_address.c
@@
-8,7
+8,7
@@
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*/
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*/
-#include <linux/
module
.h>
+#include <linux/
export
.h>
#include <linux/ftrace.h>
#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND)
#include <linux/ftrace.h>
#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND)
@@
-26,7
+26,7
@@
static int save_return_addr(struct stackframe *frame, void *d)
struct return_address_data *data = d;
if (!data->level) {
struct return_address_data *data = d;
if (!data->level) {
- data->addr = (void *)frame->
lr
;
+ data->addr = (void *)frame->
pc
;
return 1;
} else {
return 1;
} else {
@@
-41,7
+41,8
@@
void *return_address(unsigned int level)
struct stackframe frame;
register unsigned long current_sp asm ("sp");
struct stackframe frame;
register unsigned long current_sp asm ("sp");
- data.level = level + 1;
+ data.level = level + 2;
+ data.addr = NULL;
frame.fp = (unsigned long)__builtin_frame_address(0);
frame.sp = current_sp;
frame.fp = (unsigned long)__builtin_frame_address(0);
frame.sp = current_sp;