public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* Re: load-store emulation with SIGSEGV (gate.S bug?)
@ 2003-10-17 15:26 Jeffrey William Lake
  2003-10-17 15:34 ` Keith Owens
  2003-10-17 15:57 ` David Mosberger
  0 siblings, 2 replies; 3+ messages in thread
From: Jeffrey William Lake @ 2003-10-17 15:26 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

After some investigation I discovered that a "flushrs" at the start of my
signal handler cured the problem.

Looking at "arch/ia64/kernel/gate.S" revealed that a "cover" is used to
get the registers onto the backing store (commented as such several
times), but by my understanding there is enough scope from the instruction
description that they may be cached. Therefore, should gate.S include a
"flushrs" as well or, for performance reasons be left for the user to
decide?


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

* Re: load-store emulation with SIGSEGV (gate.S bug?)
  2003-10-17 15:26 load-store emulation with SIGSEGV (gate.S bug?) Jeffrey William Lake
@ 2003-10-17 15:34 ` Keith Owens
  2003-10-17 15:57 ` David Mosberger
  1 sibling, 0 replies; 3+ messages in thread
From: Keith Owens @ 2003-10-17 15:34 UTC (permalink / raw)
  To: linux-ia64

On 17 Oct 2003 15:26:13 -0000, 
Jeffrey William Lake <lakes@lakes.plus.com> wrote:
>After some investigation I discovered that a "flushrs" at the start of my
>signal handler cured the problem.
>
>Looking at "arch/ia64/kernel/gate.S" revealed that a "cover" is used to
>get the registers onto the backing store (commented as such several
>times), but by my understanding there is enough scope from the instruction
>description that they may be cached.

cover only marks the current frame (r32+) as dirty.  It does not write
the dirty registers out to backing store, that is left to RSE to do at
its leisure.  flushrs forces RSE to write the dirty registers out to
memory.

>Therefore, should gate.S include a
>"flushrs" as well or, for performance reasons be left for the user to
>decide?

Probably best left for the user to decide.  The majority of signal
handlers will not require the registers to be flushed.


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

* Re: load-store emulation with SIGSEGV (gate.S bug?)
  2003-10-17 15:26 load-store emulation with SIGSEGV (gate.S bug?) Jeffrey William Lake
  2003-10-17 15:34 ` Keith Owens
@ 2003-10-17 15:57 ` David Mosberger
  1 sibling, 0 replies; 3+ messages in thread
From: David Mosberger @ 2003-10-17 15:57 UTC (permalink / raw)
  To: linux-ia64

>>>>> On 17 Oct 2003 15:26:13 -0000, Jeffrey William Lake <lakes@lakes.plus.com> said:

  Jeffrey> After some investigation I discovered that a "flushrs" at
  Jeffrey> the start of my signal handler cured the problem.

  Jeffrey> Looking at "arch/ia64/kernel/gate.S" revealed that a
  Jeffrey> "cover" is used to get the registers onto the backing store
  Jeffrey> (commented as such several times), but by my understanding
  Jeffrey> there is enough scope from the instruction description that
  Jeffrey> they may be cached. Therefore, should gate.S include a
  Jeffrey> "flushrs" as well or, for performance reasons be left for
  Jeffrey> the user to decide?

There is no need to have a flushrs in gate.S.  If you want to access
the register-backing store in memory, you'll need to do a flushrs
anyhow.  BTW: you could use libunwind to access the registers, as that
would save you from having to know such details.  But of course it may
be a bit overkill (probably not too bad, though).

	--david

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

end of thread, other threads:[~2003-10-17 15:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-17 15:26 load-store emulation with SIGSEGV (gate.S bug?) Jeffrey William Lake
2003-10-17 15:34 ` Keith Owens
2003-10-17 15:57 ` David Mosberger

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