powerpc: Endian safe trampoline
Create a trampoline that works in either endian and flips to the expected endian. Use it for primary and secondary thread entry as well as RTAS and OF call return. Credit for finding the magic instruction goes to Paul Mackerras Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
此提交包含在:
@@ -68,6 +68,7 @@ _stext:
|
||||
_GLOBAL(__start)
|
||||
/* NOP this out unconditionally */
|
||||
BEGIN_FTR_SECTION
|
||||
FIXUP_ENDIAN
|
||||
b .__start_initialization_multiplatform
|
||||
END_FTR_SECTION(0, 1)
|
||||
|
||||
@@ -115,6 +116,7 @@ __run_at_load:
|
||||
*/
|
||||
.globl __secondary_hold
|
||||
__secondary_hold:
|
||||
FIXUP_ENDIAN
|
||||
#ifndef CONFIG_PPC_BOOK3E
|
||||
mfmsr r24
|
||||
ori r24,r24,MSR_RI
|
||||
@@ -205,6 +207,7 @@ _GLOBAL(generic_secondary_thread_init)
|
||||
* as SCOM before entry).
|
||||
*/
|
||||
_GLOBAL(generic_secondary_smp_init)
|
||||
FIXUP_ENDIAN
|
||||
mr r24,r3
|
||||
mr r25,r4
|
||||
|
||||
|
新增問題並參考
封鎖使用者