diff options
author | Russell Currey <ruscur@russell.cc> | 2016-03-02 17:12:45 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-04-11 20:30:44 +1000 |
commit | e3824e4281b8e31d55c08a06b20abb4f677a0baf (patch) | |
tree | 35f6fda955c956f9f75e642d941a7787aad97403 /arch/powerpc/include/asm/ppc_asm.h | |
parent | a7ee539584acf4a565b7439ceaea8401ec210353 (diff) | |
download | linux-stable-e3824e4281b8e31d55c08a06b20abb4f677a0baf.tar.gz linux-stable-e3824e4281b8e31d55c08a06b20abb4f677a0baf.tar.bz2 linux-stable-e3824e4281b8e31d55c08a06b20abb4f677a0baf.zip |
powerpc/swsusp: Only use tlbie in POWER4 mode
If CONFIG_HIBERNATION and CONFIG_PPC_BOOK3S_64 are set, code in
arch/powerpc/kernel/swsusp_amd64.S which uses the tlbia macro is enabled.
tlbia in turn uses tlbie, an instruction which takes more than one
operand in newer versions of POWER. As such, the kernel fails to build
due to the assembler complaining about missing operands.
This can be worked around by assembling the instruction as in POWER4.
This fixes the build breakage caused by enabling CONFIG_HIBERNATION.
Hibernation is currently only tested on G5 PowerMacs, which should be
unaffected by this change. For other platforms it may now build,
whether or not it works is a different story.
Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/ppc_asm.h')
-rw-r--r-- | arch/powerpc/include/asm/ppc_asm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h index 499d9f89435a..2b31632376a5 100644 --- a/arch/powerpc/include/asm/ppc_asm.h +++ b/arch/powerpc/include/asm/ppc_asm.h @@ -427,7 +427,10 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601) li r4,1024; \ mtctr r4; \ lis r4,KERNELBASE@h; \ + .machine push; \ + .machine "power4"; \ 0: tlbie r4; \ + .machine pop; \ addi r4,r4,0x1000; \ bdnz 0b #endif |