* Problem with gp
@ 2002-07-31 18:44 Ryan Martindale
2002-07-31 19:04 ` Ralf Baechle
0 siblings, 1 reply; 3+ messages in thread
From: Ryan Martindale @ 2002-07-31 18:44 UTC (permalink / raw)
To: linux-mips
I seem to be having troubles getting the CVS snapshot up and running.
I've debugged it, and it seems that the problem stems from the fact that
$28 (gp) is modified in the SAVE_SOME macro to point to somewhere on the
stack (not sure why this occurs). Anyways, when I get my first system
timetick interrupt, the update_process_times function fails to get the a
valid task structure pointer and wipes out. Why are we adjusting gp
here, since it is explicitly expected to hold only current_thread_info?
(in stackframe.h)
...
.macro SAVE_SOME
...
sw $25, PT_R25(sp)
sw $28, PT_R28(sp)
sw $31, PT_R31(sp)
ori $28, sp, 0x1fff
xori $28, 0x1fff
...
Ryan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem with gp
2002-07-31 18:44 Problem with gp Ryan Martindale
@ 2002-07-31 19:04 ` Ralf Baechle
2002-08-01 0:04 ` Ryan Martindale
0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2002-07-31 19:04 UTC (permalink / raw)
To: Ryan Martindale; +Cc: linux-mips
On Wed, Jul 31, 2002 at 11:44:03AM -0700, Ryan Martindale wrote:
> I seem to be having troubles getting the CVS snapshot up and running.
> I've debugged it, and it seems that the problem stems from the fact that
> $28 (gp) is modified in the SAVE_SOME macro to point to somewhere on the
> stack (not sure why this occurs). Anyways, when I get my first system
> timetick interrupt, the update_process_times function fails to get the a
> valid task structure pointer and wipes out. Why are we adjusting gp
> here, since it is explicitly expected to hold only current_thread_info?
Are you using 2.5 by chance? 2.5.x is currently pretty unstable as I'm
porting all the major changes in the upstream sources to MIPS. I recommend
to stick with 2.4 for now.
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem with gp
2002-07-31 19:04 ` Ralf Baechle
@ 2002-08-01 0:04 ` Ryan Martindale
0 siblings, 0 replies; 3+ messages in thread
From: Ryan Martindale @ 2002-08-01 0:04 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips
Ralf Baechle wrote:
>
> On Wed, Jul 31, 2002 at 11:44:03AM -0700, Ryan Martindale wrote:
>
> > I seem to be having troubles getting the CVS snapshot up and running.
> > I've debugged it, and it seems that the problem stems from the fact that
> > $28 (gp) is modified in the SAVE_SOME macro to point to somewhere on the
> > stack (not sure why this occurs). Anyways, when I get my first system
> > timetick interrupt, the update_process_times function fails to get the a
> > valid task structure pointer and wipes out. Why are we adjusting gp
> > here, since it is explicitly expected to hold only current_thread_info?
>
> Are you using 2.5 by chance? 2.5.x is currently pretty unstable as I'm
> porting all the major changes in the upstream sources to MIPS. I recommend
> to stick with 2.4 for now.
>
> Ralf
Check this patch for the current CVS, please. It seems to solve some of
my problems. The related problem mentionned above was because I adjusted
the KERNEL_STACK_SIZE temporarily to twice its given size. Maybe a
comment that you shouldn't adjust that size in stackframe.h is
appropriate?
Yes, I am using the latest from the CVS tree (2.5). Is everybody
developing with 2.4. Also how quickly are the 2.5 changes going to be
merged into the tree (I understand it is progressing already)?
Index: arch/mips/kernel/process.c
===================================================================
RCS file: /cvs/linux/arch/mips/kernel/process.c,v
retrieving revision 1.41
diff -r1.41 process.c
78c78
< childksp = (unsigned long)p + KERNEL_STACK_SIZE - 32;
---
> childksp = (unsigned long)ti + KERNEL_STACK_SIZE - 32;
100c100
< childregs->regs[28] = (unsigned long) p;
---
> childregs->regs[28] = (unsigned long) ti;
Ryan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-07-31 23:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-31 18:44 Problem with gp Ryan Martindale
2002-07-31 19:04 ` Ralf Baechle
2002-08-01 0:04 ` Ryan Martindale
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox