linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Question] Question about supporting sysreg only CoreSight ETMv4.4 on ACPI machines
@ 2022-10-18  2:04 Xiongfeng Wang
  2022-10-18  9:18 ` Suzuki Kuruppassery Poulose
  0 siblings, 1 reply; 6+ messages in thread
From: Xiongfeng Wang @ 2022-10-18  2:04 UTC (permalink / raw)
  To: suzuki.poulose
  Cc: yehaiyang2, wanghuiqiang, Linux Kernel Mailing List,
	linux-arm-kernel, mark.rutland, Catalin Marinas

Hi, Suzuki

   We are testing CoreSight ETMv4.4 and TRBE recently. ETMv4.4 obsoletes memory
mapped access to ETM and mandates the system registers. The following commit add
driver for sysreg only devices, but it only support device tree.
  commit 5214b563588e8414193bd7a174c52350256942a6
  coresight: etm4x: Add support for sysreg only devices

ACPI machine can use 'ARMHC500' to report a ETM4x device. But the corresponding
driver is etm4x_amba_driver. It needs memory resouces and doesn't support sysreg
only device.

Do we have some other way to use CoreSight ETMv4.4 on ACPI machines. Thanks a lot.

Thanks,
Xiongfeng

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Question] Question about supporting sysreg only CoreSight ETMv4.4 on ACPI machines
  2022-10-18  2:04 [Question] Question about supporting sysreg only CoreSight ETMv4.4 on ACPI machines Xiongfeng Wang
@ 2022-10-18  9:18 ` Suzuki Kuruppassery Poulose
  2022-10-19  2:04   ` Xiongfeng Wang
  2022-10-19  8:46   ` Russell King (Oracle)
  0 siblings, 2 replies; 6+ messages in thread
From: Suzuki Kuruppassery Poulose @ 2022-10-18  9:18 UTC (permalink / raw)
  To: Xiongfeng Wang
  Cc: yehaiyang2, wanghuiqiang, Linux Kernel Mailing List,
	linux-arm-kernel, mark.rutland, Catalin Marinas,
	Anshuman Khandual

Hi,

Cc: Anshuman

On 18/10/2022 03:04, Xiongfeng Wang wrote:
> Hi, Suzuki
> 
>     We are testing CoreSight ETMv4.4 and TRBE recently. ETMv4.4 obsoletes memory
> mapped access to ETM and mandates the system registers. The following commit add
> driver for sysreg only devices, but it only support device tree.
>    commit 5214b563588e8414193bd7a174c52350256942a6
>    coresight: etm4x: Add support for sysreg only devices
> 
> ACPI machine can use 'ARMHC500' to report a ETM4x device. But the corresponding
> driver is etm4x_amba_driver. It needs memory resouces and doesn't support sysreg
> only device.

That is true. Unfortunately, supporting this requires us to move away 
from the AMBA framework (at least) for ETM4x devices. This is currently
developed by Anshuman. We can share it as soon as this is complete.

Thanks
Suzuki

> 
> Do we have some other way to use CoreSight ETMv4.4 on ACPI machines. Thanks a lot.
> 
> Thanks,
> Xiongfeng


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Question] Question about supporting sysreg only CoreSight ETMv4.4 on ACPI machines
  2022-10-18  9:18 ` Suzuki Kuruppassery Poulose
@ 2022-10-19  2:04   ` Xiongfeng Wang
  2022-10-20 16:03     ` Suzuki K Poulose
  2022-10-19  8:46   ` Russell King (Oracle)
  1 sibling, 1 reply; 6+ messages in thread
From: Xiongfeng Wang @ 2022-10-19  2:04 UTC (permalink / raw)
  To: Suzuki Kuruppassery Poulose
  Cc: yehaiyang2, wanghuiqiang, Linux Kernel Mailing List,
	linux-arm-kernel, mark.rutland, Catalin Marinas,
	Anshuman Khandual

Hi, Suzuki, Anshuman

