1. 07 2月, 2018 1 次提交
  2. 01 12月, 2017 1 次提交
  3. 11 8月, 2017 4 次提交
  4. 09 8月, 2017 1 次提交
  5. 08 8月, 2017 1 次提交
    • P
      arm64: perf: Allow more than one cycle counter to be used · 1031a159
      Pratyush Anand 提交于
      Currently:
      $ perf stat -e cycles:u -e cycles:k  true
      
       Performance counter stats for 'true':
      
                2,24,699      cycles:u
           <not counted>      cycles:k	(0.00%)
      
             0.000788087 seconds time elapsed
      
      We can not count more than one cycle counter in one instance,because we
      allow to map cycle counter into PMCCNTR_EL0 only. However, if I did not
      miss anything then specification do not prohibit to use PMEVCNTR<n>_EL0
      for cycle count as well.
      
      Modify the code so that it still prefers to use PMCCNTR_EL0 for cycle
      counter, however allow to use PMEVCNTR<n>_EL0 if PMCCNTR_EL0 is already
      in use.
      
      After this patch:
      
      $ perf stat -e cycles:u -e cycles:k   true
      
       Performance counter stats for 'true':
      
                2,17,310      cycles:u
                7,40,009      cycles:k
      
             0.000764149 seconds time elapsed
      Signed-off-by: NPratyush Anand <panand@redhat.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      1031a159
  6. 30 5月, 2017 1 次提交
  7. 16 5月, 2017 1 次提交
    • G
      arm64: perf: Ignore exclude_hv when kernel is running in HYP · 78a19cfd
      Ganapatrao Kulkarni 提交于
      commit d98ecdac ("arm64: perf: Count EL2 events if the kernel is
      running in HYP") returns -EINVAL when perf system call perf_event_open is
      called with exclude_hv != exclude_kernel. This change breaks applications
      on VHE enabled ARMv8.1 platforms. The issue was observed with HHVM
      application, which calls perf_event_open with exclude_hv = 1 and
      exclude_kernel = 0.
      
      There is no separate hypervisor privilege level when VHE is enabled, the
      host kernel runs at EL2. So when VHE is enabled, we should ignore
      exclude_hv from the application. This behaviour is consistent with PowerPC
      where the exclude_hv is ignored when the hypervisor is not present and with
      x86 where this flag is ignored.
      Signed-off-by: NGanapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
      [will: added comment to justify the behaviour of exclude_hv]
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      78a19cfd
  8. 28 4月, 2017 1 次提交
  9. 25 4月, 2017 1 次提交
  10. 11 4月, 2017 2 次提交
  11. 18 11月, 2016 1 次提交
    • W
      KVM: arm64: Fix the issues when guest PMCCFILTR is configured · b112c84a
      Wei Huang 提交于
      KVM calls kvm_pmu_set_counter_event_type() when PMCCFILTR is configured.
      But this function can't deals with PMCCFILTR correctly because the evtCount
      bits of PMCCFILTR, which is reserved 0, conflits with the SW_INCR event
      type of other PMXEVTYPER<n> registers. To fix it, when eventsel == 0, this
      function shouldn't return immediately; instead it needs to check further
      if select_idx is ARMV8_PMU_CYCLE_IDX.
      
      Another issue is that KVM shouldn't copy the eventsel bits of PMCCFILTER
      blindly to attr.config. Instead it ought to convert the request to the
      "cpu cycle" event type (i.e. 0x11).
      
      To support this patch and to prevent duplicated definitions, a limited
      set of ARMv8 perf event types were relocated from perf_event.c to
      asm/perf_event.h.
      
      Cc: stable@vger.kernel.org # 4.6+
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NWei Huang <wei@redhat.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      b112c84a
  12. 17 9月, 2016 3 次提交
  13. 09 9月, 2016 1 次提交
  14. 22 8月, 2016 1 次提交
  15. 25 4月, 2016 6 次提交
  16. 29 3月, 2016 1 次提交
  17. 01 3月, 2016 2 次提交
  18. 19 2月, 2016 4 次提交
  19. 22 12月, 2015 2 次提交
  20. 21 12月, 2015 1 次提交
    • L
      arm64: kernel: enforce pmuserenr_el0 initialization and restore · 60792ad3
      Lorenzo Pieralisi 提交于
      The pmuserenr_el0 register value is architecturally UNKNOWN on reset.
      Current kernel code resets that register value iff the core pmu device is
      correctly probed in the kernel. On platforms with missing DT pmu nodes (or
      disabled perf events in the kernel), the pmu is not probed, therefore the
      pmuserenr_el0 register is not reset in the kernel, which means that its
      value retains the reset value that is architecturally UNKNOWN (system
      may run with eg pmuserenr_el0 == 0x1, which means that PMU counters access
      is available at EL0, which must be disallowed).
      
      This patch adds code that resets pmuserenr_el0 on cold boot and restores
      it on core resume from shutdown, so that the pmuserenr_el0 setup is
      always enforced in the kernel.
      
      Cc: <stable@vger.kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      60792ad3
  21. 17 11月, 2015 2 次提交
  22. 07 10月, 2015 2 次提交