Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1542223

Re: [PATCH] of/platform: depopulate devices in the reverse order of creation

From Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Newsgroups linux.kernel
Subject Re: [PATCH] of/platform: depopulate devices in the reverse order of creation
Date 2016-12-14 22:50 +0100
Message-ID <sOpAZ-57b-1@gated-at.bofh.it> (permalink)
References <sNDG2-7LQ-43@gated-at.bofh.it> <sOoOB-49J-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Dec 14, 2016 at 02:54:02PM -0600, Rob Herring wrote:
> On Mon, Dec 12, 2016 at 12:39 PM, Jason Gunthorpe
> <jgunthorpe@obsidianresearch.com> wrote:
> > If the DT has inter-dependencies, then the devices need to be removed
> > in the right order to avoid removal problems.
> >
> > Assuming the DT is constructed so that EPROBE_DEFER doesn't happen
> > during creating then a good way to avoid removal problems is reversing
> > the order during depopulation.
> 
> I assume you mean by sorting the nodes to get lucky with the init
> order.

Not quite, the init order doesn't matter, just that the device list/DT
is ordered topologically. The driver bind order can still be
randomized. No luck needed.

> > In my specific case I have a gpio driver, followed by a i2c bitbang
> > using that driver. So gpiolib prints an error if it the gpio driver is
> > removed before the gpio client..
> 
> Good news, functional dependencies are going into 4.10. Let's fix GPIO
> and use that.

Sure, but it will be some time until that is used everwhere..

You don't think there is some value in 'hiding' the problem with
ordering until that work is done? IIRC that was essentially how
EPROBE_DEFER was introduced?

Jason

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] of/platform: depopulate devices in the reverse order of  creation Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-12-12 19:40 +0100
  Re: [PATCH] of/platform: depopulate devices in the reverse order of creation Rob Herring <robh@kernel.org> - 2016-12-14 22:00 +0100
    Re: [PATCH] of/platform: depopulate devices in the reverse order of  creation Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-12-14 22:50 +0100

csiph-web