MIPS, Perf-events: Work with the new callchain interface
MIPS, Perf-events: Work with the new callchain interface

This is the MIPS part of the following commits by Frederic Weisbecker:

- f72c1a931e311bb7780fee19e41a89ac42cab50e
    perf: Factorize callchain context handling

    Store the kernel and user contexts from the generic layer instead
    of archs, this gathers some repetitive code.

- 56962b4449af34070bb1994621ef4f0265eed4d8
    perf: Generalize some arch callchain code

    - Most archs use one callchain buffer per cpu, except x86 that needs
      to deal with NMIs. Provide a default perf_callchain_buffer()
      implementation that x86 overrides.

    - Centralize all the kernel/user regs handling and invoke new arch
      handlers from there: perf_callchain_user() / perf_callchain_kernel()
      That avoid all the user_mode(), current->mm checks and so...

    - Invert some parameters in perf_callchain_*() helpers: entry to the
      left, regs to the right, following the traditional (dst, src).

- 70791ce9ba68a5921c9905ef05d23f62a90bc10c
    perf: Generalize callchain_store()

    callchain_store() is the same on every archs, inline it in
    perf_event.h and rename it to perf_callchain_store() to avoid
    any collision.

    This removes repetitive code.

- c1a65932fd7216fdc9a0db8bbffe1d47842f862c
    perf: Drop unappropriate tests on arch callchains

    Drop the TASK_RUNNING test on user tasks for callchains as
    this check doesn't seem to make any sense.

    Also remove the tests for !current that is not supposed to
    happen and current->pid as this should be handled at the
    generic level, with exclude_idle attribute.

Reported-by: Wu Zhangjin <0f93e24a900c64af20f0433e44e890fcc03d0233@gmail.com>
Acked-by: Frederic Weisbecker <e8a1bf9163cb25e93cfd6540f223b3872ea7ee55@gmail.com>
Acked-by: David Daney <0662de36cfb0706ed279bff52abef14720945acc@caviumnetworks.com>
Signed-off-by: Deng-Cheng Zhu <6450bd59f6a4396d6c98d1ea08e75894ab0b4cda@gmail.com>
To: 645ca7d3a8d3d4f60557176cd361ea8351edc32b@chello.nl
To: b913f13ef92ac157955c954ccaaff7be065faba4@arm.com
Cc: 562397917b9a8bf316569a848858b12fb417723f@linux-mips.org
Cc: 2578944098299abf708b08eff6fcf60565553586@vger.kernel.org
Cc: 19a0ba370c443ba08d20b5061586430ab449ee8c@samba.org
Cc: 9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@elte.hu
Cc: 293abb6b76d7791c0732cc517d38c4b5c734b87f@redhat.com
Cc: 6450bd59f6a4396d6c98d1ea08e75894ab0b4cda@gmail.com
Cc: 1fa2ef4755a9226cb9a0a4840bd89b158ac71391@console-pimps.org
Cc: 38a867ea26f35d3eeb42270f1bc7b9d1d135e6a2@mvista.com
Patchwork: http://patchwork.linux-mips.org/patch/2014/
Signed-off-by: Ralf Baechle <92f48d309cda194c8eda36aa8f9ae28c488fa208@linux-mips.org>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas