Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
8dd588a8
Commit
8dd588a8
authored
Jun 22, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Update for show_stack() changes.
parent
9641920a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
15 deletions
+20
-15
arch/sparc/kernel/process.c
arch/sparc/kernel/process.c
+9
-5
arch/sparc64/kernel/traps.c
arch/sparc64/kernel/traps.c
+9
-6
arch/sparc64/mm/fault.c
arch/sparc64/mm/fault.c
+2
-4
No files found.
arch/sparc/kernel/process.c
View file @
8dd588a8
...
...
@@ -287,17 +287,14 @@ void show_regs(struct pt_regs *r)
rw
->
ins
[
4
],
rw
->
ins
[
5
],
rw
->
ins
[
6
],
rw
->
ins
[
7
]);
}
void
show_
trace_task
(
struct
task_struct
*
tsk
)
void
show_
stack
(
struct
task_struct
*
tsk
,
unsigned
long
*
_ksp
)
{
unsigned
long
pc
,
fp
;
unsigned
long
task_base
=
(
unsigned
long
)
tsk
;
struct
reg_window
*
rw
;
int
count
=
0
;
if
(
!
tsk
)
return
;
fp
=
tsk
->
thread_info
->
ksp
;
fp
=
(
unsigned
long
)
_ksp
;
do
{
/* Bogus frame pointer? */
if
(
fp
<
(
task_base
+
sizeof
(
struct
task_struct
))
||
...
...
@@ -311,6 +308,13 @@ void show_trace_task(struct task_struct *tsk)
printk
(
"
\n
"
);
}
void
show_trace_task
(
struct
task_struct
*
tsk
)
{
if
(
tsk
)
show_stack
(
tsk
,
(
unsigned
long
*
)
tsk
->
thread_info
->
ksp
);
}
/*
* Note: sparc64 has a pretty intricated thread_saved_pc, check it out.
*/
...
...
arch/sparc64/kernel/traps.c
View file @
8dd588a8
...
...
@@ -1569,12 +1569,15 @@ void user_instruction_dump (unsigned int *pc)
printk
(
"
\n
"
);
}
void
show_
trace_raw
(
struct
thread_info
*
tp
,
unsigned
long
ksp
)
void
show_
stack
(
struct
task_struct
*
tsk
,
unsigned
long
*
_
ksp
)
{
unsigned
long
pc
,
fp
,
thread_base
;
unsigned
long
pc
,
fp
,
thread_base
,
ksp
;
struct
thread_info
*
tp
=
tsk
->
thread_info
;
struct
reg_window
*
rw
;
int
count
=
0
;
ksp
=
(
unsigned
long
)
_ksp
;
if
(
tp
==
current_thread_info
())
flushw_all
();
...
...
@@ -1596,17 +1599,17 @@ void show_trace_raw(struct thread_info *tp, unsigned long ksp)
void
show_trace_task
(
struct
task_struct
*
tsk
)
{
if
(
tsk
)
show_
trace_raw
(
tsk
->
thread_info
,
tsk
->
thread_info
->
ksp
);
show_
stack
(
tsk
,
(
unsigned
long
*
)
tsk
->
thread_info
->
ksp
);
}
void
dump_stack
(
void
)
{
unsigned
long
ksp
;
unsigned
long
*
ksp
;
__asm__
__volatile__
(
"mov %%fp, %0"
:
"=r"
(
ksp
));
show_
trace_raw
(
current_thread_info
()
,
ksp
);
show_
stack
(
current
,
ksp
);
}
void
die_if_kernel
(
char
*
str
,
struct
pt_regs
*
regs
)
...
...
arch/sparc64/mm/fault.c
View file @
8dd588a8
...
...
@@ -149,16 +149,14 @@ static void unhandled_fault(unsigned long address, struct task_struct *tsk,
die_if_kernel
(
"Oops"
,
regs
);
}
extern
void
show_trace_raw
(
struct
thread_info
*
,
unsigned
long
);
static
void
bad_kernel_pc
(
struct
pt_regs
*
regs
)
{
unsigned
long
ksp
;
unsigned
long
*
ksp
;
printk
(
KERN_CRIT
"OOPS: Bogus kernel PC [%016lx] in fault handler
\n
"
,
regs
->
tpc
);
__asm__
(
"mov %%sp, %0"
:
"=r"
(
ksp
));
show_
trace_raw
(
current_thread_info
()
,
ksp
);
show_
stack
(
current
,
ksp
);
unhandled_fault
(
regs
->
tpc
,
current
,
regs
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment