Our CPUidle state save restore has some bugs which are triggered for an ETM with
system instructions (e.g. ETE). This is a series of fixes to address them.
Changes since v1:
- Fix inverted check for drvdata->csdev for Patch 1 (Yabin)
- Remove Data trace register access macro cases (Mike Leach)
- Fix QFILT field definition (Yabin)
- (New patch) Fix Resource pair register access, reported-by Yabin
Suzuki K Poulose (4):
coresight: etm4x: Do not hardcode IOMEM access for register restore
coresight: etm4x: Do not save/restore Data trace control registers
coresight: etm4x: Safe access for TRCQCLTR
coresight: etm4x: Fix access to resource selector registers
.../coresight/coresight-etm4x-core.c | 26 +++++++++-------
drivers/hwtracing/coresight/coresight-etm4x.h | 31 ++-----------------
2 files changed, 17 insertions(+), 40 deletions(-)
--
2.34.1
This moves remaining AMBA ACPI devices into respective platform drivers for
enabling ACPI based power management support. This series applies on latest
coresight next. This series has been built, and boot tested on a DT based
(RB5) and ACPI supported coresight platform (N1SDP).
https://git.gitlab.arm.com/linux-arm/linux-anshuman.git (amba_other_acpi_migration_v7)
Cc: Lorenzo Pieralisi <lpieralisi(a)kernel.org>
Cc: Sudeep Holla <sudeep.holla(a)arm.com>
Cc: Suzuki K Poulose <suzuki.poulose(a)arm.com>
Cc: Mike Leach <mike.leach(a)linaro.org>
Cc: James Clark <james.clark(a)arm.com>
Cc: Maxime Coquelin <mcoquelin.stm32(a)gmail.com>
Cc: Alexandre Torgue <alexandre.torgue(a)foss.st.com>
Cc: linux-acpi(a)vger.kernel.org
Cc: linux-arm-kernel(a)lists.infradead.org
Cc: linux-kernel(a)vger.kernel.org
Cc: coresight(a)lists.linaro.org
Cc: linux-stm32(a)st-md-mailman.stormreply.com
Changes in V7:
- Dropped reduntant 'drvdata' check in following functions
replicator_platform_remove()
funnel_platform_remove()
tpiu_platform_remove()
tmc_platform_remove()
catu_platform_remove()
catu_platform_probe()
debug_platform_remove()
debug_platform_probe()
- Dropped struct resource check before devm_ioremap_resource()
- Sorted the headers in alphabetic order
Changes in V6:
https://lore.kernel.org/all/20240312102318.2285165-1-anshuman.khandual@arm.…
- Dropped Jame's RB tag from [PATCH 3/11]
- Added clk_disable_unprepare() for pclk in replicator_probe() error path
- Added clk_disable_unprepare() for pclk in funnel_probe() error path
- Added clk_put() for pclk in catu_platform_probe() error path
- Added clk_put() for pclk in debug_platform_probe() error path
- Added WARN_ON(!drvdata) check in replicator_platform_remove()
- Added WARN_ON(!drvdata) check in funnel_platform_remove()
- Added WARN_ON(!drvdata) check in catu_platform_remove()
- Added WARN_ON(!drvdata) check in tpiu_platform_remove()
- Added WARN_ON(!drvdata) check in tmc_platform_remove()
- Added WARN_ON(!drvdata) check in stm_platform_remove()
- Added WARN_ON(!drvdata) check in debug_platform_remove()
- Added additional elements for all acpi_device_id[] updates
Changes in V5:
https://lore.kernel.org/all/20240222082142.3663983-1-anshuman.khandual@arm.…
- Used table->mask to filter out bits from pid in coresight_get_uci_data_from_amba()
- Dropped custom masks such as STM_AMBA_MASK and TMC_AMBA_MASK
- Modified tmc_etr_setup_caps() to accept struct csdev_access argument
- Reverted back tmc_etr_setup_caps() call site position in tmc_probe()
- Changed replicator and funnel devices to use the new helpers earlier in series
- Updated the commit messages regarding xxx_probe() refactoring and renaming
Changes in V4:
https://lore.kernel.org/all/20240123054608.1790189-1-anshuman.khandual@arm.…
- Fixed PM imbalance in etm4_probe() error path with pm_runtime_disable()
- Restored back the pm_runtime_disable() on platform probe error paths
in replicator, funnel, catu, tpiu, tmc and stm devices
- Dropped dev_caps argument from __tmc_probe()
- Changed xxxx_platform_remove() for platform_driver->remove_new() callback
Changes in V3:
https://lore.kernel.org/all/20231208053939.42901-1-anshuman.khandual@arm.co…
- Split coresight_init_driver/remove_driver() helpers into a separate patch
- Added 'drvdata->pclk' comments in replicator, funnel, tpiu, tmc, and stm devices
- Updated funnel, and replicator drivers to use these new helpers
- Check for drvdata instead of drvdata->pclk in suspend and resume paths in catu,
tmc and debug devices
- Added patch to extract device name from AMBA pid based table lookup for stm
- Added patch to extract device properties from AMBA pid based table look for tmc
- Dropped pm_runtime_put() from common __probe() functions
- Handled pm_runtime_put() in AMBA driver in success path
- Handled pm_runtime_put() in platform driver in both success and error paths
Changes in V2:
https://lore.kernel.org/all/20231201062053.1268492-1-anshuman.khandual@arm.…
- Dropped redundant devm_ioremap_resource() hunk from tmc_platform_probe()
- Defined coresight_[init|remove]_driver() for both AMBA/platform drivers
- Changed catu, tmc, tpiu, stm and debug coresight drivers to use the new
helpers avoiding build issues arising from module_amba_driver(), and
module_platform_driver() being on the same file
Changes in V1:
https://lore.kernel.org/all/20231027072943.3418997-1-anshuman.khandual@arm.…
- Replaced all IS_ERR() instances with IS_ERR_OR_NULL() as per Suzuki
Changes in RFC:
https://lore.kernel.org/all/20230921042040.1334641-1-anshuman.khandual@arm.…
Anshuman Khandual (11):
coresight: etm4x: Fix unbalanced pm_runtime_enable()
coresight: stm: Extract device name from AMBA pid based table lookup
coresight: tmc: Extract device properties from AMBA pid based table lookup
coresight: Add helpers registering/removing both AMBA and platform drivers
coresight: replicator: Move ACPI support from AMBA driver to platform driver
coresight: funnel: Move ACPI support from AMBA driver to platform driver
coresight: catu: Move ACPI support from AMBA driver to platform driver
coresight: tpiu: Move ACPI support from AMBA driver to platform driver
coresight: tmc: Move ACPI support from AMBA driver to platform driver
coresight: stm: Move ACPI support from AMBA driver to platform driver
coresight: debug: Move ACPI support from AMBA driver to platform driver
drivers/acpi/arm64/amba.c | 8 -
drivers/hwtracing/coresight/coresight-catu.c | 138 +++++++++++++---
drivers/hwtracing/coresight/coresight-catu.h | 1 +
drivers/hwtracing/coresight/coresight-core.c | 29 ++++
.../hwtracing/coresight/coresight-cpu-debug.c | 138 ++++++++++++++--
.../coresight/coresight-etm4x-core.c | 3 +
.../hwtracing/coresight/coresight-funnel.c | 87 +++++-----
drivers/hwtracing/coresight/coresight-priv.h | 10 ++
.../coresight/coresight-replicator.c | 82 +++++-----
drivers/hwtracing/coresight/coresight-stm.c | 116 +++++++++++--
.../hwtracing/coresight/coresight-tmc-core.c | 154 +++++++++++++++---
drivers/hwtracing/coresight/coresight-tmc.h | 2 +
drivers/hwtracing/coresight/coresight-tpiu.c | 117 +++++++++++--
include/linux/coresight.h | 7 +
14 files changed, 726 insertions(+), 166 deletions(-)
--
2.25.1
Funnel can support multi-port output in our hardware design. Since original
funnels only support a single output connection, the code needs to be
modified to support this new feature. The following is a typical topology
diagram of multi-port output of the funnels.
|---------| |---------| |---------| |---------| |---------|
| TPDM0 | | TPDM1 | | TPDM2 | | TPDM3 | | TPDM4 |
|---------| |---------| |---------| |---------| |---------|
| | | | |
| | | | |
| | | | |
|-----| |-----| |-----| |-----| |
| | | | |
| | | | |
[0]| |[1] [0]| |[1] |
\-------------/ \-------------/ \-------------/
\ FUNNEL0 / \ FUNNEL1 / \ FUNNEL2 /
----------- ----------- -----------
[0]| |[1] [0]| |[1] |
| |---------- | | |
| | | | |
|-------| | |------- | | |--------- |
| | | | |
| | | | |
[0]| |[1] |[2] |[3] |[4]
\ ---------------------------------------------------/
\ TPDA0 /
\ /
------------------------------------------------
For example, TPDM0 and TPDM1 are connected to the [0] and [1] input ports
of the funnel respectively, and output from the [0] and [1] output ports.
In this way, when data is output from the Funnel's output port, it needs
to know the source component corresponding to this output port. Our
solution is to add a property named "label" in the devicetree to mark the
source corresponding to the output port.
After introducing this new feature, another new problem also needs to be
solved. For example, TPDA driver will search for all the TPDMs on a input
port. In the topology diagram above, when TPDA searches for TPDM from the
input port[0], it will find TPDM0 and TPDM1. Our solution is to add a new
property named "qcom,tpda-input-port" to mark the input port number of the
TPDA in the devicetree.
Tao Zhang (4):
dt-bindings: arm: qcom,coresight-funnel: Add label for multi-ouput
coresight: Add support for multiple output ports on the funnel
dt-bindings: arm: qcom,coresight-tpdm: Mark tpda input port number
coresight-tpda: Add support multi-port input on TPDA
.../arm/arm,coresight-dynamic-funnel.yaml | 34 +++++++-
.../bindings/arm/qcom,coresight-tpdm.yaml | 8 ++
drivers/hwtracing/coresight/coresight-core.c | 81 ++++++++++++++++---
.../hwtracing/coresight/coresight-platform.c | 5 ++
drivers/hwtracing/coresight/coresight-tpda.c | 27 ++++++-
include/linux/coresight.h | 2 +
6 files changed, 139 insertions(+), 18 deletions(-)
--
2.17.1
These tests record in a mode that includes kernel trace but look for
samples of a userspace process. This makes them sensitive to any kernel
compilation options that increase the amount of time spent in the
kernel. If the trace buffer is completely filled before userspace is
reached then the test will fail. Double the buffer size to fix this.
The other tests in the same file aren't sensitive to this for various
reasons, for example the iterate devices test filters by userspace
trace only. But in order to keep coverage of all the modes, increase the
buffer size rather than filtering by userspace for the basic tests.
Fixes: d1efa4a0a696 ("perf cs-etm: Add separate decode paths for timeless and per-thread modes")
Signed-off-by: James Clark <james.clark(a)arm.com>
---
tools/perf/tests/shell/test_arm_coresight.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/tests/shell/test_arm_coresight.sh b/tools/perf/tests/shell/test_arm_coresight.sh
index 65dd85207125..3302ea0b9672 100755
--- a/tools/perf/tests/shell/test_arm_coresight.sh
+++ b/tools/perf/tests/shell/test_arm_coresight.sh
@@ -188,7 +188,7 @@ arm_cs_etm_snapshot_test() {
arm_cs_etm_basic_test() {
echo "Recording trace with '$*'"
- perf record -o ${perfdata} "$@" -- ls > /dev/null 2>&1
+ perf record -o ${perfdata} "$@" -m,8M -- ls > /dev/null 2>&1
perf_script_branch_samples ls &&
perf_report_branch_samples ls &&
--
2.34.1
+ Greg
Hi Krzysztof,
On 30/03/2024 18:00, Krzysztof Kozlowski wrote:
> On 30/03/2024 18:58, Krzysztof Kozlowski wrote:
>>
>> On Tue, 26 Mar 2024 21:23:30 +0100, Krzysztof Kozlowski wrote:
>>> Merging
>>> =======
>>> All further patches depend on the first amba patch, therefore please ack
>>> and this should go via one tree.
>>>
>>> Description
>>> ===========
>>> Modules registering driver with amba_driver_register() often forget to
>>> set .owner field.
>>>
>>> [...]
>>
>> Applied, thanks!
>>
>> [01/19] amba: store owner from modules with amba_driver_register()
>> (no commit info)
>
> Patchset applied here:
> https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt.git/log/?h=fo…
How do you plan to push this ? Given this affects most of the drivers/,
do you plan to send this to Greg ? We have changes in the coresight
tree that would conflict with this "tag" ( I haven't merged them yet,
but is in my local queue). I want to make sure we can avoid the
conflicts. I am happy to merge this to my local tree and base the
changes on this, if this is going in for v6.10 and all are in agreement.
Kind regards
Suzuki
>
> Best regards,
> Krzysztof
>
Our CPUidle state save restore has some bugs which are triggered for an ETM with
system instructions (e.g. ETE). This is a series of fixes to address them.
Suzuki K Poulose (3):
coresight: etm4x: Do not hardcode IOMEM access for register restore
coresight: etm4x: Do not save/restore Data trace control registers
coresight: etm4x: Safe access for TRCQCLTR
.../coresight/coresight-etm4x-core.c | 20 +++++++++----------
drivers/hwtracing/coresight/coresight-etm4x.h | 6 +++---
2 files changed, 13 insertions(+), 13 deletions(-)
--
2.34.1