[PATCH v2 1/4] powerpc/tm: Abort syscalls in active transactions
Michael Ellerman
mpe at ellerman.id.au
Sat Apr 4 20:14:32 AEDT 2015
On Mon, 2015-03-30 at 14:20 +1100, Sam Bobroff wrote:
> @@ -145,6 +146,24 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_SPLPAR)
> andi. r11,r10,_TIF_SYSCALL_DOTRACE
> bne syscall_dotrace
> .Lsyscall_dotrace_cont:
> +#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
> +BEGIN_FTR_SECTION
> + b 1f
> +END_FTR_SECTION_IFCLR(CPU_FTR_TM)
> + extrdi. r11, r12, 1, (63-MSR_TS_T_LG) /* transaction active? */
> + beq+ 1f
> +
> + /* Doom the transaction and don't perform the syscall: */
> + mfmsr r11
> + li r12, 1
> + rldimi r11, r12, MSR_TM_LG, 63-MSR_TM_LG
> + mtmsrd r11, 0
> + li r11, (TM_CAUSE_SYSCALL|TM_CAUSE_PERSISTENT)
> + tabort. r11
TABORT please, otherwise old toolchains can't build it.
cheers
More information about the Linuxppc-dev
mailing list