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
49834586
Commit
49834586
authored
Jun 23, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://ppc.bkbits.net/for-linus-ppc
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
00121eaa
d9084455
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
17 deletions
+26
-17
arch/ppc/kernel/entry.S
arch/ppc/kernel/entry.S
+8
-3
arch/ppc/kernel/process.c
arch/ppc/kernel/process.c
+13
-12
include/asm-ppc/hardirq.h
include/asm-ppc/hardirq.h
+0
-2
include/asm-ppc/ptrace.h
include/asm-ppc/ptrace.h
+2
-0
include/asm-ppc/thread_info.h
include/asm-ppc/thread_info.h
+3
-0
No files found.
arch/ppc/kernel/entry.S
View file @
49834586
...
...
@@ -173,8 +173,10 @@ _GLOBAL(DoSyscall)
cmpli
0
,
r0
,
NR_syscalls
bge
-
66
f
rlwinm
r10
,
r1
,
0
,
0
,
18
/*
current_thread_info
()
*/
lwz
r10
,
TI_FLAGS
(
r10
)
andi
.
r10
,
r10
,
_TIF_SYSCALL_TRACE
lwz
r11
,
TI_FLAGS
(
r10
)
rlwinm
r11
,
r11
,
0
,
~
_TIF_FORCE_NOERROR
stw
r11
,
TI_FLAGS
(
r10
)
andi
.
r11
,
r11
,
_TIF_SYSCALL_TRACE
bne
-
syscall_dotrace
syscall_dotrace_cont
:
lis
r10
,
sys_call_table
@
h
...
...
@@ -192,7 +194,11 @@ ret_from_syscall:
mr
r6
,
r3
li
r11
,-
_LAST_ERRNO
cmpl
0
,
r3
,
r11
rlwinm
r12
,
r1
,
0
,
0
,
18
/*
current_thread_info
()
*/
blt
+
30
f
lwz
r11
,
TI_FLAGS
(
r12
)
andi
.
r11
,
r11
,
_TIF_FORCE_NOERROR
bne
30
f
neg
r3
,
r3
cmpi
0
,
r3
,
ERESTARTNOHAND
bne
22
f
...
...
@@ -205,7 +211,6 @@ ret_from_syscall:
30
:
LOAD_MSR_KERNEL
(
r10
,
MSR_KERNEL
)
/*
doesn
't include MSR_EE */
SYNC
MTMSRD
(
r10
)
rlwinm
r12
,
r1
,
0
,
0
,
18
/*
current_thread_info
()
*/
lwz
r9
,
TI_FLAGS
(
r12
)
andi
.
r0
,
r9
,(
_TIF_SYSCALL_TRACE|_TIF_SIGPENDING|_TIF_NEED_RESCHED
)
bne
-
syscall_exit_work
...
...
arch/ppc/kernel/process.c
View file @
49834586
...
...
@@ -69,8 +69,6 @@ struct task_struct init_task = INIT_TASK(init_task);
/* only used to get secondary processor up */
struct
task_struct
*
current_set
[
NR_CPUS
]
=
{
&
init_task
,
};
static
void
show_tsk_stack
(
struct
task_struct
*
tsk
,
unsigned
long
sp
);
#undef SHOW_TASK_SWITCHES
#undef CHECK_STACK
...
...
@@ -296,7 +294,7 @@ void show_regs(struct pt_regs * regs)
break
;
}
printk
(
"
\n
"
);
show_
tsk_stack
(
current
,
regs
->
gpr
[
1
]);
show_
stack
(
current
,
(
unsigned
long
*
)
regs
->
gpr
[
1
]);
}
void
exit_thread
(
void
)
...
...
@@ -494,26 +492,29 @@ int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
return
error
;
}
void
show_trace_task
(
struct
task_struct
*
tsk
)
{
show_tsk_stack
(
tsk
,
tsk
->
thread
.
ksp
);
}
void
dump_stack
(
void
)
{
show_
tsk_stack
(
current
,
_get_SP
()
);
show_
stack
(
current
,
NULL
);
}
static
void
show_tsk_stack
(
struct
task_struct
*
tsk
,
unsigned
long
sp
)
void
show_stack
(
struct
task_struct
*
tsk
,
unsigned
long
*
stack
)
{
unsigned
long
stack_top
,
prev_sp
,
ret
;
unsigned
long
s
p
,
s
tack_top
,
prev_sp
,
ret
;
int
count
=
0
;
unsigned
long
next_exc
=
0
;
struct
pt_regs
*
regs
;
extern
char
ret_from_except
,
ret_from_except_full
,
ret_from_syscall
;
sp
=
(
unsigned
long
)
stack
;
if
(
tsk
==
NULL
)
return
;
tsk
=
current
;
if
(
sp
==
0
)
{
if
(
tsk
==
current
)
asm
(
"mr %0,1"
:
"=r"
(
sp
));
else
sp
=
tsk
->
thread
.
ksp
;
}
prev_sp
=
(
unsigned
long
)
(
tsk
->
thread_info
+
1
);
stack_top
=
(
unsigned
long
)
tsk
->
thread_info
+
THREAD_SIZE
;
while
(
count
<
16
&&
sp
>
prev_sp
&&
sp
<
stack_top
&&
(
sp
&
3
)
==
0
)
{
...
...
include/asm-ppc/hardirq.h
View file @
49834586
...
...
@@ -104,7 +104,5 @@ do { \
extern
void
synchronize_irq
(
unsigned
int
irq
);
#endif
/* CONFIG_SMP */
extern
void
show_stack
(
unsigned
long
*
sp
);
#endif
/* __ASM_HARDIRQ_H */
#endif
/* __KERNEL__ */
include/asm-ppc/ptrace.h
View file @
49834586
...
...
@@ -49,6 +49,8 @@ struct pt_regs {
#define instruction_pointer(regs) ((regs)->nip)
#define user_mode(regs) (((regs)->msr & MSR_PR) != 0)
#define force_successful_syscall_return() set_thread_flag(TIF_FORCE_NOERROR)
/*
* We use the least-significant bit of the trap field to indicate
* whether we have saved the full set of registers, or only a
...
...
include/asm-ppc/thread_info.h
View file @
49834586
...
...
@@ -86,6 +86,8 @@ static inline struct thread_info *current_thread_info(void)
#define TIF_NEED_RESCHED 3
/* rescheduling necessary */
#define TIF_POLLING_NRFLAG 4
/* true if poll_idle() is polling
TIF_NEED_RESCHED */
#define TIF_FORCE_NOERROR 5
/* don't return error from current
syscall even if result < 0 */
/* as above, but as bit values */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
...
...
@@ -93,6 +95,7 @@ static inline struct thread_info *current_thread_info(void)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_FORCE_NOERROR (1<<TIF_FORCE_NOERROR)
#endif
/* __KERNEL__ */
...
...
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