On 2022/10/18 17:18, Suzuki Kuruppassery Poulose wrote:
> Hi,
> 
> Cc: Anshuman
> 
> On 18/10/2022 03:04, Xiongfeng Wang wrote:
>> Hi, Suzuki
>>
>>     We are testing CoreSight ETMv4.4 and TRBE recently. ETMv4.4 obsoletes memory
>> mapped access to ETM and mandates the system registers. The following commit add
>> driver for sysreg only devices, but it only support device tree.
>>    commit 5214b563588e8414193bd7a174c52350256942a6
>>    coresight: etm4x: Add support for sysreg only devices
>>
>> ACPI machine can use 'ARMHC500' to report a ETM4x device. But the corresponding
>> driver is etm4x_amba_driver. It needs memory resouces and doesn't support sysreg
>> only device.
> 
> That is true. Unfortunately, supporting this requires us to move away from the
> AMBA framework (at least) for ETM4x devices. This is currently
> developed by Anshuman. We can share it as soon as this is complete.

Thanks a lot. Really appreciate !
By the way, do we have plan to add ACPI support for TRBE driver? ACPI 6.5 add a
field 'TRBE Interrupt' in GICC Structure. In the beginning, I plan to add a
platform device when got this IRQ, just like what SPE does in the following commit
  commit d24a0c7099b32b6981d7f126c45348e381718350
  arm_pmu: acpi: spe: Add initial MADT/SPE probing
But it seems that TRBE still needs _DSD method to report the links(input port
and output port). Do you have some other advices? Thanks a lot.

Thanks
Xiongfeng

> 
> Thanks
> Suzuki
> 
>>
>> Do we have some other way to use CoreSight ETMv4.4 on ACPI machines. Thanks a
>> lot.
>>
>> Thanks,
>> Xiongfeng
> 
> 
> .

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Question] Question about supporting sysreg only CoreSight ETMv4.4 on ACPI machines
  2022-10-18  9:18 ` Suzuki Kuruppassery Poulose
  2022-10-19  2:04   ` Xiongfeng Wang
@ 2022-10-19  8:46   ` Russell King (Oracle)
  2022-10-19  9:28     ` Suzuki K Poulose
  1 sibling, 1 reply; 6+ messages in thread
From: Russell King (Oracle) @ 2022-10-19  8:46 UTC (permalink / raw)
  To: Suzuki Kuruppassery Poulose
  Cc: Xiongfeng Wang, yehaiyang2, wanghuiqiang,
	Linux Kernel Mailing List, linux-arm-kernel, mark.rutland,
	Catalin Marinas, Anshuman Khandual

On Tue, Oct 18, 2022 at 10:18:08AM +0100, Suzuki Kuruppassery Poulose wrote:
> That is true. Unfortunately, supporting this requires us to move away from
> the AMBA framework (at least) for ETM4x devices. This is currently
> developed by Anshuman. We can share it as soon as this is complete.

Can we not find a way to create AMBA devices from ACPI?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Question] Question about supporting sysreg only CoreSight ETMv4.4 on ACPI machines
  2022-10-19  8:46   ` Russell King (Oracle)
@ 2022-10-19  9:28     ` Suzuki K Poulose
  0 siblings, 0 replies; 6+ messages in thread
From: Suzuki K Poulose @ 2022-10-19  9:28 UTC (permalink / raw)
  To: Russell King (Oracle)
  Cc: Xiongfeng Wang, yehaiyang2, wanghuiqiang,
	Linux Kernel Mailing List, linux-arm-kernel, mark.rutland,
	Catalin Marinas, Anshuman Khandual

Hi Russell

On 19/10/2022 09:46, Russell King (Oracle) wrote:
> On Tue, Oct 18, 2022 at 10:18:08AM +0100, Suzuki Kuruppassery Poulose wrote:
>> That is true. Unfortunately, supporting this requires us to move away from
>> the AMBA framework (at least) for ETM4x devices. This is currently
>> developed by Anshuman. We can share it as soon as this is complete.
> 
> Can we not find a way to create AMBA devices from ACPI?
> 

