lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250521-psychedelic-cute-grouse-ee1291@kuoka>
Date: Wed, 21 May 2025 11:20:40 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Stephan Gerhold <stephan.gerhold@...aro.org>
Cc: Rob Herring <robh@...nel.org>, Bjorn Andersson <andersson@...nel.org>, 
	Jassi Brar <jassisinghbrar@...il.com>, Krzysztof Kozlowski <krzk+dt@...nel.org>, 
	Conor Dooley <conor+dt@...nel.org>, Michael Turquette <mturquette@...libre.com>, 
	Stephen Boyd <sboyd@...nel.org>, linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org, 
	devicetree@...r.kernel.org, linux-clk@...r.kernel.org, Georgi Djakov <djakov@...nel.org>, 
	Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Subject: Re: [PATCH 1/4] dt-bindings: mailbox: qcom,apcs: Add separate node
 for clock-controller

On Wed, May 14, 2025 at 10:12:44PM GMT, Stephan Gerhold wrote:
> > > > > The mailbox itself does not need any clocks and should probe early to

... so probe it early.

> > > > > unblock the rest of the boot process. The "clocks" are only needed for the
> > > > > separate clock controller. In Linux, these are already two separate drivers
> > > > > that can probe independently.

They can probe later, no problem and DT does not stop that. Linux, not
DT, controls the ways of probing of devices and their children.

> > > > > 
> > > > 
> > > > Why does this circular dependency need to be broken in the DeviceTree
> > > > representation?
> > > > 
> > > > As you describe, the mailbox probes and register the mailbox controller
> > > > and it registers the clock controller. The mailbox device isn't affected
> > > > by the clock controller failing to find rpmcc...
> > > > 
> > > 
> > > That's right, but the problem is that the probe() function of the
> > > mailbox driver won't be called at all. The device tree *looks* like the
> > > mailbox depends on the clock, so fw_devlink tries to defer probing until
> > > the clock is probed (which won't ever happen, because the mailbox is
> > > needed to make the clock available).
> > > 
> > > I'm not sure why fw_devlink doesn't detect this cycle and tries to probe
> > > them anyway, but fact is that we need to split this up in order to avoid
> > > warnings and have the supplies/consumers set up properly. Those device
> > > links are created based on the device tree and not the drivers.
> > 
> > Does "post-init-providers" providers solve your problem?
> > 
> 
> I would expect that it does, but it feels like the wrong solution to the
> problem to me. The clock is not really a post-init provider: It's not
> consumed at all by the mailbox and needed immediately to initialize the
> clock controller. The real problem in my opinion is that we're
> describing two essentially distinct devices/drivers in a single device
> node, and there is no way to distinguish that.
> 
> By splitting up the two distinct components into separate device tree
> nodes, the relation between the providers/consumers is clearly
> described.

You can split devices without splitting the nodes. I do not see reason
why the DT is the problem here.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