kexec/s390: Replace clgfi with cghi
Subsystems (2)
PATCH 1/1 kexec/s390: Replace clgfi with cghi
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.
--- purgatory/arch/s390/setup-s390.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
purgatory/arch/s390/setup-s390.S +1 -1
@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 3 lines · Michael Holzheu
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.
Quoted 20 lines
Signed-off-by Michael Holzheu <[email protected]>--- 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
===================================================================purgatory/arch/s390/setup-s390.S +1
-1@@ -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
Quoted 5 lines
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/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
Quoted 28 lines · On Fri, 15 Mar 2013 16:57:33 +0100 Simon Horman <[email protected]> wrote:
Quoted 3 lines · Michael Holzheu
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.
Quoted 17 lines
Signed-off-by Michael Holzheu <[email protected]>--- 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
===================================================================purgatory/arch/s390/setup-s390.S +1
-1@@ -16,7 +16,7 @@ purgatory_start: larl %r15,lstack_end aghi %r15,-160 - clgfi %r2,0 + cghi %r2,0 je verify_checksums
Quoted 9 lines
Quoted 8 lines
purgatory/arch/s390/setup-s390.S +0
-0brasl %r14,purgatory_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 16 lines · Michael Holzheu
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.
Quoted 8 lines
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.
Quoted 44 lines
Michael
Quoted 37 lines · On Fri, 15 Mar 2013 16:57:33 +0100 Simon Horman <[email protected]> wrote:
Quoted 3 lines · Michael Holzheu
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.
Quoted 25 lines
Signed-off-by Michael Holzheu <[email protected]>--- 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
===================================================================purgatory/arch/s390/setup-s390.S +1
-1@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec