Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
4fe3ebec
Commit
4fe3ebec
authored
Jul 17, 2008
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sparc: Use new '%pS' infrastructure to print symbols.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
f538f3df
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
56 deletions
+37
-56
arch/sparc/kernel/process.c
arch/sparc/kernel/process.c
+5
-6
arch/sparc/kernel/traps.c
arch/sparc/kernel/traps.c
+3
-4
arch/sparc64/kernel/process.c
arch/sparc64/kernel/process.c
+9
-17
arch/sparc64/kernel/traps.c
arch/sparc64/kernel/traps.c
+15
-22
arch/sparc64/kernel/unaligned.c
arch/sparc64/kernel/unaligned.c
+3
-4
arch/sparc64/mm/fault.c
arch/sparc64/mm/fault.c
+2
-3
No files found.
arch/sparc/kernel/process.c
View file @
4fe3ebec
/* linux/arch/sparc/kernel/process.c
*
* Copyright (C) 1995 David S. Miller (davem@davemloft.net)
* Copyright (C) 1995
, 2008
David S. Miller (davem@davemloft.net)
* Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
*/
...
...
@@ -14,7 +14,6 @@
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/kallsyms.h>
#include <linux/mm.h>
#include <linux/stddef.h>
#include <linux/ptrace.h>
...
...
@@ -198,7 +197,7 @@ void __show_backtrace(unsigned long fp)
rw->ins[4], rw->ins[5],
rw->ins[6],
rw->ins[7]);
print
_symbol("%s\n",
rw->ins[7]);
print
k("%pS\n", (void *)
rw->ins[7]);
rw = (struct reg_window *) rw->ins[6];
}
spin_unlock_irqrestore(&sparc_backtrace_lock, flags);
...
...
@@ -265,14 +264,14 @@ void show_regs(struct pt_regs *r)
printk
(
"PSR: %08lx PC: %08lx NPC: %08lx Y: %08lx %s
\n
"
,
r
->
psr
,
r
->
pc
,
r
->
npc
,
r
->
y
,
print_tainted
());
print
_symbol
(
"PC: <%s>
\n
"
,
r
->
pc
);
print
k
(
"PC: <%pS>
\n
"
,
(
void
*
)
r
->
pc
);
printk
(
"%%G: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx
\n
"
,
r
->
u_regs
[
0
],
r
->
u_regs
[
1
],
r
->
u_regs
[
2
],
r
->
u_regs
[
3
],
r
->
u_regs
[
4
],
r
->
u_regs
[
5
],
r
->
u_regs
[
6
],
r
->
u_regs
[
7
]);
printk
(
"%%O: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx
\n
"
,
r
->
u_regs
[
8
],
r
->
u_regs
[
9
],
r
->
u_regs
[
10
],
r
->
u_regs
[
11
],
r
->
u_regs
[
12
],
r
->
u_regs
[
13
],
r
->
u_regs
[
14
],
r
->
u_regs
[
15
]);
print
_symbol
(
"RPC: <%s>
\n
"
,
r
->
u_regs
[
15
]);
print
k
(
"RPC: <%pS>
\n
"
,
(
void
*
)
r
->
u_regs
[
15
]);
printk
(
"%%L: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx
\n
"
,
rw
->
locals
[
0
],
rw
->
locals
[
1
],
rw
->
locals
[
2
],
rw
->
locals
[
3
],
...
...
@@ -307,7 +306,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
rw
=
(
struct
reg_window
*
)
fp
;
pc
=
rw
->
ins
[
7
];
printk
(
"[%08lx : "
,
pc
);
print
_symbol
(
"%s ] "
,
pc
);
print
k
(
"%pS ] "
,
(
void
*
)
pc
);
fp
=
rw
->
ins
[
6
];
}
while
(
++
count
<
16
);
printk
(
"
\n
"
);
...
...
arch/sparc/kernel/traps.c
View file @
4fe3ebec
/*
* arch/sparc/kernel/traps.c
*
* Copyright 1995
David S. Miller (davem@caip.rutgers.edu
)
* Copyright 1995
, 2008 David S. Miller (davem@davemloft.net
)
* Copyright 2000 Jakub Jelinek (jakub@redhat.com)
*/
...
...
@@ -11,7 +11,6 @@
#include <linux/sched.h>
/* for jiffies */
#include <linux/kernel.h>
#include <linux/kallsyms.h>
#include <linux/signal.h>
#include <linux/smp.h>
#include <linux/smp_lock.h>
...
...
@@ -116,8 +115,8 @@ void die_if_kernel(char *str, struct pt_regs *regs)
count
++
<
30
&&
(((
unsigned
long
)
rw
)
>=
PAGE_OFFSET
)
&&
!
(((
unsigned
long
)
rw
)
&
0x7
))
{
printk
(
"Caller[%08lx]
"
,
rw
->
ins
[
7
]);
print_symbol
(
": %s
\n
"
,
rw
->
ins
[
7
]);
printk
(
"Caller[%08lx]
: %pS
\n
"
,
rw
->
ins
[
7
],
(
void
*
)
rw
->
ins
[
7
]);
rw
=
(
struct
reg_window
*
)
rw
->
ins
[
6
];
}
}
...
...
arch/sparc64/kernel/process.c
View file @
4fe3ebec
...
...
@@ -15,7 +15,6 @@
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/kallsyms.h>
#include <linux/mm.h>
#include <linux/fs.h>
#include <linux/smp.h>
...
...
@@ -211,7 +210,7 @@ static void show_regwindow(struct pt_regs *regs)
printk
(
"i4: %016lx i5: %016lx i6: %016lx i7: %016lx
\n
"
,
rwk
->
ins
[
4
],
rwk
->
ins
[
5
],
rwk
->
ins
[
6
],
rwk
->
ins
[
7
]);
if
(
regs
->
tstate
&
TSTATE_PRIV
)
print
_symbol
(
"I7: <%s>
\n
"
,
rwk
->
ins
[
7
]);
print
k
(
"I7: <%pS>
\n
"
,
(
void
*
)
rwk
->
ins
[
7
]);
}
#ifdef CONFIG_SMP
...
...
@@ -232,7 +231,7 @@ void __show_regs(struct pt_regs * regs)
#endif
printk
(
"TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x %s
\n
"
,
regs
->
tstate
,
regs
->
tpc
,
regs
->
tnpc
,
regs
->
y
,
print_tainted
());
print
_symbol
(
"TPC: <%s>
\n
"
,
regs
->
tpc
);
print
k
(
"TPC: <%pS>
\n
"
,
(
void
*
)
regs
->
tpc
);
printk
(
"g0: %016lx g1: %016lx g2: %016lx g3: %016lx
\n
"
,
regs
->
u_regs
[
0
],
regs
->
u_regs
[
1
],
regs
->
u_regs
[
2
],
regs
->
u_regs
[
3
]);
...
...
@@ -245,7 +244,7 @@ void __show_regs(struct pt_regs * regs)
printk
(
"o4: %016lx o5: %016lx sp: %016lx ret_pc: %016lx
\n
"
,
regs
->
u_regs
[
12
],
regs
->
u_regs
[
13
],
regs
->
u_regs
[
14
],
regs
->
u_regs
[
15
]);
print
_symbol
(
"RPC: <%s>
\n
"
,
regs
->
u_regs
[
15
]);
print
k
(
"RPC: <%pS>
\n
"
,
(
void
*
)
regs
->
u_regs
[
15
]);
show_regwindow
(
regs
);
#ifdef CONFIG_SMP
spin_unlock
(
&
regdump_lock
);
...
...
@@ -346,9 +345,6 @@ static void sysrq_handle_globreg(int key, struct tty_struct *tty)
{
struct
thread_info
*
tp
=
current_thread_info
();
struct
pt_regs
*
regs
=
get_irq_regs
();
#ifdef CONFIG_KALLSYMS
char
buffer
[
KSYM_SYMBOL_LEN
];
#endif
unsigned
long
flags
;
int
this_cpu
,
cpu
;
...
...
@@ -377,17 +373,13 @@ static void sysrq_handle_globreg(int key, struct tty_struct *tty)
gp
->
tstate
,
gp
->
tpc
,
gp
->
tnpc
,
((
tp
&&
tp
->
task
)
?
tp
->
task
->
comm
:
"NULL"
),
((
tp
&&
tp
->
task
)
?
tp
->
task
->
pid
:
-
1
));
#ifdef CONFIG_KALLSYMS
if
(
gp
->
tstate
&
TSTATE_PRIV
)
{
sprint_symbol
(
buffer
,
gp
->
tpc
);
printk
(
" TPC[%s] "
,
buffer
);
sprint_symbol
(
buffer
,
gp
->
o7
);
printk
(
"O7[%s] "
,
buffer
);
sprint_symbol
(
buffer
,
gp
->
i7
);
printk
(
"I7[%s]
\n
"
,
buffer
);
}
else
#endif
{
printk
(
" TPC[%pS] O7[%pS] I7[%pS]
\n
"
,
(
void
*
)
gp
->
tpc
,
(
void
*
)
gp
->
o7
,
(
void
*
)
gp
->
i7
);
}
else
{
printk
(
" TPC[%lx] O7[%lx] I7[%lx]
\n
"
,
gp
->
tpc
,
gp
->
o7
,
gp
->
i7
);
}
...
...
arch/sparc64/kernel/traps.c
View file @
4fe3ebec
/* arch/sparc64/kernel/traps.c
*
* Copyright (C) 1995,1997 David S. Miller (davem@davemloft.net)
* Copyright (C) 1995,1997
,2008
David S. Miller (davem@davemloft.net)
* Copyright (C) 1997,1999,2000 Jakub Jelinek (jakub@redhat.com)
*/
...
...
@@ -11,7 +11,6 @@
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/kallsyms.h>
#include <linux/signal.h>
#include <linux/smp.h>
#include <linux/mm.h>
...
...
@@ -74,7 +73,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p)
i
+
1
,
p
->
trapstack
[
i
].
tstate
,
p
->
trapstack
[
i
].
tpc
,
p
->
trapstack
[
i
].
tnpc
,
p
->
trapstack
[
i
].
tt
);
print
_symbol
(
"TRAPLOG: TPC<%s>
\n
"
,
p
->
trapstack
[
i
].
tpc
);
print
k
(
"TRAPLOG: TPC<%pS>
\n
"
,
(
void
*
)
p
->
trapstack
[
i
].
tpc
);
}
}
...
...
@@ -1081,7 +1080,7 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in
regs
->
tpc
,
regs
->
tnpc
,
regs
->
u_regs
[
UREG_I7
],
regs
->
tstate
);
printk
(
"%s"
"ERROR(%d): "
,
(
recoverable
?
KERN_WARNING
:
KERN_CRIT
),
smp_processor_id
());
print
_symbol
(
"TPC<%s>
\n
"
,
regs
->
tpc
);
print
k
(
"TPC<%pS>
\n
"
,
(
void
*
)
regs
->
tpc
);
printk
(
"%s"
"ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s
\n
"
,
(
recoverable
?
KERN_WARNING
:
KERN_CRIT
),
smp_processor_id
(),
(
afsr
&
CHAFSR_M_SYNDROME
)
>>
CHAFSR_M_SYNDROME_SHIFT
,
...
...
@@ -1689,7 +1688,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs)
smp_processor_id
(),
(
type
&
0x1
)
?
'I'
:
'D'
,
regs
->
tpc
);
print
_symbol
(
KERN_EMERG
"TPC<%s>
\n
"
,
regs
->
tpc
);
print
k
(
KERN_EMERG
"TPC<%pS>
\n
"
,
(
void
*
)
regs
->
tpc
);
panic
(
"Irrecoverable Cheetah+ parity error."
);
}
...
...
@@ -1697,7 +1696,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs)
smp_processor_id
(),
(
type
&
0x1
)
?
'I'
:
'D'
,
regs
->
tpc
);
print
_symbol
(
KERN_WARNING
"TPC<%s>
\n
"
,
regs
->
tpc
);
print
k
(
KERN_WARNING
"TPC<%pS>
\n
"
,
(
void
*
)
regs
->
tpc
);
}
struct
sun4v_error_entry
{
...
...
@@ -1904,9 +1903,10 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl)
printk
(
KERN_EMERG
"SUN4V-ITLB: Error at TPC[%lx], tl %d
\n
"
,
regs
->
tpc
,
tl
);
print
_symbol
(
KERN_EMERG
"SUN4V-ITLB: TPC<%s>
\n
"
,
regs
->
tpc
);
print
k
(
KERN_EMERG
"SUN4V-ITLB: TPC<%pS>
\n
"
,
(
void
*
)
regs
->
tpc
);
printk
(
KERN_EMERG
"SUN4V-ITLB: O7[%lx]
\n
"
,
regs
->
u_regs
[
UREG_I7
]);
print_symbol
(
KERN_EMERG
"SUN4V-ITLB: O7<%s>
\n
"
,
regs
->
u_regs
[
UREG_I7
]);
printk
(
KERN_EMERG
"SUN4V-ITLB: O7<%pS>
\n
"
,
(
void
*
)
regs
->
u_regs
[
UREG_I7
]);
printk
(
KERN_EMERG
"SUN4V-ITLB: vaddr[%lx] ctx[%lx] "
"pte[%lx] error[%lx]
\n
"
,
sun4v_err_itlb_vaddr
,
sun4v_err_itlb_ctx
,
...
...
@@ -1927,9 +1927,10 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl)
printk
(
KERN_EMERG
"SUN4V-DTLB: Error at TPC[%lx], tl %d
\n
"
,
regs
->
tpc
,
tl
);
print
_symbol
(
KERN_EMERG
"SUN4V-DTLB: TPC<%s>
\n
"
,
regs
->
tpc
);
print
k
(
KERN_EMERG
"SUN4V-DTLB: TPC<%pS>
\n
"
,
(
void
*
)
regs
->
tpc
);
printk
(
KERN_EMERG
"SUN4V-DTLB: O7[%lx]
\n
"
,
regs
->
u_regs
[
UREG_I7
]);
print_symbol
(
KERN_EMERG
"SUN4V-DTLB: O7<%s>
\n
"
,
regs
->
u_regs
[
UREG_I7
]);
printk
(
KERN_EMERG
"SUN4V-DTLB: O7<%pS>
\n
"
,
(
void
*
)
regs
->
u_regs
[
UREG_I7
]);
printk
(
KERN_EMERG
"SUN4V-DTLB: vaddr[%lx] ctx[%lx] "
"pte[%lx] error[%lx]
\n
"
,
sun4v_err_dtlb_vaddr
,
sun4v_err_dtlb_ctx
,
...
...
@@ -2111,10 +2112,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
fp
=
ksp
+
STACK_BIAS
;
thread_base
=
(
unsigned
long
)
tp
;
printk
(
"Call Trace:"
);
#ifdef CONFIG_KALLSYMS
printk
(
"
\n
"
);
#endif
printk
(
"Call Trace:
\n
"
);
do
{
struct
sparc_stackf
*
sf
;
struct
pt_regs
*
regs
;
...
...
@@ -2137,12 +2135,8 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
fp
=
(
unsigned
long
)
sf
->
fp
+
STACK_BIAS
;
}
printk
(
" [%016lx] "
,
pc
);
print_symbol
(
"%s
\n
"
,
pc
);
printk
(
" [%016lx] %pS
\n
"
,
pc
,
(
void
*
)
pc
);
}
while
(
++
count
<
16
);
#ifndef CONFIG_KALLSYMS
printk
(
"
\n
"
);
#endif
}
void
dump_stack
(
void
)
...
...
@@ -2211,9 +2205,8 @@ void die_if_kernel(char *str, struct pt_regs *regs)
while
(
rw
&&
count
++
<
30
&&
is_kernel_stack
(
current
,
rw
))
{
printk
(
"Caller[%016lx]"
,
rw
->
ins
[
7
]);
print_symbol
(
": %s"
,
rw
->
ins
[
7
]);
printk
(
"
\n
"
);
printk
(
"Caller[%016lx]: %pS
\n
"
,
rw
->
ins
[
7
],
(
void
*
)
rw
->
ins
[
7
]);
rw
=
kernel_stack_up
(
rw
);
}
...
...
arch/sparc64/kernel/unaligned.c
View file @
4fe3ebec
...
...
@@ -2,7 +2,7 @@
* unaligned.c: Unaligned load/store trap handling with special
* cases for the kernel to do them more quickly.
*
* Copyright (C) 1996
David S. Miller (davem@caip.rutgers.edu
)
* Copyright (C) 1996
,2008 David S. Miller (davem@davemloft.net
)
* Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
*/
...
...
@@ -20,7 +20,6 @@
#include <asm/uaccess.h>
#include <linux/smp.h>
#include <linux/bitops.h>
#include <linux/kallsyms.h>
#include <asm/fpumacro.h>
/* #define DEBUG_MNA */
...
...
@@ -289,8 +288,8 @@ static void log_unaligned(struct pt_regs *regs)
if
(
count
<
5
)
{
last_time
=
jiffies
;
count
++
;
printk
(
"Kernel unaligned access at TPC[%lx]
"
,
regs
->
tpc
);
print_symbol
(
"%s
\n
"
,
regs
->
tpc
);
printk
(
"Kernel unaligned access at TPC[%lx]
%pS
\n
"
,
regs
->
tpc
,
(
void
*
)
regs
->
tpc
);
}
}
...
...
arch/sparc64/mm/fault.c
View file @
4fe3ebec
/*
* arch/sparc64/mm/fault.c: Page fault handlers for the 64-bit Sparc.
*
* Copyright (C) 1996
David S. Miller (davem@caip.rutgers.edu
)
* Copyright (C) 1996
, 2008 David S. Miller (davem@davemloft.net
)
* Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz)
*/
...
...
@@ -18,7 +18,6 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kprobes.h>
#include <linux/kallsyms.h>
#include <linux/kdebug.h>
#include <asm/page.h>
...
...
@@ -115,7 +114,7 @@ static void bad_kernel_pc(struct pt_regs *regs, unsigned long vaddr)
printk
(
KERN_CRIT
"OOPS: Bogus kernel PC [%016lx] in fault handler
\n
"
,
regs
->
tpc
);
printk
(
KERN_CRIT
"OOPS: RPC [%016lx]
\n
"
,
regs
->
u_regs
[
15
]);
print
_symbol
(
"RPC: <%s>
\n
"
,
regs
->
u_regs
[
15
]);
print
k
(
"OOPS: RPC <%pS>
\n
"
,
(
void
*
)
regs
->
u_regs
[
15
]);
printk
(
KERN_CRIT
"OOPS: Fault was to vaddr[%lx]
\n
"
,
vaddr
);
dump_stack
();
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