mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
[PATCH] m68k: task_stack_page()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
097cb338c7
commit
768595ffba
1 changed files with 3 additions and 4 deletions
|
@ -238,10 +238,9 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
|
||||||
{
|
{
|
||||||
struct pt_regs * childregs;
|
struct pt_regs * childregs;
|
||||||
struct switch_stack * childstack, *stack;
|
struct switch_stack * childstack, *stack;
|
||||||
unsigned long stack_offset, *retp;
|
unsigned long *retp;
|
||||||
|
|
||||||
stack_offset = THREAD_SIZE - sizeof(struct pt_regs);
|
childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1;
|
||||||
childregs = (struct pt_regs *) ((unsigned long) (p->thread_info) + stack_offset);
|
|
||||||
|
|
||||||
*childregs = *regs;
|
*childregs = *regs;
|
||||||
childregs->d0 = 0;
|
childregs->d0 = 0;
|
||||||
|
@ -386,7 +385,7 @@ unsigned long get_wchan(struct task_struct *p)
|
||||||
if (!p || p == current || p->state == TASK_RUNNING)
|
if (!p || p == current || p->state == TASK_RUNNING)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
stack_page = (unsigned long)(p->thread_info);
|
stack_page = (unsigned long)task_stack_page(p);
|
||||||
fp = ((struct switch_stack *)p->thread.ksp)->a6;
|
fp = ((struct switch_stack *)p->thread.ksp)->a6;
|
||||||
do {
|
do {
|
||||||
if (fp < stack_page+sizeof(struct thread_info) ||
|
if (fp < stack_page+sizeof(struct thread_info) ||
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue