Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1326393 > unrolled thread

Re: [RFC] perf: fix building for ARCv1

Started byVineet Gupta <Vineet.Gupta1@synopsys.com>
First post2016-02-04 05:20 +0100
Last post2016-02-05 12:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC] perf: fix building for ARCv1 Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-02-04 05:20 +0100
    Re: [RFC] perf: fix building for ARCv1 Noam Camus <noamc@ezchip.com> - 2016-02-05 12:20 +0100

#1326393 — Re: [RFC] perf: fix building for ARCv1

FromVineet Gupta <Vineet.Gupta1@synopsys.com>
Date2016-02-04 05:20 +0100
SubjectRe: [RFC] perf: fix building for ARCv1
Message-ID<qYjyG-3ys-1@gated-at.bofh.it>
+CC Noam

On Wednesday 03 February 2016 09:50 PM, Alexey Brodkin wrote:
>> I agree with the current solution to add -atomic to for arc700 builds.
>> > Although making that default for arc700 tools will be better but that will not fix
>> > things before next release of tools etc.
>> > 
>> > But we *do* need to improve generic solution
>> > 1. Add atomics detection in perf to add fall back arch stubs
>> > 2. ARC needs to add syscall for facilitating atomic r-m-w !
> So the most recent ARC GNU tools (2015.12) were just released yesterday
> and still atomics are disabled by default for ARCv1.
> That means perf will continue to fail on building for now.
> 
> Do you think we may apply my initial fix to 4.5 while it is in development and
> then to stable trees as well?

Noam, what's the atomic story for EZChip. Do you support such things for user
space in GNU tools. If -atomic is added to perf user space builds are you guys OK!

-Vineet

[toc] | [next] | [standalone]


#1327610

FromNoam Camus <noamc@ezchip.com>
Date2016-02-05 12:20 +0100
Message-ID<qYMAG-7S6-17@gated-at.bofh.it>
In reply to#1326393

________________________________________
>From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
>Sent: Thursday, February 4, 2016 6:13 AM
>Noam, what's the atomic story for EZChip. Do you support such things for user
space in GNU tools. If -atomic is added to perf user space builds are you guys OK!

Well here for EZchip I also see the:
undefined reference to `__sync_add_and_fetch_4'
undefined reference to `__sync_sub_and_fetch_4'

This is since at file tools/include/asm/atomic.h we use the generic implementation
If for ARC I could use just like x86 my own header file then functions like:
atomic_inc()
atomic_dec_and_test()
Are easy to implement and you may see an example for such atomic methods in my patch set for the new platform.

You however wants to use some GCC flag -matomic which I assume somehow will implement the above __sync*.
I can't find the implementation but if it uses LLSC then it won't work for me since I am not supporting LLSC.

So seem that either I have my own header at kernel or that I need to change the GCC implementation for __sync* to use my atomic instructions.
I am personally tend to the x86 solution and not the generic one since changing GCC will require to have new compiler dependency.
 
-Noam

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web