Thread (54 messages) 54 messages, 10 authors, 2021-04-21

Re: [PATCH v4 4/8] of: property: Add fw_devlink support for optional properties

From: Saravana Kannan <hidden>
Date: 2021-02-10 01:34:49
Also in: linux-acpi, linux-clk, linux-devicetree, linux-pm, lkml

On Tue, Feb 9, 2021 at 1:33 PM Rob Herring [off-list ref] wrote:
On Fri, Feb 05, 2021 at 02:26:40PM -0800, Saravana Kannan wrote:
quoted
Not all DT bindings are mandatory bindings. Add support for optional DT
bindings and mark iommus, iommu-map, dmas as optional DT bindings.
I don't think we can say these are optional or not. It's got to be a
driver decision somehow.
Right, so maybe the word "optional" isn't a good name for it. I can
change that if you want.

The point being, fw_devlink can't block the probe of this driver based
on iommu property. We let the driver decide if it wants to
-EPROBE_DEFER or not or however it wants to handle this.
For example, if IOMMU is optional, what happens with this sequence:

driver probes without IOMMU
driver calls dma_map_?()
IOMMU driver probes
h/w accesses DMA buffer --> BOOM!
Right. But how is this really related to fw_devlink? AFAICT, this is
an issue even today. If the driver needs the IOMMU, then it needs to
make sure the IOMMU has probed? What am I missing?

-Saravana
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help