1. 07 4月, 2021 1 次提交
  2. 12 2月, 2021 1 次提交
    • S
      coresight: etm-perf: Support PID tracing for kernel at EL2 · 88f11864
      Suzuki K Poulose 提交于
      When the kernel is running at EL2, the PID is stored in CONTEXTIDR_EL2.
      So, tracing CONTEXTIDR_EL1 doesn't give us the pid of the process.
      Thus we should trace the VMID with VMIDOPT set to trace CONTEXTIDR_EL2
      instead of CONTEXTIDR_EL1.  Given that we have an existing config
      option "contextid" and this will be useful for tracing virtual machines
      (when we get to support virtualization).
      
      So instead, this patch extends option CTXTID with an extra bit
      ETM_OPT_CTXTID2 (bit 15), thus on an EL2 kernel, we will have another
      bit available for the perf tool: ETM_OPT_CTXTID is for kernel running in
      EL1, ETM_OPT_CTXTID2 is used when kernel runs in EL2 with VHE enabled.
      
      The tool must be backward compatible for users, i.e, "contextid" today
      traces PID and that should remain the same; for this purpose, the perf
      tool is updated to automatically set corresponding bit for the
      "contextid" config, therefore, the user doesn't have to bother which EL
      the kernel is running.
      
        i.e, perf record -e cs_etm/contextid/u --
      
      will always do the "pid" tracing, independent of the kernel EL.
      
      The driver parses the format "contextid", which traces CONTEXTIDR_EL1
      for ETM_OPT_CTXTID (on EL1 kernel) and traces CONTEXTIDR_EL2 for
      ETM_OPT_CTXTID2 (on EL2 kernel).
      
      Besides the enhancement for format "contexid", extra two formats are
      introduced: "contextid1" and "contextid2".  This considers to support
      tracing both CONTEXTIDR_EL1 and CONTEXTIDR_EL2 when the kernel is
      running at EL2.  Finally, the PMU formats are defined as follow:
      
        "contextid1": Available on both EL1 kernel and EL2 kernel.  When the
                      kernel is running at EL1, "contextid1" enables the PID
      		tracing; when the kernel is running at EL2, this enables
      		tracing the PID of guest applications.
      
        "contextid2": Only usable when the kernel is running at EL2.  When
                      selected, enables PID tracing on EL2 kernel.
      
        "contextid":  Will be an alias for the option that enables PID
                      tracing.  I.e,
                      contextid == contextid1, on EL1 kernel.
                      contextid == contextid2, on EL2 kernel.
      
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Al Grant <al.grant@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Reviewed-by: NMike Leach <mike.leach@linaro.org>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      [ Added two config formats: contextid1, contextid2 ]
      Signed-off-by: NLeo Yan <leo.yan@linaro.org>
      Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Link: https://lore.kernel.org/r/20210206150833.42120-4-leo.yan@linaro.org
      Link: https://lore.kernel.org/r/20210211172038.2483517-3-mathieu.poirier@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      88f11864
  3. 05 2月, 2021 23 次提交
  4. 02 2月, 2021 1 次提交
  5. 09 12月, 2020 2 次提交
    • Q
      coresight: etm4x: Modify core-commit to avoid HiSilicon ETM overflow · e7255092
      Qi Liu 提交于
      The ETM device can't keep up with the core pipeline when cpu core
      is at full speed. This may cause overflow within core and its ETM.
      This is a common phenomenon on ETM devices.
      
      On HiSilicon Hip08 platform, a specific feature is added to set
      core pipeline. So commit rate can be reduced manually to avoid ETM
      overflow.
      Reviewed-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NQi Liu <liuqi115@huawei.com>
      [Modified changelog title and Kconfig description]
      Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Link: https://lore.kernel.org/r/20201208182651.1597945-4-mathieu.poirier@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e7255092
    • A
      coresight: remove broken __exit annotations · 45fe7bef
      Arnd Bergmann 提交于
      Functions that are annotated __exit are discarded for built-in drivers,
      but the .remove callback in a device driver must still be kept around
      to allow bind/unbind operations.
      
      There is now a linker warning for the discarded symbol references:
      
      `tmc_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tmc-core.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tmc-core.o
      `tpiu_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tpiu.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tpiu.o
      `etb_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-etb10.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-etb10.o
      `static_funnel_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-funnel.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-funnel.o
      `dynamic_funnel_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-funnel.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-funnel.o
      `static_replicator_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-replicator.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-replicator.o
      `dynamic_replicator_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-replicator.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-replicator.o
      `catu_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-catu.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-catu.o
      
      Remove all those annotations.
      
      Fixes: 8b0cf826 ("coresight: stm: Allow to build coresight-stm as a module")
      Reviewed-by: NStephen Boyd <swboyd@chromium.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Link: https://lore.kernel.org/r/20201208182651.1597945-3-mathieu.poirier@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      45fe7bef
  6. 28 11月, 2020 6 次提交
  7. 29 9月, 2020 2 次提交
  8. 18 9月, 2020 4 次提交