1. 30 8月, 2017 1 次提交
    • P
      MIPS: Abstract CPU core & VP(E) ID access through accessor functions · f875a832
      Paul Burton 提交于
      We currently have fields in struct cpuinfo_mips for the core & VP(E) ID
      of a particular CPU, and various pieces of code directly access those
      fields. This patch abstracts such access by introducing accessor
      functions cpu_core(), cpu_set_core(), cpu_vpe_id() & cpu_set_vpe_id()
      and having code that needs to access these values call those functions
      rather than directly accessing the struct cpuinfo_mips fields. This
      prepares us for changes to the way in which those values are stored in
      later patches.
      
      The cpu_vpe_id() function is introduced even though we already had a
      cpu_vpe_id() macro for a couple of reasons:
      
        1) It's more consistent with the core, and future cluster, accessors.
      
        2) It ensures a sensible return type without explicit casts.
      
        3) It's generally preferable to use functions rather than macros.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17009/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      f875a832
  2. 14 2月, 2017 1 次提交
    • J
      MIPS: Unify perf counter register definitions · 2654294b
      James Hogan 提交于
      Unify definitions for MIPS performance counter register fields in
      mipsregs.h rather than duplicating them in perf_events and oprofile.
      This will allow future patches to use them to expose performance
      counters to KVM guests.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Robert Richter <rric@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: oprofile-list@lists.sf.net
      Patchwork: https://patchwork.linux-mips.org/patch/15212/Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      2654294b
  3. 13 5月, 2016 1 次提交
    • J
      MIPS: Add perf counter feature · 30228c40
      James Hogan 提交于
      Add CPU feature for standard MIPS r2 performance counters, as determined
      by the Config1.PC bit. Both perf_events and oprofile probe this bit, so
      lets combine the probing and change both to use cpu_has_perf.
      
      This will also be used for VZ support in KVM to know whether performance
      counters exist which can be exposed to guests.
      
      [ralf@linux-mips.org: resolve conflict.]
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Robert Richter <rric@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: oprofile-list@lists.sf.net
      Patchwork: https://patchwork.linux-mips.org/patch/13226/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      30228c40
  4. 26 8月, 2015 1 次提交
  5. 01 4月, 2015 1 次提交
  6. 31 3月, 2015 3 次提交
  7. 24 11月, 2014 1 次提交
    • A
      MIPS: Add hook to get C0 performance counter interrupt · a669efc4
      Andrew Bresticker 提交于
      The hardware perf event driver and oprofile interpret the global
      cp0_perfcount_irq differently: in the hardware perf event driver
      it is an offset from MIPS_CPU_IRQ_BASE and in oprofile it is the
      actual IRQ number.  This still works most of the time since
      MIPS_CPU_IRQ_BASE is usually 0, but is clearly wrong.  Since the
      performance counter interrupt may vary from platform to platform
      like the C0 timer interrupt, add the optional get_c0_perfcount_int
      hook which returns the IRQ number of the performance counter.
      The hook should return < 0 if the performance counter interrupt is
      shared with the timer.  If the hook is not present, the CPU vector
      reported in C0_IntCtl (cp0_perfcount_irq) is used.
      Signed-off-by: NAndrew Bresticker <abrestic@chromium.org>
      Reviewed-by: NQais Yousef <qais.yousef@imgtec.com>
      Tested-by: NQais Yousef <qais.yousef@imgtec.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: Jeffrey Deans <jeffrey.deans@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Qais Yousef <qais.yousef@imgtec.com>
      Cc: Jonas Gorski <jogo@openwrt.org>
      Cc: John Crispin <blogic@openwrt.org>
      Cc: David Daney <ddaney.cavm@gmail.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/7805/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      a669efc4
  8. 27 3月, 2014 2 次提交
  9. 07 3月, 2014 1 次提交
  10. 23 1月, 2014 2 次提交
  11. 05 8月, 2013 1 次提交
    • R
      MIPS: oprofile: Fix BUG due to smp_processor_id() in preemptible code. · cf5b2d23
      Ralf Baechle 提交于
      current_cpu_type() is not preemption-safe.
      If CONFIG_PREEMPT is enabled then mipsxx_reg_setup() can be called from preemptible state.
      Added get_cpu()/put_cpu() pair to make it preemption-safe.
      
      This was found while testing oprofile with CONFIG_DEBUG_PREEMPT enable.
      
      /usr/zntestsuite # opcontrol --init
      /usr/zntestsuite # opcontrol --setup --event=L2_CACHE_ACCESSES:500 --event=L2_CACHE_MISSES:500 --no-vmlinux
      /usr/zntestsuite # opcontrol --start
      Using 2.6+ OProfile kernel interface.
      BUG: using smp_processor_id() in preemptible [00000000] code: oprofiled/1362
      caller is mipsxx_reg_setup+0x11c/0x164
      CPU: 0 PID: 1362 Comm: oprofiled Not tainted 3.10.4 #18
      Stack : 00000006 70757465 00000000 00000000 00000000 00000000 80b173f6 00000037
                80b10000 00000000 80b21614 88f5a220 00000000 00000000 00000000 00000000
                00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
                00000000 00000000 00000000 89c49c00 89c49c2c 80721254 807b7927 8012c1d0
                80b10000 80721254 00000000 00000552 88f5a220 80b1335c 807b78e6 89c49ba8
                ...
      Call Trace:
      [<801099a4>] show_stack+0x64/0x7c
      [<80665520>] dump_stack+0x20/0x2c
      [<803a2250>] debug_smp_processor_id+0xe0/0xf0
      [<8052df24>] mipsxx_reg_setup+0x11c/0x164
      [<8052cd70>] op_mips_setup+0x24/0x4c
      [<80529cfc>] oprofile_setup+0x5c/0x12c
      [<8052b9f8>] event_buffer_open+0x78/0xf8
      [<801c3150>] do_dentry_open.isra.15+0x2b8/0x3b0
      [<801c3270>] finish_open+0x28/0x4c
      [<801d49b8>] do_last.isra.41+0x2cc/0xd00
      [<801d54a0>] path_openat+0xb4/0x4c4
      [<801d5c44>] do_filp_open+0x3c/0xac
      [<801c4744>] do_sys_open+0x110/0x1f4
      [<8010f47c>] stack_done+0x20/0x44
      
      Bug reported and original patch by Jerin Jacob <jerinjacobk@gmail.com>.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NJerin Jacob <jerinjacobk@gmail.com>
      cf5b2d23
  12. 08 5月, 2013 1 次提交
  13. 17 2月, 2013 1 次提交
  14. 01 2月, 2013 1 次提交
  15. 09 11月, 2012 1 次提交
  16. 23 7月, 2012 2 次提交
  17. 07 7月, 2012 1 次提交
  18. 15 5月, 2012 1 次提交
  19. 16 7月, 2008 1 次提交
  20. 12 5月, 2008 1 次提交
  21. 29 4月, 2008 2 次提交
  22. 29 1月, 2008 1 次提交
  23. 07 12月, 2007 1 次提交
  24. 12 10月, 2007 2 次提交
  25. 15 6月, 2007 1 次提交
  26. 25 4月, 2007 1 次提交
  27. 14 3月, 2007 1 次提交
  28. 05 3月, 2007 1 次提交
  29. 30 11月, 2006 1 次提交
  30. 31 10月, 2006 2 次提交
  31. 08 10月, 2006 1 次提交
  32. 14 7月, 2006 1 次提交