diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2015-03-31 15:47:01 +0800 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-04-01 12:16:37 +1100 |
commit | 2e3a9d32ca23e52b764d71bc82bd4dc9fed08342 (patch) | |
tree | a08c4dd47f1e9261b3767fd6c1428c2d8757b404 | |
parent | efc1ddab688720063a882f0939e9c6eff91387b1 (diff) | |
download | skiboot-2e3a9d32ca23e52b764d71bc82bd4dc9fed08342.zip skiboot-2e3a9d32ca23e52b764d71bc82bd4dc9fed08342.tar.gz skiboot-2e3a9d32ca23e52b764d71bc82bd4dc9fed08342.tar.bz2 |
external/opal-prd: Use link register for cross-endian branch
With the change to the official switch_endian system call, we lost
preservation of the counter across the system call.
This change uses the LR instead. It's preserved across the system call,
and is going to be overwritten by the branch-and-link instruction
anyway.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | external/opal-prd/thunk.S | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/external/opal-prd/thunk.S b/external/opal-prd/thunk.S index 773df26..ab1e737 100644 --- a/external/opal-prd/thunk.S +++ b/external/opal-prd/thunk.S @@ -47,15 +47,15 @@ call_be: ld %r2,8(%r11) #endif - mtctr %r0 + mtlr %r0 #if __BYTE_ORDER == __LITTLE_ENDIAN /* Switch to the "other endian" */ li %r0,__NR_switch_endian sc - /* Branch to CTR */ - .long 0x2104804e /* (byteswapped bctrl) */ + /* Branch to LR */ + .long 0x2100804e /* (byteswapped blrl) */ /* Switch endian back */ .long 0x00000038 | le_si16(__NR_switch_endian) |