coresight: etm4x: Enable ETE device accessed via MMIO
PATCH 1/1 coresight: etm4x: Enable ETE device accessed via MMIO
The ETM4X driver now assume that all ETE as CPU system instructions accessed device, in fact the ETE device on some machines also accessed via MMIO.
--- drivers/hwtracing/coresight/coresight-etm4x-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/hwtracing/coresight/coresight-etm4x-core.c +3 -2
@@ -1103,8 +1103,9 @@ static bool etm4_init_iomem_access(struct etmv4_drvdata *drvdata,* with MMIO. But we cannot touch the OSLK until we are * sure this is an ETM. So rely only on the TRCDEVARCH. */ -if ((devarch &ETM_DEVARCH_ID_MASK ) != ETM_DEVARCH_ETMv4x_ARCH) { -pr_warn_once ("TRCDEVARCH doesn't match ETMv4 architecture\n" ); +if ((devarch &ETM_DEVARCH_ID_MASK ) != ETM_DEVARCH_ETMv4x_ARCH && + (devarch &ETM_DEVARCH_ID_MASK ) !=ETM_DEVARCH_ETE_ARCH ) { +pr_warn_once ("TRCDEVARCH doesn't match ETMv4/ETE architecture\n" );return false; }
Signature · 1 line
2.33.1
Suzuki K Poulose
maintainerQuoted 5 lines · Ruidong Tian
The ETM4X driver now assume that all ETE as CPU system instructions accessed device, in fact the ETE device on some machines also accessed via MMIO.
Signed-off-by Ruidong Tian <[email protected]>
Why are we going backwards to MMIO from system instructions ? Is it because of an "unfriendly" hypervisor preventing access ?
As such, without a sufficiently acceptable explanation, I am reluctant to make this change
Suzuki
Quoted 20 lines
--- drivers/hwtracing/coresight/coresight-etm4x-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/hwtracing/coresight/coresight-etm4x-core.c +3
-2@@ -1103,8 +1103,9 @@ static bool etm4_init_iomem_access(struct etmv4_drvdata *drvdata,* with MMIO. But we cannot touch the OSLK until we are * sure this is an ETM. So rely only on the TRCDEVARCH. */ -if ((devarch &ETM_DEVARCH_ID_MASK ) != ETM_DEVARCH_ETMv4x_ARCH) { -pr_warn_once ("TRCDEVARCH doesn't match ETMv4 architecture\n" ); +if ((devarch &ETM_DEVARCH_ID_MASK ) != ETM_DEVARCH_ETMv4x_ARCH && + (devarch &ETM_DEVARCH_ID_MASK ) !=ETM_DEVARCH_ETE_ARCH ) { +pr_warn_once ("TRCDEVARCH doesn't match ETMv4/ETE architecture\n" );return false; }
Hi Suzuki,
Now ETM4X driver use MMIO or system instruction depends on this check in function etm4_init_csdev_access:
if (drvdata->base)
return etm4_init_iomem_access(drvdata, csa);
This check always true if firmware provides a address range in ACPI table of ETE, and as a result, the ETE device in this case cannot be successfully probed.
I think OS should be compatible with this situation, no matter firmware how to organize ETE information in ACPI table. How do you feel about it?
Thank you
Ruidong Tian
Quoted 27 lines · Suzuki K Poulose
Quoted 5 lines · Ruidong Tian
The ETM4X driver now assume that all ETE as CPU system instructions accessed device, in fact the ETE device on some machines also accessed via MMIO.
Signed-off-by Ruidong Tian <[email protected]>Why are we going backwards to MMIO from system instructions ? Is it because of an "unfriendly" hypervisor preventing access ?
As such, without a sufficiently acceptable explanation, I am reluctant to make this change
Suzuki
Quoted 13 lines
---
drivers/hwtracing/coresight/coresight-etm4x-core.c| 5 +++--1 file changed, 3 insertions(+), 2 deletions(-)drivers/hwtracing/coresight/coresight-etm4x-core.c +0
-0@@ -1103,8 +1103,9 @@ static bool etm4_init_iomem_access(structetmv4_drvdata *drvdata, * with MMIO. But we cannot touch the OSLK until we are * sure this is an ETM. So rely only on the TRCDEVARCH. */
Quoted 8 lines
Quoted 8 lines
drivers/hwtracing/coresight/coresight-etm4x-core.c +3
-2- if ((devarch & ETM_DEVARCH_ID_MASK) != ETM_DEVARCH_ETMv4x_ARCH) { - pr_warn_once("TRCDEVARCH doesn't match ETMv4 architecture\n"); + if ((devarch & ETM_DEVARCH_ID_MASK) != ETM_DEVARCH_ETMv4x_ARCH && + (devarch & ETM_DEVARCH_ID_MASK) != ETM_DEVARCH_ETE_ARCH) { + pr_warn_once("TRCDEVARCH doesn't match ETMv4/ETE architecture\n"); return false;}
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Suzuki K Poulose
maintainerHi
Quoted 7 lines · Ruidong Tian
Hi Suzuki,
Now ETM4X driver use MMIO or system instruction depends on this check in function
etm4_init_csdev_access:if (
drvdata->base)
returnetm4_init_iomem_access(drvdata, csa);
Quoted 7 lines
This check always true if firmware provides a address range in ACPI table of ETE, and as a result, the ETE device in this case cannot be successfully probed.
I think OS should be compatible with this situation, no matter firmware how to organize ETE information in ACPI table. How do you feel about it?
My question is not about "What the patch does". But, why can't we use system instructions on your system, when ETE was designed to be used with that in the first place and get rid of the MMIO.
Suzuki
Quoted 40 lines
Thank you
Ruidong Tian
Quoted 35 lines · Suzuki K Poulose
Quoted 5 lines · Ruidong Tian
The ETM4X driver now assume that all ETE as CPU system instructions accessed device, in fact the ETE device on some machines also accessed via MMIO.
Signed-off-by Ruidong Tian <[email protected]>Why are we going backwards to MMIO from system instructions ? Is it because of an "unfriendly" hypervisor preventing access ?
As such, without a sufficiently acceptable explanation, I am reluctant to make this change
Suzuki
Quoted 21 lines
---
drivers/hwtracing/coresight/coresight-etm4x-core.c| 5 +++--1 file changed, 3 insertions(+), 2 deletions(-)drivers/hwtracing/coresight/coresight-etm4x-core.c +3
-2@@ -1103,8 +1103,9 @@ static bool etm4_init_iomem_access(structetmv4_drvdata *drvdata, * with MMIO. But we cannot touch the OSLK until we are * sure this is an ETM. So rely only on the TRCDEVARCH. */ - if ((devarch & ETM_DEVARCH_ID_MASK) != ETM_DEVARCH_ETMv4x_ARCH) { - pr_warn_once("TRCDEVARCH doesn't match ETMv4 architecture\n"); + if ((devarch & ETM_DEVARCH_ID_MASK) != ETM_DEVARCH_ETMv4x_ARCH && + (devarch & ETM_DEVARCH_ID_MASK) != ETM_DEVARCH_ETE_ARCH) { + pr_warn_once("TRCDEVARCH doesn't match ETMv4/ETE architecture\n"); return false;}
Hi Suzuki
You are right, I review armv9 Spec again, and find that ETE only support system instructions access. This patch is meaningless and need to drop it.
Ruidong
Quoted 65 lines · Suzuki K Poulose
Hi
Quoted 7 lines · Ruidong Tian
Hi Suzuki,
Now ETM4X driver use MMIO or system instruction depends on this check in function
etm4_init_csdev_access:if (
drvdata->base)
returnetm4_init_iomem_access(drvdata, csa);Quoted 7 lines
This check always true if firmware provides a address range in ACPI table of ETE, and as a result, the ETE device in this case cannot be successfully probed.
I think OS should be compatible with this situation, no matter firmware how to organize ETE information in ACPI table. How do you feel about it?
My question is not about "What the patch does". But, why can't we use system instructions on your system, when ETE was designed to be used with that in the first place and get rid of the MMIO.
Suzuki
Quoted 41 lines
Thank you
Ruidong Tian
Quoted 36 lines · Suzuki K Poulose
Quoted 5 lines · Ruidong Tian
The ETM4X driver now assume that all ETE as CPU system instructions accessed device, in fact the ETE device on some machines also accessed via MMIO.
Signed-off-by Ruidong Tian <[email protected]>Why are we going backwards to MMIO from system instructions ? Is it because of an "unfriendly" hypervisor preventing access ?
As such, without a sufficiently acceptable explanation, I am reluctant to make this change
Suzuki
Quoted 22 lines
---
drivers/hwtracing/coresight/coresight-etm4x-core.c| 5 +++--1 file changed, 3 insertions(+), 2 deletions(-)drivers/hwtracing/coresight/coresight-etm4x-core.c +3
-2@@ -1103,8 +1103,9 @@ static bool etm4_init_iomem_access(structetmv4_drvdata *drvdata, * with MMIO. But we cannot touch the OSLK until we are * sure this is an ETM. So rely only on the TRCDEVARCH. */ - if ((devarch & ETM_DEVARCH_ID_MASK) != ETM_DEVARCH_ETMv4x_ARCH) { - pr_warn_once("TRCDEVARCH doesn't match ETMv4 architecture\n"); + if ((devarch & ETM_DEVARCH_ID_MASK) != ETM_DEVARCH_ETMv4x_ARCH && + (devarch & ETM_DEVARCH_ID_MASK) != ETM_DEVARCH_ETE_ARCH) { + pr_warn_once("TRCDEVARCH doesn't match ETMv4/ETE architecture\n");return false;
}