All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec/s390: Replace clgfi with cghi
@ 2013-03-15 12:46 Michael Holzheu
  2013-03-15 15:57 ` Simon Horman
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Holzheu @ 2013-03-15 12:46 UTC (permalink / raw)
  To: kexec

The clgfi instruction needs at least z9 machine level. To allow kexec-tools
compiled also with z900, this patch replaces clgfi with the older cghi
instruction.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
---
 purgatory/arch/s390/setup-s390.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: kexec-tools-2.0.3/purgatory/arch/s390/setup-s390.S
===================================================================
--- kexec-tools-2.0.3.orig/purgatory/arch/s390/setup-s390.S
+++ kexec-tools-2.0.3/purgatory/arch/s390/setup-s390.S
@@ -16,7 +16,7 @@ purgatory_start:
 	larl	%r15,lstack_end
 	aghi	%r15,-160
 
-	clgfi	%r2,0
+	cghi	%r2,0
 	je	verify_checksums
 
 	brasl	%r14,purgatory


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* Re: [PATCH] kexec/s390: Replace clgfi with cghi
  2013-03-15 12:46 [PATCH] kexec/s390: Replace clgfi with cghi Michael Holzheu
@ 2013-03-15 15:57 ` Simon Horman
  2013-03-15 17:25   ` Michael Holzheu
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2013-03-15 15:57 UTC (permalink / raw)
  To: Michael Holzheu; +Cc: kexec

On Fri, Mar 15, 2013 at 01:46:32PM +0100, Michael Holzheu wrote:
> The clgfi instruction needs at least z9 machine level. To allow kexec-tools
> compiled also with z900, this patch replaces clgfi with the older cghi
> instruction.

Hi,

could you update the changelog to include a brief description of the
difference between the two instructions - I assume they work the same
way in the context of this change.

> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
> ---
>  purgatory/arch/s390/setup-s390.S |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: kexec-tools-2.0.3/purgatory/arch/s390/setup-s390.S
> ===================================================================
> --- kexec-tools-2.0.3.orig/purgatory/arch/s390/setup-s390.S
> +++ kexec-tools-2.0.3/purgatory/arch/s390/setup-s390.S
> @@ -16,7 +16,7 @@ purgatory_start:
>  	larl	%r15,lstack_end
>  	aghi	%r15,-160
>  
> -	clgfi	%r2,0
> +	cghi	%r2,0
>  	je	verify_checksums
>  
>  	brasl	%r14,purgatory
> 
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
> 

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* Re: [PATCH] kexec/s390: Replace clgfi with cghi
  2013-03-15 15:57 ` Simon Horman
@ 2013-03-15 17:25   ` Michael Holzheu
  2013-03-15 20:08     ` Simon Horman
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Holzheu @ 2013-03-15 17:25 UTC (permalink / raw)
  To: Simon Horman; +Cc: kexec

Hello Simon,

From the "Principles of Operations" (the s390 bible):

The first operand is compared with the second operand, and the result
is indicated in the condition code.

For COMPARE LOGICAL IMMEDIATE (CLGFI), the first operand is treated as
64 bits, and the second operand is treated as 32 bits with 32 zeros
appended on the left.

This instruction works with 32 bit immediate values.

For COMPARE HALFWORD IMMEDIATE (CGHI), the first operand is treated as
a 64-bit signed binary integer.

This instruction works only with 16 bit immediate values.

See:

http://pic.dhe.ibm.com/infocenter/ratdevz/v8r0/topic/com.ibm.tpf.toolkit.hlasm.doc/dz9zr006.pdf

Because I only want to check against zero the two instructions will
have the same effect in the purgatory code.

Michael


On Fri, 15 Mar 2013 16:57:33 +0100
Simon Horman <horms@verge.net.au> wrote:

