lkml.org 
[lkml]   [2013]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCHv7 05/12] iommu/core: add ops->{bound,unbind}_driver()
    On Thu, Dec 12, 2013 at 09:57:06AM +0200, Hiroshi Doyu wrote:
    > ops->{bound,unbind}_driver() functions are called at
    > BUS_NOTIFY_{BOUND,UNBIND}_DRIVER respectively.
    >
    > This is necessary to control the device population order. IOMMU master
    > devices depend on an IOMMU device instanciation. IOMMU master devices
    > can be registered to an IOMMU only after it's successfully
    > populated. This IOMMU registration is done via
    > ops->bound_driver(). Currently this population can be deferred if
    > depending IOMMU device hasn't yet been populated in driver core. This
    > cannot be done via ops->add_device() since after add_device() device's
    > population/instanciation can be still deferred via probe().

    How about doing dependency checking in the add/remove_device callbacks
    instead? When a device is about to be initialized where the IOMMU is not
    set up yet, just setup the IOMMU first before initializing the device?


    Joerg




    \
     
     \ /
      Last update: 2013-12-30 15:41    [W:2.702 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site