public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] Don't alloc empty frame in ia64_switch_mode_phys
@ 2006-07-25 23:36 Zou Nan hai
  2006-07-26 15:33 ` Chen, Kenneth W
  2006-07-26 21:08 ` Zou Nan hai
  0 siblings, 2 replies; 3+ messages in thread
From: Zou Nan hai @ 2006-07-25 23:36 UTC (permalink / raw)
  To: linux-ia64


I think ia64_switch_mode_phys and ia64_switch_mode_virt 
does not need to alloc an empty frame. 
An empty frame is required by loadrs but flushrs 
does not need that.

Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>

--- linux-2.6.18-rc2/arch/ia64/kernel/head.S	2006-07-26 11:30:08.000000000 +0800
+++ linux-2.6.18-rc2-fix/arch/ia64/kernel/head.S	2006-07-26 12:26:00.000000000 +0800
@@ -853,7 +853,6 @@ END(__ia64_init_fpu)
  */
 GLOBAL_ENTRY(ia64_switch_mode_phys)
  {
-	alloc r2=ar.pfs,0,0,0,0
 	rsm psr.i | psr.ic		// disable interrupts and interrupt collection
 	mov r15=ip
  }
@@ -902,7 +901,6 @@ END(ia64_switch_mode_phys)
  */
 GLOBAL_ENTRY(ia64_switch_mode_virt)
  {
-	alloc r2=ar.pfs,0,0,0,0
 	rsm psr.i | psr.ic		// disable interrupts and interrupt collection
 	mov r15=ip
  }





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

* RE: [Patch] Don't alloc empty frame in ia64_switch_mode_phys
  2006-07-25 23:36 [Patch] Don't alloc empty frame in ia64_switch_mode_phys Zou Nan hai
@ 2006-07-26 15:33 ` Chen, Kenneth W
  2006-07-26 21:08 ` Zou Nan hai
  1 sibling, 0 replies; 3+ messages in thread
From: Chen, Kenneth W @ 2006-07-26 15:33 UTC (permalink / raw)
  To: linux-ia64

Zou Nan hai wrote on Tuesday, July 25, 2006 4:37 PM
> I think ia64_switch_mode_phys and ia64_switch_mode_virt 
> does not need to alloc an empty frame. 
> An empty frame is required by loadrs but flushrs 
> does not need that.

This patch would make your previous "Do not assume output registers
be reservered" unnecessary, isn't it?  It will automatically solve
the problem you are trying to fix in previous patch.

The real issue to me is that ia64_switch_mode_phys() creates a zero
stack frame before turning off interrupt.  If the zero frame alloc
instruction is removed, the current register stack frame ought to be
safe because they should be preserved by the interrupt return path.


- Ken

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

* RE: [Patch] Don't alloc empty frame in ia64_switch_mode_phys
  2006-07-25 23:36 [Patch] Don't alloc empty frame in ia64_switch_mode_phys Zou Nan hai
  2006-07-26 15:33 ` Chen, Kenneth W
@ 2006-07-26 21:08 ` Zou Nan hai
  1 sibling, 0 replies; 3+ messages in thread
From: Zou Nan hai @ 2006-07-26 21:08 UTC (permalink / raw)
  To: linux-ia64

On Wed, 2006-07-26 at 23:33, Chen, Kenneth W wrote:
> Zou Nan hai wrote on Tuesday, July 25, 2006 4:37 PM
> > I think ia64_switch_mode_phys and ia64_switch_mode_virt 
> > does not need to alloc an empty frame. 
> > An empty frame is required by loadrs but flushrs 
> > does not need that.
> 
> This patch would make your previous "Do not assume output registers
> be reservered" unnecessary, isn't it?  It will automatically solve
> the problem you are trying to fix in previous patch.
> 
  Yes, any individual of the 2 patches will fix the issue. 
  However I still like to fix the "assume output registers to be
preserved issue" in pal.S, because that dose not follow software runtime
convention.

  Zou Nan hai

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

end of thread, other threads:[~2006-07-26 21:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-25 23:36 [Patch] Don't alloc empty frame in ia64_switch_mode_phys Zou Nan hai
2006-07-26 15:33 ` Chen, Kenneth W
2006-07-26 21:08 ` Zou Nan hai

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