linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* RFC: generic vector unit support?
@ 2002-10-03 21:20 Kumar Gala
  2002-10-03 21:31 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Kumar Gala @ 2002-10-03 21:20 UTC (permalink / raw)
  To: linuxppc-dev


In added in the context switching code for the signal processing engine
on the e500 core I noticed that a fair amount of the code matched what
is being down for altivec.

SPE is a 64-bit wide vector engine on the e500 core (it extends the GPR
register file).

I was wondering if it would make sense to change the altivec code to be
more generic and have the SPE code and AltiVec code share the same
functions.  It is not possible to have both AltiVec and SPE in the same
processor (they share opcode space).

Changes would include:
CONFIG_ALTIVEC/CONFIG_SPE -> CONFIG_VECTOR
(we would still have some CONFIG_ALTIVEC/CONFIG_SPE for altivec/spe
specific handling)

last_task_used_altivec -> last_task_used_vector
giveup_altivec -> giveup_vector
dump_altivec -> dump_vector
enable_kernel_altivec -> enable_kernel_vector

I am not sure about what to do about ptrace.  We extended the interface
to have two new request types (PTRACE_GETVRREGS, PTRACE_SETVRREGS)
which return the full altivec state (all registers, vscr, vrsave).  We
could overload these request types to return all the 'vector' state
depending on which processor we are.  This would mean debuggers would
have to know which processor we are to know how big of a buffer to have
for ptrace calls, the memory layout, etc.

We also extend generic vector idea to allow dumping of altivec/SPE
register state into core files (which we do not do currently).

If we think this is the way to go, I will make a set of patches for the
2.4devel and 2.5 trees.

thanks

- kumar


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: RFC: generic vector unit support?
  2002-10-03 21:20 RFC: generic vector unit support? Kumar Gala
@ 2002-10-03 21:31 ` Daniel Jacobowitz
  2002-10-04 17:49   ` Kumar Gala
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2002-10-03 21:31 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev


On Thu, Oct 03, 2002 at 04:20:14PM -0500, Kumar Gala wrote:
> I am not sure about what to do about ptrace.  We extended the interface
> to have two new request types (PTRACE_GETVRREGS, PTRACE_SETVRREGS)
> which return the full altivec state (all registers, vscr, vrsave).  We
> could overload these request types to return all the 'vector' state
> depending on which processor we are.  This would mean debuggers would
> have to know which processor we are to know how big of a buffer to have
> for ptrace calls, the memory layout, etc.

I'd rather see you do it the other way around:  Add PTRACE_GETSPEREGS
in the e500, so that the debugger can use ptrace to figure out which
registers are available.

> We also extend generic vector idea to allow dumping of altivec/SPE
> register state into core files (which we do not do currently).

That's a great idea.  Again, I think Altivec and SPE registers should
be tagged differently even though they can't coexist.

Otherwise, it sounds like a good idea to me.

--
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: RFC: generic vector unit support?
  2002-10-03 21:31 ` Daniel Jacobowitz
@ 2002-10-04 17:49   ` Kumar Gala
  0 siblings, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2002-10-04 17:49 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: linuxppc-dev


On Thursday, October 3, 2002, at 04:31  PM, Daniel Jacobowitz wrote:

> On Thu, Oct 03, 2002 at 04:20:14PM -0500, Kumar Gala wrote:
>> I am not sure about what to do about ptrace.  We extended the
>> interface
>> to have two new request types (PTRACE_GETVRREGS, PTRACE_SETVRREGS)
>> which return the full altivec state (all registers, vscr, vrsave).  We
>> could overload these request types to return all the 'vector' state
>> depending on which processor we are.  This would mean debuggers would
>> have to know which processor we are to know how big of a buffer to
>> have
>> for ptrace calls, the memory layout, etc.
>
> I'd rather see you do it the other way around:  Add PTRACE_GETSPEREGS
> in the e500, so that the debugger can use ptrace to figure out which
> registers are available.

This seems reasonable, make life easier on the debugger.

>
>> We also extend generic vector idea to allow dumping of altivec/SPE
>> register state into core files (which we do not do currently).
>
> That's a great idea.  Again, I think Altivec and SPE registers should
> be tagged differently even though they can't coexist.

I was thinking, by doing this we can add a dump_vector into the generic
code that handles the creation of core files.

- kumar


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2002-10-04 17:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-03 21:20 RFC: generic vector unit support? Kumar Gala
2002-10-03 21:31 ` Daniel Jacobowitz
2002-10-04 17:49   ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).