NAK: [PATCH Trusty SRU] powerpc/tm: Abort syscalls in active transactions

Tim Gardner tim.gardner at canonical.com
Fri Jun 10 13:04:02 UTC 2016


On 06/09/2016 11:45 PM, Michael Ellerman wrote:
> On Thu, 2016-06-09 at 21:46 -0600, Tim Gardner wrote:
>> On 06/09/2016 07:05 PM, Michael Ellerman wrote:
>>> On Thu, 2016-06-09 at 11:51 -0600, Tim Gardner wrote:
>>>> Tooolchain issues prevent compilation of this patch. Waiting on new
>>>> backport from IBM.
>>>
>>> Got a bug link? I can't see what in that patch is toolchain dependant?
>>
>> http://bugs.launchpad.net/bugs/1572624
>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1572624/comments/13
>>
>> Yeah, saying it is toolchain related doesn't make sense to me now that I
>> think about it. After all, I'm pretty sure the LTS Utopic version
>> compiled OK. Anyways, I've attached the full build log to the bug report
>> along with the repo and branch containing this patch.
> 
> Ah OK.
> 
>   /home/rtg/ukb/trusty/ppc64el/master-next/ubuntu-trusty/arch/powerpc/include/asm/tm.h:11: Error: unrecognized opcode: `extern'
>   make[3]: *** [arch/powerpc/kernel/entry_64.o] Error 1
> 
> So you're including a header in asm which doesn't have the right #ifdef guards.
> 
> They were added to tm.h in e4e38121507a ("KVM: PPC: Book3S HV: Add transactional
> memory support"), which presumably you don't have?
> 
> So you just need something like:
> 
> diff --git a/arch/powerpc/include/asm/tm.h b/arch/powerpc/include/asm/tm.h
> index 9dfbc34bdbf5..386a3efd3497 100644
> --- a/arch/powerpc/include/asm/tm.h
> +++ b/arch/powerpc/include/asm/tm.h
> @@ -7,6 +7,8 @@
>  
>  #include <uapi/asm/tm.h>
>  
> +#ifndef __ASSEMBLY__
> +
>  #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
>  extern void do_load_up_transact_fpu(struct thread_struct *thread);
>  extern void do_load_up_transact_altivec(struct thread_struct *thread);
> @@ -20,3 +22,5 @@ extern void tm_recheckpoint(struct thread_struct *thread,
>  extern void tm_abort(uint8_t cause);
>  extern void tm_save_sprs(struct thread_struct *thread);
>  extern void tm_restore_sprs(struct thread_struct *thread);
> +
> +#endif /* __ASSEMBLY__ */
> 
> 
> Or the include of asm/tm.h in entry_64.S could become uapi/asm/tm.h, that should
> work, but it's not what upstream does.
> 
> cheers
> 

It seems so simple in retrospect. It was the end of a long day for me. I
went with uapi/asm/tm.h since e4e38121507a brings in a lot of baggage.
Thanks for the help.

rtg

-- 
Tim Gardner tim.gardner at canonical.com




More information about the kernel-team mailing list