Thread (3 messages) flat view 3 messages, 3 authors, 2015-05-14

Re: [PATCH v4 19/21] drivers/of: Support adding sub-tree

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2015-05-14 07:47:32
Also in: linux-devicetree, linux-pci

On Thu, 2015-05-14 at 10:34 +0300, Pantelis Antoniou wrote:
quoted
quoted
What you describe is inserting a bunch of properties and nodes under
a slot’s device node. Reverting the overlay removes them all just fine.
Except that still doesn't work for boot time :-)

So I would have to do a special case on unplug:

	if (slot->dt_is_overlay) /* set to false at boot */
		remove_subtree_myself();
	else
		undo_overlay(slot->overlay);
OK, in that case you do require removal. But in any case it’s the ‘negative’
of an already applied one, either at boot time or not.
Sort-of, unless we have a way in the overlay to simply specify node
removal statements so we don't have to explicitly remove all properties
(or even all children).
Modifying the overlay code to apply a ‘negative’ property should do the trick.

Is that correct?
I would do negatives node and let Linux imply the properties (or even
children).

But yes, that would probably do.

 .../...
I will probably need that generation count myself for my PCI use case.
quoted
However that requires supporting removal of nodes/properties. So I'm
tempted to keep that feature on the back burner and go with an ad-hoc
interface for PCI for now.
I see. Bonne chance :)
Merci :)

Cheers,
Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help