]> www.infradead.org Git - users/jedix/linux-maple.git/commit
IB/core: Avoid calling ib_query_device
authorOr Gerlitz <ogerlitz@mellanox.com>
Fri, 18 Dec 2015 08:59:45 +0000 (10:59 +0200)
committerJack Vogel <jack.vogel@oracle.com>
Thu, 15 Mar 2018 20:11:39 +0000 (13:11 -0700)
commit34f67dd7e4242f1d03485cbc336627aa7b1ea427
treec9aeacc11b8bbb193cfeec63b9e8e43a80107b45
parentbcec646a7d44772cb21fa0f78d953af04c12adcf
IB/core: Avoid calling ib_query_device

Use the cached copy of the attributes present on the device, except for
the case of a query originating from user-space, where we have to invoke
the driver query_device entry, so they can fill in their udata.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Orabug: 27687711
Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com>
(cherry-picked from upstream 86bee4c9c126b4f73e3f152cd43c806cac9135ad)
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Conflicts:
  drivers/infiniband/core/uverbs_cmd.c
    o Function "ib_uverbs_get_context":
      In UEK it's "ibdev", taken from "file->device->ib_dev"

      Upstream it's "ib_dev", introduced by:
        commit 057aec0d23f750b27f0bb92d2606871f60417e0a
        Author: Yishai Hadas <yishaih@mellanox.com>
        Date:   Thu Aug 13 18:32:04 2015 +0300

          IB/uverbs: Explicitly pass ib_dev to uverbs commands

      The earliest linux-4.x.y it showed up in was x==3, or rather "linux-4.3.y".

    o Function "ib_uverbs_query_device":
      Just like before, UEK does not have "ib_dev", so using
      "file->device->ib_dev" instead.
      This follows precedence of the deleted code, where "ib_query_device"
      was called with "file->device->ib_dev" in UEK.

  drivers/infiniband/core/verbs.c
    The handling of "IB_DEVICE_LOCAL_DMA_LKEY" inside "ib_alloc_pd" was introduced with:
      commit 96249d70dd70496084c7ec1465ec449cd032955a
      Author: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Date:   Wed Aug 5 14:14:45 2015 -0600

        IB/core: Guarantee that a local_dma_lkey is available

     The earliest linux-4.x.y it showed up in was x==3, or rather "linux-4.3.y".

     Since UEK is/was based on 4.1, the corresponding code does not exist here.
drivers/infiniband/core/cm.c
drivers/infiniband/core/cma.c
drivers/infiniband/core/fmr_pool.c
drivers/infiniband/core/sysfs.c
drivers/infiniband/core/uverbs_cmd.c
include/rdma/ib_verbs.h