mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 05:33:09 +00:00
3fb16866b5
fw_devlink could only detect a single and simple cycle because it relied
mainly on device link cycle detection code that only checked for cycles
between devices. The expectation was that the firmware wouldn't have
complicated cycles and multiple cycles between devices. That expectation
has been proven to be wrong.
For example, fw_devlink could handle:
+-+ +-+
|A+------> |B+
+-+ +++
^ |
| |
+----------+
But it couldn't handle even something as "simple" as:
+---------------------+
| |
v |
+-+ +-+ +++
|A+------> |B+------> |C|
+-+ +++ +-+
^ |
| |
+----------+
But firmware has even more complicated cycles like:
+---------------------+
| |
v |
+-+ +---+ +++
+--+A+------>| B +-----> |C|<--+
| +-+ ++--+ +++ |
| ^ | ^ | |
| | | | | |
| +---------+ +---------+ |
| |
+------------------------------+
And this is without including parent child dependencies or nodes in the
cycle that are just firmware nodes that'll never have a struct device
created for them.
The proper way to treat these devices it to not force any probe ordering
between them, while still enforce dependencies between node in the
cycles (A, B and C) and their consumers.
So this patch goes all out and just deals with all types of cycles. It
does this by:
1. Following dependencies across device links, parent-child and fwnode
links.
2. When it find cycles, it mark the device links and fwnode links as
such instead of just deleting them or making the indistinguishable
from proxy SYNC_STATE_ONLY device links.
This way, when new nodes get added, we can immediately find and mark any
new cycles whether the new node is a device or firmware node.
Fixes:
|
||
---|---|---|
.. | ||
firmware_loader | ||
power | ||
regmap | ||
test | ||
arch_numa.c | ||
arch_topology.c | ||
attribute_container.c | ||
auxiliary.c | ||
base.h | ||
bus.c | ||
cacheinfo.c | ||
class.c | ||
component.c | ||
container.c | ||
core.c | ||
cpu.c | ||
dd.c | ||
devcoredump.c | ||
devres.c | ||
devtmpfs.c | ||
driver.c | ||
firmware.c | ||
hypervisor.c | ||
init.c | ||
isa.c | ||
Kconfig | ||
Makefile | ||
map.c | ||
memory.c | ||
module.c | ||
node.c | ||
physical_location.c | ||
physical_location.h | ||
pinctrl.c | ||
platform-msi.c | ||
platform.c | ||
property.c | ||
soc.c | ||
swnode.c | ||
syscore.c | ||
topology.c | ||
trace.c | ||
trace.h | ||
transport_class.c |