1. 11 7月, 2018 6 次提交
  2. 22 5月, 2018 1 次提交
    • M
      arm_pmu: simplify arm_pmu::handle_irq · 0788f1e9
      Mark Rutland 提交于
      The arm_pmu::handle_irq() callback has the same prototype as a generic
      IRQ handler, taking the IRQ number and a void pointer argument which it
      must convert to an arm_pmu pointer.
      
      This means that all arm_pmu::handle_irq() take an IRQ number they never
      use, and all must explicitly cast the void pointer to an arm_pmu
      pointer.
      
      Instead, let's change arm_pmu::handle_irq to take an arm_pmu pointer,
      allowing these casts to be removed. The redundant IRQ number parameter
      is also removed.
      Suggested-by: NHoeun Ryu <hoeun.ryu@lge.com>
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      0788f1e9
  3. 20 2月, 2018 1 次提交
    • M
      arm64: perf: correct PMUVer probing · 0331365e
      Mark Rutland 提交于
      The ID_AA64DFR0_EL1.PMUVer field doesn't follow the usual ID registers
      scheme. While value 0xf indicates a non-architected PMU is implemented,
      values 0x1 to 0xe indicate an increasingly featureful architected PMU,
      as if the field were unsigned.
      
      For more details, see ARM DDI 0487C.a, D10.1.4, "Alternative ID scheme
      used for the Performance Monitors Extension version".
      
      Currently, we treat the field as signed, and erroneously bail out for
      values 0x8 to 0xe. Let's correct that.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Reviewed-by: NRobin Murphy <robin.murphy@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      0331365e
  4. 07 2月, 2018 1 次提交
  5. 01 12月, 2017 1 次提交
  6. 11 8月, 2017 4 次提交
  7. 09 8月, 2017 1 次提交
  8. 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
  9. 30 5月, 2017 1 次提交
  10. 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
  11. 28 4月, 2017 1 次提交
  12. 25 4月, 2017 1 次提交
  13. 11 4月, 2017 2 次提交
  14. 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
  15. 17 9月, 2016 3 次提交
  16. 09 9月, 2016 1 次提交
  17. 22 8月, 2016 1 次提交
  18. 25 4月, 2016 6 次提交
  19. 29 3月, 2016 1 次提交
  20. 01 3月, 2016 2 次提交
  21. 19 2月, 2016 3 次提交