There is a way today and that is how the AMBA devices (including ETMv4)
  work. But, the problem is ETM with system register access are not AMBA
devices. On a DT based system, they have different compatible and are
created as platform devices.

But on ACPI, there is a single HID (which makes sense, because they
both are ETM devices). Now, if the instance has memory resource, we
need to use the AMBA hook, but otherwise fall back to the platform
device driver. And this is not reliable, depending on which driver
gets to the scan hook first.

Also, another reason behind moving away from AMBA, in general is:
we need to explicitly add PIDs of all new CPU ETMs to the driver
to be able to probe them successfully. This doesn't work very well
for older kernels running on newer platforms. Even now the list
of PIDs is not complete and that would go on forever.

And the "party bag" of this change is the runtime power managment
on ACPI platforms, that works out of the box for platform devices.

Thanks

Suzuki

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Question] Question about supporting sysreg only CoreSight ETMv4.4 on ACPI machines
  2022-10-19  2:04   ` Xiongfeng Wang
@ 2022-10-20 16:03     ` Suzuki K Poulose
  0 siblings, 0 replies; 6+ messages in thread
From: Suzuki K Poulose @ 2022-10-20 16:03 UTC (permalink / raw)
  To: Xiongfeng Wang
  Cc: yehaiyang2, wanghuiqiang, Linux Kernel Mailing List,
	linux-arm-kernel, mark.rutland, Catalin Marinas,
	Anshuman Khandual

Hi

On 19/10/2022 03:04, Xiongfeng Wang wrote:
> Hi, Suzuki, Anshuman
> 
> On 2022/10/18 17:18, Suzuki Kuruppassery Poulose wrote:
>> Hi,
>>
>> Cc: Anshuman
>>
>> On 18/10/2022 03:04, Xiongfeng Wang wrote:
>>> Hi, Suzuki
>>>
>>>      We are testing CoreSight ETMv4.4 and TRBE recently. ETMv4.4 obsoletes memory
>>> mapped access to ETM and mandates the system registers. The following commit add
>>> driver for sysreg only devices, but it only support device tree.
>>>     commit 5214b563588e8414193bd7a174c52350256942a6
>>>     coresight: etm4x: Add support for sysreg only devices
>>>
>>> ACPI machine can use 'ARMHC500' to report a ETM4x device. But the corresponding
>>> driver is etm4x_amba_driver. It needs memory resouces and doesn't support sysreg
>>> only device.
>>
>> That is true. Unfortunately, supporting this requires us to move away from the
>> AMBA framework (at least) for ETM4x devices. This is currently
>> developed by Anshuman. We can share it as soon as this is complete.
> 
> Thanks a lot. Really appreciate !
> By the way, do we have plan to add ACPI support for TRBE driver? ACPI 6.5 add a

Yes, this is again in our pipeline. But, without the ETE support, TRBE
is literally unusable. So, this will follow the ETE/ETMv4 sysreg ACPI
support.


> field 'TRBE Interrupt' in GICC Structure. In the beginning, I plan to add a
> platform device when got this IRQ, just like what SPE does in the following commit
>    commit d24a0c7099b32b6981d7f126c45348e381718350
>    arm_pmu: acpi: spe: Add initial MADT/SPE probing



> But it seems that TRBE still needs _DSD method to report the links(input port
> and output port). Do you have some other advices? Thanks a lot.

TRBE doesn't need to specify the input/output ports. It is a per-CPU
sink and the TRBE driver registers it as such for each CPU that it
probes.

Suzuki


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-20 16:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-18  2:04 [Question] Question about supporting sysreg only CoreSight ETMv4.4 on ACPI machines Xiongfeng Wang
2022-10-18  9:18 ` Suzuki Kuruppassery Poulose
2022-10-19  2:04   ` Xiongfeng Wang
2022-10-20 16:03     ` Suzuki K Poulose
2022-10-19  8:46   ` Russell King (Oracle)
2022-10-19  9:28     ` Suzuki K Poulose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).