> On Fri, Mar 15, 2013 at 01:46:32PM +0100, Michael Holzheu wrote:
> > The clgfi instruction needs at least z9 machine level. To allow
> > kexec-tools compiled also with z900, this patch replaces clgfi with
> > the older cghi instruction.
> 
> Hi,
> 
> could you update the changelog to include a brief description of the
> difference between the two instructions - I assume they work the same
> way in the context of this change.
> 
> > Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
> > ---
> >  purgatory/arch/s390/setup-s390.S |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Index: kexec-tools-2.0.3/purgatory/arch/s390/setup-s390.S
> > ===================================================================
> > --- kexec-tools-2.0.3.orig/purgatory/arch/s390/setup-s390.S
> > +++ kexec-tools-2.0.3/purgatory/arch/s390/setup-s390.S
> > @@ -16,7 +16,7 @@ purgatory_start:
> >  	larl	%r15,lstack_end
> >  	aghi	%r15,-160
> >  
> > -	clgfi	%r2,0
> > +	cghi	%r2,0
> >  	je	verify_checksums
> >  
> >  	brasl	%r14,purgatory
> > 
> > 
> > _______________________________________________
> > kexec mailing list
> > kexec@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/kexec
> > 
> 


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* Re: [PATCH] kexec/s390: Replace clgfi with cghi
  2013-03-15 17:25   ` Michael Holzheu
@ 2013-03-15 20:08     ` Simon Horman
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2013-03-15 20:08 UTC (permalink / raw)
  To: Michael Holzheu; +Cc: kexec

On Fri, Mar 15, 2013 at 06:25:49PM +0100, Michael Holzheu wrote:
> Hello Simon,
> 
> From the "Principles of Operations" (the s390 bible):
> 
> The first operand is compared with the second operand, and the result
> is indicated in the condition code.
> 
> For COMPARE LOGICAL IMMEDIATE (CLGFI), the first operand is treated as
> 64 bits, and the second operand is treated as 32 bits with 32 zeros
> appended on the left.
> 
> This instruction works with 32 bit immediate values.
> 
> For COMPARE HALFWORD IMMEDIATE (CGHI), the first operand is treated as
> a 64-bit signed binary integer.
> 
> This instruction works only with 16 bit immediate values.
> 
> See:
> 
> http://pic.dhe.ibm.com/infocenter/ratdevz/v8r0/topic/com.ibm.tpf.toolkit.hlasm.doc/dz9zr006.pdf
> 
> Because I only want to check against zero the two instructions will
> have the same effect in the purgatory code.

Thanks. I have applied the change.

> Michael
> 
> 
> On Fri, 15 Mar 2013 16:57:33 +0100
> Simon Horman <horms@verge.net.au> wrote:
> 
> > On Fri, Mar 15, 2013 at 01:46:32PM +0100, Michael Holzheu wrote:
> > > The clgfi instruction needs at least z9 machine level. To allow
> > > kexec-tools compiled also with z900, this patch replaces clgfi with
> > > the older cghi instruction.
> > 
> > Hi,
> > 
> > could you update the changelog to include a brief description of the
> > difference between the two instructions - I assume they work the same
> > way in the context of this change.
> > 
> > > Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
> > > ---
> > >  purgatory/arch/s390/setup-s390.S |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > Index: kexec-tools-2.0.3/purgatory/arch/s390/setup-s390.S
> > > ===================================================================
> > > --- kexec-tools-2.0.3.orig/purgatory/arch/s390/setup-s390.S
> > > +++ kexec-tools-2.0.3/purgatory/arch/s390/setup-s390.S
> > > @@ -16,7 +16,7 @@ purgatory_start:
> > >  	larl	%r15,lstack_end
> > >  	aghi	%r15,-160
> > >  
> > > -	clgfi	%r2,0
> > > +	cghi	%r2,0
> > >  	je	verify_checksums
> > >  
> > >  	brasl	%r14,purgatory
> > > 
> > > 
> > > _______________________________________________
> > > kexec mailing list
> > > kexec@lists.infradead.org
> > > http://lists.infradead.org/mailman/listinfo/kexec
> > > 
> > 
> 

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

end of thread, other threads:[~2013-03-15 20:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-15 12:46 [PATCH] kexec/s390: Replace clgfi with cghi Michael Holzheu
2013-03-15 15:57 ` Simon Horman
2013-03-15 17:25   ` Michael Holzheu
2013-03-15 20:08     ` Simon Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.