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


Groups > linux.kernel > #1490098

Re: [PATCH v3 0/2] Exynos IOMMU: proper runtime PM support (use device dependencies)

From Lukas Wunner <lukas@wunner.de>
Newsgroups linux.kernel
Subject Re: [PATCH v3 0/2] Exynos IOMMU: proper runtime PM support (use device dependencies)
Date 2016-09-23 15:50 +0200
Message-ID <skz1v-4hK-9@gated-at.bofh.it> (permalink)
References <sgVjY-1TH-53@gated-at.bofh.it> <sjeLv-2Ar-5@gated-at.bofh.it> <sjp4e-EF-19@gated-at.bofh.it> <sky5s-3Iu-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Sep 23, 2016 at 02:49:20PM +0200, Rafael J. Wysocki wrote:
> On Tuesday, September 20, 2016 10:51:13 AM Marek Szyprowski wrote:
> > On 2016-09-19 23:45, Tobias Jakobi wrote:
> > > I did some tests with the new version today. Sadly the reboot/shutdown
> > > issues are still present.
> > 
> > Thanks for the report. I've managed to reproduce this issue and it is again
> > caused by modifying device on devices_kset list before it will be finally
> > added by device_add(). I thought that the new patchset allows creating
> > links to a device, which has not been yet added to system device list.

Hm, Marek, why isn't it possible to set up the links from the consumer's
->probe hook in this case?


> > Should it be allowed to create a link to device, which
> > has not yet been added to system device list by device_add()?
> 
> While it would be easy to require both the consumer and producer devices to
> be registered for creating a link between them, that would just make it
> harder to use links in the first place.
> 
> So ideally, it should be possible to create links between devices before
> registering them, but since I didn't take that into account in the current
> patch series, some quite substantial changes are needed to cover that.
> 
> Additional link states come to mind, but then the "stateless" links are
> affected by this problem too.

device_link_add() could be changed to call device_reorder_to_tail()
only if device_is_registered(consumer) returns true.

That's an inline function defined in <linux/device.h> which returns
dev->kobj.state_in_sysfs, a flag which is set in kobject_add().

Then device_add() would have to check if any links are already
set up and reorder the consumer behind the suppliers.

Doesn't seem to be *that* complex, but probably I'm missing something,
this is just off the cuff...

Best regards,

Lukas

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


Thread

[PATCH v3 0/2] Exynos IOMMU: proper runtime PM support (use device  dependencies) Marek Szyprowski <m.szyprowski@samsung.com> - 2016-09-13 14:50 +0200
  Re: [PATCH v3 0/2] Exynos IOMMU: proper runtime PM support (use  device dependencies) Tobias Jakobi <tjakobi@math.uni-bielefeld.de> - 2016-09-20 00:00 +0200
    Re: [PATCH v3 0/2] Exynos IOMMU: proper runtime PM support (use device  dependencies) Marek Szyprowski <m.szyprowski@samsung.com> - 2016-09-20 11:00 +0200
      Re: [PATCH v3 0/2] Exynos IOMMU: proper runtime PM support (use device dependencies) "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-09-23 14:50 +0200
        Re: [PATCH v3 0/2] Exynos IOMMU: proper runtime PM support (use  device dependencies) Lukas Wunner <lukas@wunner.de> - 2016-09-23 15:50 +0200
          Re: [PATCH v3 0/2] Exynos IOMMU: proper runtime PM support (use device dependencies) "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-09-24 03:20 +0200
            Re: [PATCH v3 0/2] Exynos IOMMU: proper runtime PM support (use device  dependencies) Marek Szyprowski <m.szyprowski@samsung.com> - 2016-09-26 10:20 +0200
              Re: [PATCH v3 0/2] Exynos IOMMU: proper runtime PM support (use device dependencies) "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-09-26 14:30 +0200

csiph-web