The arm smmu driver for Linux does not support debugfs

leo-hou at hotmail.com leo-hou at hotmail.com
Tue Nov 15 04:00:56 PST 2022


On 2022-11-15 19:20 +0800,  Robin Murphy<robin.murphy at arm.com>  wrote:



>On 2022-11-15 02:28, leo-hou at hotmail.com wrote:

>

>>
>>
>> Hi,
>>
>>       Why doesn't the arm smmu driver for Linux support debugfs ?

>
>Because nobody's ever written any debugfs code for it.

>
>> Are there any historical reasons?

>
>Only that so far nobody's needed to.

>
>TBH, arm-smmu is actually quite straightforward, and none of the

>internal driver state is really all that interesting (other than the

>special private Adreno stuff, but we leave it up to Rob to implement
>whatever he needs there). Given the kernel config, module parameters,
>and the features logged at probe, you can already infer how it will set

>up context banks etc. for regular IOMMU API work; there won't be any

>surprises. At this point there shouldn't be any need to debug the driver

>itself, it's mature and stable. For debugging *users* of the driver,

>I've only dealt with the DMA layer, where a combination of the IOMMU API

>tracepoints, CONFIG_DMA_API_DEBUG, and my own hacks to iommu-dma have

>always proved sufficient to get enough insight into what's being mapped

>where.

>
>I think a couple of people have previously raised the idea of

>implementing some kind of debugfs dumping for io-pgtable, but nothing's

>ever come of it. As above, it often turns out that you can find the

>information you need from other existing sources, thus the effort of

>implementing and maintaining a load of special-purpose debug code can be

>saved. In particular it would not be worth having driver-specific code

>that only helps debug generic IOMMU API usage - that would be much

>better implemented at the generic IOMMU API level.




Thanks for your reply, let me know that.



Leo.




More information about the linux-arm-kernel mailing list