public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] switch_stack position
@ 2000-12-13  5:03 Keith Owens
  2000-12-14  2:56 ` David Mosberger
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Keith Owens @ 2000-12-13  5:03 UTC (permalink / raw)
  To: linux-ia64

IA64 code assumes that struct switch_stack always follows struct
pt_regs on stack.  This is not always true, unw_init_running() pushes
switch_stack from anywhere, so pt_regs and switch_stack can be
separate.

I am adding support for separate pt_regs and switch_stack by adding
	struct switch_stack *sw;
to struct thread and
	struct switch_stack *prev_sw;
to struct switch_stack.  DO_SAVE_SWITCH_STACK and DO_LOAD_SWITCH_STACK
track the position of the last switch_stack (LIFO), copy_thread sets
prev_sw to NULL for a new process.

Besides fixing the incorrect assumption about the relative placement of
pt_regs and switch_stack, this removes the need for kdb for ia64 to
save switch_stack on every fault.  Instead the switch_stack can be
delayed until we know that kdb is actually going to do some work.  It
is a little more work for kdb to unwind from switch_stack back to the
point that pt_regs was pushed but it will be much faster than
DO_SAVE_SWITCH_STACK on every fault.

Before I spend too much time on this change, is there any obvious
reason why separate pt_regs and switch_stack will not work, as long as
I track where switch_stack is?



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2000-12-14  7:40 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-13  5:03 [Linux-ia64] switch_stack position Keith Owens
2000-12-14  2:56 ` David Mosberger
2000-12-14  3:46 ` Keith Owens
2000-12-14  4:39 ` David Mosberger
2000-12-14  5:13 ` Keith Owens
2000-12-14  6:21 ` David Mosberger
2000-12-14  6:31 ` Keith Owens
2000-12-14  6:36 ` David Mosberger
2000-12-14  6:44 ` Keith Owens
2000-12-14  6:56 ` David Mosberger
2000-12-14  7:08 ` Keith Owens
2000-12-14  7:20 ` David Mosberger
2000-12-14  7:30 ` Keith Owens
2000-12-14  7:40 ` David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox