Re: [PATCH resend] IB: Move PCI dependency from root KConfig to HW's KConfigs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Yuval,

[auto build test ERROR on rdma/master]
[also build test ERROR on v4.13 next-20170904]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Yuval-Shaia/IB-Move-PCI-dependency-from-root-KConfig-to-HW-s-KConfigs/20170905-024550
base:   https://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git master
config: openrisc-allmodconfig (attached as .config)
compiler: or1k-linux-gcc (GCC) 5.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=openrisc 

All errors (new ones prefixed by >>):

   In file included from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:39:0:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:473:2: error: expected specifier-qualifier-list before 'DECLARE_PCI_UNMAP_ADDR'
     DECLARE_PCI_UNMAP_ADDR(rx_msgunmap);  /* for dma_unmap_single() */
     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:496:2: error: expected specifier-qualifier-list before 'DECLARE_PCI_UNMAP_ADDR'
     DECLARE_PCI_UNMAP_ADDR(tx_msgunmap);  /* for dma_unmap_single() */
     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c: In function 'kiblnd_map_tx_pages':
>> drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1540:19: error: 'struct kib_tx' has no member named 'tx_pages'
     __u64 *pages = tx->tx_pages;
                      ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c: In function 'kiblnd_fmr_pool_map':
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1619:19: error: 'struct kib_tx' has no member named 'tx_pages'
     __u64 *pages = tx->tx_pages;
                      ^
>> drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1620:24: error: 'struct kib_tx' has no member named 'tx_rd'
     bool is_rx = (rd != tx->tx_rd);
                           ^
>> drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1685:28: error: 'struct kib_tx' has no member named 'tx_frags'
        n = ib_map_mr_sg(mr, tx->tx_frags,
                               ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1686:10: error: 'struct kib_tx' has no member named 'tx_nfrags'
           tx->tx_nfrags, NULL, PAGE_SIZE);
             ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/asm-generic/div64.h:23,
                    from ./arch/openrisc/include/generated/asm/div64.h:1,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:37:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1687:25: error: 'struct kib_tx' has no member named 'tx_nfrags'
        if (unlikely(n != tx->tx_nfrags)) {
                            ^
   include/linux/compiler.h:175:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   In file included from drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs.h:77:0,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:66,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:39:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1689:18: error: 'struct kib_tx' has no member named 'tx_nfrags'
                n, tx->tx_nfrags);
                     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_debug.h:222:41: note: in definition of macro '__CDEBUG'
      libcfs_debug_msg(&msgdata, format, ## __VA_ARGS__); \
                                            ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_debug.h:236:29: note: in expansion of macro 'CDEBUG_LIMIT'
    #define CERROR(format, ...) CDEBUG_LIMIT(D_ERROR, format, ## __VA_ARGS__)
                                ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1688:6: note: in expansion of macro 'CERROR'
         CERROR("Failed to map mr %d/%d elements\n",
         ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c: In function 'kiblnd_destroy_tx_pool':
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1987:9: error: 'struct kib_tx' has no member named 'tx_pages'
      if (tx->tx_pages)
            ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/asm-generic/div64.h:23,
                    from ./arch/openrisc/include/generated/asm/div64.h:1,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:37:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1988:18: error: 'struct kib_tx' has no member named 'tx_pages'
       LIBCFS_FREE(tx->tx_pages,
                     ^
   include/linux/compiler.h:175:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1988:4: note: in expansion of macro 'LIBCFS_FREE'
       LIBCFS_FREE(tx->tx_pages,
       ^
   In file included from drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs.h:77:0,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:66,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:39:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1990:19: error: 'struct kib_tx' has no member named 'tx_pages'
            sizeof(*tx->tx_pages));
                      ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_debug.h:222:41: note: in definition of macro '__CDEBUG'
      libcfs_debug_msg(&msgdata, format, ## __VA_ARGS__); \
                                            ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_debug.h:236:29: note: in expansion of macro 'CDEBUG_LIMIT'
    #define CERROR(format, ...) CDEBUG_LIMIT(D_ERROR, format, ## __VA_ARGS__)
                                ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:148:3: note: in expansion of macro 'CERROR'
      CERROR("LIBCFS: free NULL '" #ptr "' (%d bytes) at "    \
      ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1988:4: note: in expansion of macro 'LIBCFS_FREE'
       LIBCFS_FREE(tx->tx_pages,
       ^
   In file included from drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs.h:79:0,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:66,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:39:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1988:18: error: 'struct kib_tx' has no member named 'tx_pages'
       LIBCFS_FREE(tx->tx_pages,
                     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:152:9: note: in definition of macro 'LIBCFS_FREE'
     kvfree(ptr);       \
            ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1991:9: error: 'struct kib_tx' has no member named 'tx_frags'
      if (tx->tx_frags)
            ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/asm-generic/div64.h:23,
                    from ./arch/openrisc/include/generated/asm/div64.h:1,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:37:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1992:18: error: 'struct kib_tx' has no member named 'tx_frags'
       LIBCFS_FREE(tx->tx_frags,
                     ^
   include/linux/compiler.h:175:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1992:4: note: in expansion of macro 'LIBCFS_FREE'
       LIBCFS_FREE(tx->tx_frags,
       ^
   In file included from drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs.h:77:0,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:66,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:39:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1994:20: error: 'struct kib_tx' has no member named 'tx_frags'
             sizeof(*tx->tx_frags));
                       ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_debug.h:222:41: note: in definition of macro '__CDEBUG'
      libcfs_debug_msg(&msgdata, format, ## __VA_ARGS__); \
                                            ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_debug.h:236:29: note: in expansion of macro 'CDEBUG_LIMIT'
    #define CERROR(format, ...) CDEBUG_LIMIT(D_ERROR, format, ## __VA_ARGS__)
                                ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:148:3: note: in expansion of macro 'CERROR'
      CERROR("LIBCFS: free NULL '" #ptr "' (%d bytes) at "    \
      ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1992:4: note: in expansion of macro 'LIBCFS_FREE'
       LIBCFS_FREE(tx->tx_frags,
       ^
   In file included from drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs.h:79:0,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:66,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:39:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1992:18: error: 'struct kib_tx' has no member named 'tx_frags'
       LIBCFS_FREE(tx->tx_frags,
                     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:152:9: note: in definition of macro 'LIBCFS_FREE'
     kvfree(ptr);       \
            ^
>> drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1995:9: error: 'struct kib_tx' has no member named 'tx_wrq'
      if (tx->tx_wrq)
            ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/asm-generic/div64.h:23,
                    from ./arch/openrisc/include/generated/asm/div64.h:1,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:37:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1996:18: error: 'struct kib_tx' has no member named 'tx_wrq'
       LIBCFS_FREE(tx->tx_wrq,
                     ^
   include/linux/compiler.h:175:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1996:4: note: in expansion of macro 'LIBCFS_FREE'
       LIBCFS_FREE(tx->tx_wrq,
       ^
   In file included from drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs.h:77:0,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:66,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:39:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1998:19: error: 'struct kib_tx' has no member named 'tx_wrq'
            sizeof(*tx->tx_wrq));
                      ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_debug.h:222:41: note: in definition of macro '__CDEBUG'
      libcfs_debug_msg(&msgdata, format, ## __VA_ARGS__); \
                                            ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_debug.h:236:29: note: in expansion of macro 'CDEBUG_LIMIT'
    #define CERROR(format, ...) CDEBUG_LIMIT(D_ERROR, format, ## __VA_ARGS__)
                                ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:148:3: note: in expansion of macro 'CERROR'
      CERROR("LIBCFS: free NULL '" #ptr "' (%d bytes) at "    \
      ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1996:4: note: in expansion of macro 'LIBCFS_FREE'
       LIBCFS_FREE(tx->tx_wrq,
       ^
   In file included from drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs.h:79:0,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:66,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:39:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1996:18: error: 'struct kib_tx' has no member named 'tx_wrq'
       LIBCFS_FREE(tx->tx_wrq,
                     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:152:9: note: in definition of macro 'LIBCFS_FREE'
     kvfree(ptr);       \
            ^
>> drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:1999:9: error: 'struct kib_tx' has no member named 'tx_sge'
      if (tx->tx_sge)
            ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/asm-generic/div64.h:23,
                    from ./arch/openrisc/include/generated/asm/div64.h:1,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:37:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2000:18: error: 'struct kib_tx' has no member named 'tx_sge'
       LIBCFS_FREE(tx->tx_sge,
                     ^
   include/linux/compiler.h:175:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2000:4: note: in expansion of macro 'LIBCFS_FREE'
       LIBCFS_FREE(tx->tx_sge,
       ^
   In file included from drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs.h:77:0,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:66,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:39:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2002:19: error: 'struct kib_tx' has no member named 'tx_sge'
            sizeof(*tx->tx_sge));
                      ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_debug.h:222:41: note: in definition of macro '__CDEBUG'
      libcfs_debug_msg(&msgdata, format, ## __VA_ARGS__); \
                                            ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_debug.h:236:29: note: in expansion of macro 'CDEBUG_LIMIT'
    #define CERROR(format, ...) CDEBUG_LIMIT(D_ERROR, format, ## __VA_ARGS__)
                                ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:148:3: note: in expansion of macro 'CERROR'
      CERROR("LIBCFS: free NULL '" #ptr "' (%d bytes) at "    \
      ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2000:4: note: in expansion of macro 'LIBCFS_FREE'
       LIBCFS_FREE(tx->tx_sge,
       ^
   In file included from drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs.h:79:0,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:66,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:39:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2000:18: error: 'struct kib_tx' has no member named 'tx_sge'
       LIBCFS_FREE(tx->tx_sge,
                     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:152:9: note: in definition of macro 'LIBCFS_FREE'
     kvfree(ptr);       \
            ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2003:9: error: 'struct kib_tx' has no member named 'tx_rd'
      if (tx->tx_rd)
            ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/asm-generic/div64.h:23,
                    from ./arch/openrisc/include/generated/asm/div64.h:1,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:37:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2004:18: error: 'struct kib_tx' has no member named 'tx_rd'
       LIBCFS_FREE(tx->tx_rd,
                     ^
   include/linux/compiler.h:175:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2004:4: note: in expansion of macro 'LIBCFS_FREE'
       LIBCFS_FREE(tx->tx_rd,
       ^
   In file included from drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs.h:79:0,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:66,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:39:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2004:18: error: 'struct kib_tx' has no member named 'tx_rd'
       LIBCFS_FREE(tx->tx_rd,
                     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:152:9: note: in definition of macro 'LIBCFS_FREE'
     kvfree(ptr);       \
            ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/asm-generic/div64.h:23,
                    from ./arch/openrisc/include/generated/asm/div64.h:1,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:37:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c: In function 'kiblnd_create_tx_pool':
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2066:32: error: 'struct kib_tx' has no member named 'tx_pages'
          LNET_MAX_IOV * sizeof(*tx->tx_pages));
                                   ^
   include/linux/compiler.h:175:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:63:23: note: in expansion of macro 'LASSERTF'
    #define LASSERT(cond) LASSERTF(cond, "\n")
                          ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:91:2: note: in expansion of macro 'LASSERT'
     LASSERT(!in_interrupt() || ((size) <= LIBCFS_VMALLOC_SIZE && \
     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:134:2: note: in expansion of macro 'LIBCFS_ALLOC_PRE'
     LIBCFS_ALLOC_PRE((size), (mask));        \
     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:143:2: note: in expansion of macro 'LIBCFS_CPT_ALLOC_GFP'
--
   In file included from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:37:0:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:473:2: error: expected specifier-qualifier-list before 'DECLARE_PCI_UNMAP_ADDR'
     DECLARE_PCI_UNMAP_ADDR(rx_msgunmap);  /* for dma_unmap_single() */
     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:496:2: error: expected specifier-qualifier-list before 'DECLARE_PCI_UNMAP_ADDR'
     DECLARE_PCI_UNMAP_ADDR(tx_msgunmap);  /* for dma_unmap_single() */
     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_tx_done':
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:82:4: error: 'struct kib_tx' has no member named 'tx_nwrq'
     tx->tx_nwrq = 0;
       ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:37,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:37:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_get_idle_tx':
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:126:13: error: 'struct kib_tx' has no member named 'tx_nwrq'
     LASSERT(!tx->tx_nwrq);
                ^
   include/linux/compiler.h:175:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:63:23: note: in expansion of macro 'LASSERTF'
    #define LASSERT(cond) LASSERTF(cond, "\n")
                          ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:126:2: note: in expansion of macro 'LASSERT'
     LASSERT(!tx->tx_nwrq);
     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:134:13: error: 'struct kib_tx' has no member named 'tx_nfrags'
     LASSERT(!tx->tx_nfrags);
                ^
   include/linux/compiler.h:175:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:63:23: note: in expansion of macro 'LASSERTF'
    #define LASSERT(cond) LASSERTF(cond, "\n")
                          ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:134:2: note: in expansion of macro 'LASSERT'
     LASSERT(!tx->tx_nfrags);
     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_post_rx':
>> drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:168:4: error: 'struct kib_rx' has no member named 'rx_sge'
     rx->rx_sge.lkey   = conn->ibc_hdev->ibh_pd->local_dma_lkey;
       ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:169:4: error: 'struct kib_rx' has no member named 'rx_sge'
     rx->rx_sge.addr   = rx->rx_msgaddr;
       ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:170:4: error: 'struct kib_rx' has no member named 'rx_sge'
     rx->rx_sge.length = IBLND_MSG_SIZE;
       ^
>> drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:172:4: error: 'struct kib_rx' has no member named 'rx_wrq'
     rx->rx_wrq.next    = NULL;
       ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:173:4: error: 'struct kib_rx' has no member named 'rx_wrq'
     rx->rx_wrq.sg_list = &rx->rx_sge;
       ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:173:26: error: 'struct kib_rx' has no member named 'rx_sge'
     rx->rx_wrq.sg_list = &rx->rx_sge;
                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:174:4: error: 'struct kib_rx' has no member named 'rx_wrq'
     rx->rx_wrq.num_sge = 1;
       ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:175:4: error: 'struct kib_rx' has no member named 'rx_wrq'
     rx->rx_wrq.wr_id   = kiblnd_ptr2wreqid(rx, IBLND_WID_RX);
       ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:191:43: error: 'struct kib_rx' has no member named 'rx_wrq'
     rc = ib_post_recv(conn->ibc_cmid->qp, &rx->rx_wrq, &bad_wrq);
                                              ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_handle_rx':
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:420:5: error: 'struct kib_tx' has no member named 'tx_nwrq'
      tx->tx_nwrq = 0;  /* overwrite PUT_REQ */
        ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_fmr_map_tx':
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:575:51: error: 'struct kib_tx' has no member named 'fmr'
     rc = kiblnd_fmr_pool_map(fps, tx, rd, nob, 0, &tx->fmr);
                                                      ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:585:17: error: 'struct kib_tx' has no member named 'fmr'
     rd->rd_key = tx->fmr.fmr_key;
                    ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_unmap_tx':
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:600:28: error: 'struct kib_tx' has no member named 'fmr'
      kiblnd_fmr_pool_unmap(&tx->fmr, tx->tx_status);
                               ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:602:8: error: 'struct kib_tx' has no member named 'tx_nfrags'
     if (tx->tx_nfrags) {
           ^
>> drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:604:11: error: 'struct kib_tx' has no member named 'tx_frags'
            tx->tx_frags, tx->tx_nfrags, tx->tx_dmadir);
              ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:604:25: error: 'struct kib_tx' has no member named 'tx_nfrags'
            tx->tx_frags, tx->tx_nfrags, tx->tx_dmadir);
                            ^
>> drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:604:40: error: 'struct kib_tx' has no member named 'tx_dmadir'
            tx->tx_frags, tx->tx_nfrags, tx->tx_dmadir);
                                           ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:605:5: error: 'struct kib_tx' has no member named 'tx_nfrags'
      tx->tx_nfrags = 0;
        ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_map_tx':
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:621:4: error: 'struct kib_tx' has no member named 'tx_dmadir'
     tx->tx_dmadir = (rd != tx->tx_rd) ? DMA_FROM_DEVICE : DMA_TO_DEVICE;
       ^
>> drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:621:27: error: 'struct kib_tx' has no member named 'tx_rd'
     tx->tx_dmadir = (rd != tx->tx_rd) ? DMA_FROM_DEVICE : DMA_TO_DEVICE;
                              ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:622:4: error: 'struct kib_tx' has no member named 'tx_nfrags'
     tx->tx_nfrags = nfrags;
       ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:624:55: error: 'struct kib_tx' has no member named 'tx_frags'
     rd->rd_nfrags = kiblnd_dma_map_sg(hdev->ibh_ibdev, tx->tx_frags,
                                                          ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:625:10: error: 'struct kib_tx' has no member named 'tx_nfrags'
           tx->tx_nfrags, tx->tx_dmadir);
             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:625:25: error: 'struct kib_tx' has no member named 'tx_dmadir'
           tx->tx_nfrags, tx->tx_dmadir);
                            ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:629:24: error: 'struct kib_tx' has no member named 'tx_frags'
       hdev->ibh_ibdev, &tx->tx_frags[i]);
                           ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:631:24: error: 'struct kib_tx' has no member named 'tx_frags'
       hdev->ibh_ibdev, &tx->tx_frags[i]);
                           ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_setup_rd_iov':
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:664:9: error: 'struct kib_tx' has no member named 'tx_frags'
     sg = tx->tx_frags;
            ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:696:42: error: 'struct kib_tx' has no member named 'tx_frags'
     return kiblnd_map_tx(ni, tx, rd, sg - tx->tx_frags);
                                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_setup_rd_kiov':
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:721:9: error: 'struct kib_tx' has no member named 'tx_frags'
     sg = tx->tx_frags;
            ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:741:42: error: 'struct kib_tx' has no member named 'tx_frags'
     return kiblnd_map_tx(ni, tx, rd, sg - tx->tx_frags);
                                             ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:37,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:37:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_post_tx_locked':
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:757:12: error: 'struct kib_tx' has no member named 'tx_nwrq'
     LASSERT(tx->tx_nwrq > 0);
               ^
   include/linux/compiler.h:175:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:63:23: note: in expansion of macro 'LASSERTF'
    #define LASSERT(cond) LASSERTF(cond, "\n")
                          ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:757:2: note: in expansion of macro 'LASSERT'
     LASSERT(tx->tx_nwrq > 0);
     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:836:43: error: 'struct kib_tx' has no member named 'fmr'
      struct kib_fast_reg_descriptor *frd = tx->fmr.fmr_frd;
                                              ^
>> drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:837:31: error: 'struct kib_tx' has no member named 'tx_wrq'
      struct ib_send_wr *bad = &tx->tx_wrq[tx->tx_nwrq - 1].wr;
                                  ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:837:42: error: 'struct kib_tx' has no member named 'tx_nwrq'
      struct ib_send_wr *bad = &tx->tx_wrq[tx->tx_nwrq - 1].wr;
                                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:838:31: error: 'struct kib_tx' has no member named 'tx_wrq'
      struct ib_send_wr *wrq = &tx->tx_wrq[0].wr;
                                  ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:847:37: error: 'struct kib_tx' has no member named 'tx_wrq'
       frd->frd_fastreg_wr.wr.next = &tx->tx_wrq[0].wr;
                                        ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_init_tx_msg':
>> drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1020:26: error: 'struct kib_tx' has no member named 'tx_sge'
     struct ib_sge *sge = &tx->tx_sge[tx->tx_nwrq];
                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1020:37: error: 'struct kib_tx' has no member named 'tx_nwrq'
     struct ib_sge *sge = &tx->tx_sge[tx->tx_nwrq];
                                        ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1021:30: error: 'struct kib_tx' has no member named 'tx_wrq'
     struct ib_rdma_wr *wrq = &tx->tx_wrq[tx->tx_nwrq];
                                 ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1021:41: error: 'struct kib_tx' has no member named 'tx_nwrq'
     struct ib_rdma_wr *wrq = &tx->tx_wrq[tx->tx_nwrq];
                                            ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:37,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:37:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1024:12: error: 'struct kib_tx' has no member named 'tx_nwrq'
     LASSERT(tx->tx_nwrq >= 0);
               ^
   include/linux/compiler.h:175:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:63:23: note: in expansion of macro 'LASSERTF'
    #define LASSERT(cond) LASSERTF(cond, "\n")
                          ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1024:2: note: in expansion of macro 'LASSERT'
     LASSERT(tx->tx_nwrq >= 0);
     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1025:12: error: 'struct kib_tx' has no member named 'tx_nwrq'
     LASSERT(tx->tx_nwrq < IBLND_MAX_RDMA_FRAGS + 1);
               ^
   include/linux/compiler.h:175:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:63:23: note: in expansion of macro 'LASSERTF'
    #define LASSERT(cond) LASSERTF(cond, "\n")
                          ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1025:2: note: in expansion of macro 'LASSERT'
     LASSERT(tx->tx_nwrq < IBLND_MAX_RDMA_FRAGS + 1);
     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1043:4: error: 'struct kib_tx' has no member named 'tx_nwrq'
     tx->tx_nwrq++;
       ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_init_rdma':
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1051:34: error: 'struct kib_tx' has no member named 'tx_rd'
     struct kib_rdma_desc *srcrd = tx->tx_rd;
                                     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1052:26: error: 'struct kib_tx' has no member named 'tx_sge'
     struct ib_sge *sge = &tx->tx_sge[0];
                             ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:37,
                    from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:37:
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1060:13: error: 'struct kib_tx' has no member named 'tx_nwrq'
     LASSERT(!tx->tx_nwrq);
                ^
   include/linux/compiler.h:175:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/../../../include/linux/libcfs/libcfs_private.h:63:23: note: in expansion of macro 'LASSERTF'
    #define LASSERT(cond) LASSERTF(cond, "\n")
                          ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1060:2: note: in expansion of macro 'LASSERT'
     LASSERT(!tx->tx_nwrq);
     ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1086:9: error: 'struct kib_tx' has no member named 'tx_nwrq'
      if (tx->tx_nwrq >= IBLND_MAX_RDMA_FRAGS) {
            ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1100:12: error: 'struct kib_tx' has no member named 'tx_sge'
      sge = &tx->tx_sge[tx->tx_nwrq];
               ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1100:23: error: 'struct kib_tx' has no member named 'tx_nwrq'
      sge = &tx->tx_sge[tx->tx_nwrq];
                          ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1105:12: error: 'struct kib_tx' has no member named 'tx_wrq'
      wrq = &tx->tx_wrq[tx->tx_nwrq];
               ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1105:23: error: 'struct kib_tx' has no member named 'tx_nwrq'
      wrq = &tx->tx_wrq[tx->tx_nwrq];
                          ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1123:5: error: 'struct kib_tx' has no member named 'tx_nwrq'
      tx->tx_nwrq++;
        ^
   drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1129:5: error: 'struct kib_tx' has no member named 'tx_nwrq'
      tx->tx_nwrq = 0;
        ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,

vim +1540 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c

d7e09d039 Peng Tao           2013-05-02  1536  
80e05b34f Dmitry Eremin      2016-05-05  1537  static int
8d9de3f48 James Simmons      2016-06-10  1538  kiblnd_map_tx_pages(struct kib_tx *tx, struct kib_rdma_desc *rd)
80e05b34f Dmitry Eremin      2016-05-05  1539  {
80e05b34f Dmitry Eremin      2016-05-05 @1540  	__u64 *pages = tx->tx_pages;
8d9de3f48 James Simmons      2016-06-10  1541  	struct kib_hca_dev *hdev;
80e05b34f Dmitry Eremin      2016-05-05  1542  	int npages;
80e05b34f Dmitry Eremin      2016-05-05  1543  	int size;
80e05b34f Dmitry Eremin      2016-05-05  1544  	int i;
80e05b34f Dmitry Eremin      2016-05-05  1545  
80e05b34f Dmitry Eremin      2016-05-05  1546  	hdev = tx->tx_pool->tpo_hdev;
80e05b34f Dmitry Eremin      2016-05-05  1547  
80e05b34f Dmitry Eremin      2016-05-05  1548  	for (i = 0, npages = 0; i < rd->rd_nfrags; i++) {
80e05b34f Dmitry Eremin      2016-05-05  1549  		for (size = 0; size <  rd->rd_frags[i].rf_nob;
80e05b34f Dmitry Eremin      2016-05-05  1550  		     size += hdev->ibh_page_size) {
80e05b34f Dmitry Eremin      2016-05-05  1551  			pages[npages++] = (rd->rd_frags[i].rf_addr &
80e05b34f Dmitry Eremin      2016-05-05  1552  					   hdev->ibh_page_mask) + size;
80e05b34f Dmitry Eremin      2016-05-05  1553  		}
80e05b34f Dmitry Eremin      2016-05-05  1554  	}
80e05b34f Dmitry Eremin      2016-05-05  1555  
80e05b34f Dmitry Eremin      2016-05-05  1556  	return npages;
80e05b34f Dmitry Eremin      2016-05-05  1557  }
80e05b34f Dmitry Eremin      2016-05-05  1558  
8d9de3f48 James Simmons      2016-06-10  1559  void kiblnd_fmr_pool_unmap(struct kib_fmr *fmr, int status)
d7e09d039 Peng Tao           2013-05-02  1560  {
d7e09d039 Peng Tao           2013-05-02  1561  	LIST_HEAD(zombies);
8d9de3f48 James Simmons      2016-06-10  1562  	struct kib_fmr_pool *fpo = fmr->fmr_pool;
8d9de3f48 James Simmons      2016-06-10  1563  	struct kib_fmr_poolset *fps;
a649ad1d7 Greg Kroah-Hartman 2014-07-12  1564  	unsigned long now = cfs_time_current();
8d9de3f48 James Simmons      2016-06-10  1565  	struct kib_fmr_pool *tmp;
d7e09d039 Peng Tao           2013-05-02  1566  	int rc;
d7e09d039 Peng Tao           2013-05-02  1567  
1f199a0c4 Dmitry Eremin      2016-05-05  1568  	if (!fpo)
1f199a0c4 Dmitry Eremin      2016-05-05  1569  		return;
1f199a0c4 Dmitry Eremin      2016-05-05  1570  
1f199a0c4 Dmitry Eremin      2016-05-05  1571  	fps = fpo->fpo_owner;
80e05b34f Dmitry Eremin      2016-05-05  1572  	if (fpo->fpo_is_fmr) {
1f199a0c4 Dmitry Eremin      2016-05-05  1573  		if (fmr->fmr_pfmr) {
d7e09d039 Peng Tao           2013-05-02  1574  			rc = ib_fmr_pool_unmap(fmr->fmr_pfmr);
5fd88337d James Simmons      2016-02-12  1575  			LASSERT(!rc);
1f199a0c4 Dmitry Eremin      2016-05-05  1576  			fmr->fmr_pfmr = NULL;
1f199a0c4 Dmitry Eremin      2016-05-05  1577  		}
d7e09d039 Peng Tao           2013-05-02  1578  
5fd88337d James Simmons      2016-02-12  1579  		if (status) {
87f4f6f53 Dmitry Eremin      2016-05-05  1580  			rc = ib_flush_fmr_pool(fpo->fmr.fpo_fmr_pool);
5fd88337d James Simmons      2016-02-12  1581  			LASSERT(!rc);
d7e09d039 Peng Tao           2013-05-02  1582  		}
80e05b34f Dmitry Eremin      2016-05-05  1583  	} else {
80e05b34f Dmitry Eremin      2016-05-05  1584  		struct kib_fast_reg_descriptor *frd = fmr->fmr_frd;
d7e09d039 Peng Tao           2013-05-02  1585  
80e05b34f Dmitry Eremin      2016-05-05  1586  		if (frd) {
80e05b34f Dmitry Eremin      2016-05-05  1587  			frd->frd_valid = false;
80e05b34f Dmitry Eremin      2016-05-05  1588  			spin_lock(&fps->fps_lock);
80e05b34f Dmitry Eremin      2016-05-05  1589  			list_add_tail(&frd->frd_list, &fpo->fast_reg.fpo_pool_list);
80e05b34f Dmitry Eremin      2016-05-05  1590  			spin_unlock(&fps->fps_lock);
80e05b34f Dmitry Eremin      2016-05-05  1591  			fmr->fmr_frd = NULL;
80e05b34f Dmitry Eremin      2016-05-05  1592  		}
80e05b34f Dmitry Eremin      2016-05-05  1593  	}
d7e09d039 Peng Tao           2013-05-02  1594  	fmr->fmr_pool = NULL;
d7e09d039 Peng Tao           2013-05-02  1595  
d7e09d039 Peng Tao           2013-05-02  1596  	spin_lock(&fps->fps_lock);
d7e09d039 Peng Tao           2013-05-02  1597  	fpo->fpo_map_count--;  /* decref the pool */
d7e09d039 Peng Tao           2013-05-02  1598  
d7e09d039 Peng Tao           2013-05-02  1599  	list_for_each_entry_safe(fpo, tmp, &fps->fps_pool_list, fpo_list) {
d7e09d039 Peng Tao           2013-05-02  1600  		/* the first pool is persistent */
d7e09d039 Peng Tao           2013-05-02  1601  		if (fps->fps_pool_list.next == &fpo->fpo_list)
d7e09d039 Peng Tao           2013-05-02  1602  			continue;
d7e09d039 Peng Tao           2013-05-02  1603  
d7e09d039 Peng Tao           2013-05-02  1604  		if (kiblnd_fmr_pool_is_idle(fpo, now)) {
d7e09d039 Peng Tao           2013-05-02  1605  			list_move(&fpo->fpo_list, &zombies);
d7e09d039 Peng Tao           2013-05-02  1606  			fps->fps_version++;
d7e09d039 Peng Tao           2013-05-02  1607  		}
d7e09d039 Peng Tao           2013-05-02  1608  	}
d7e09d039 Peng Tao           2013-05-02  1609  	spin_unlock(&fps->fps_lock);
d7e09d039 Peng Tao           2013-05-02  1610  
d7e09d039 Peng Tao           2013-05-02  1611  	if (!list_empty(&zombies))
d7e09d039 Peng Tao           2013-05-02  1612  		kiblnd_destroy_fmr_pool_list(&zombies);
d7e09d039 Peng Tao           2013-05-02  1613  }
d7e09d039 Peng Tao           2013-05-02  1614  
8d9de3f48 James Simmons      2016-06-10  1615  int kiblnd_fmr_pool_map(struct kib_fmr_poolset *fps, struct kib_tx *tx,
8d9de3f48 James Simmons      2016-06-10  1616  			struct kib_rdma_desc *rd, __u32 nob, __u64 iov,
8d9de3f48 James Simmons      2016-06-10  1617  			struct kib_fmr *fmr)
d7e09d039 Peng Tao           2013-05-02  1618  {
80e05b34f Dmitry Eremin      2016-05-05 @1619  	__u64 *pages = tx->tx_pages;
80e05b34f Dmitry Eremin      2016-05-05 @1620  	bool is_rx = (rd != tx->tx_rd);
0efe6171d Nicholas Hanley    2016-11-07  1621  	bool tx_pages_mapped = false;
8d9de3f48 James Simmons      2016-06-10  1622  	struct kib_fmr_pool *fpo;
80e05b34f Dmitry Eremin      2016-05-05  1623  	int npages = 0;
d7e09d039 Peng Tao           2013-05-02  1624  	__u64 version;
d7e09d039 Peng Tao           2013-05-02  1625  	int rc;
d7e09d039 Peng Tao           2013-05-02  1626  
d7e09d039 Peng Tao           2013-05-02  1627   again:
d7e09d039 Peng Tao           2013-05-02  1628  	spin_lock(&fps->fps_lock);
d7e09d039 Peng Tao           2013-05-02  1629  	version = fps->fps_version;
d7e09d039 Peng Tao           2013-05-02  1630  	list_for_each_entry(fpo, &fps->fps_pool_list, fpo_list) {
d7e09d039 Peng Tao           2013-05-02  1631  		fpo->fpo_deadline = cfs_time_shift(IBLND_POOL_DEADLINE);
d7e09d039 Peng Tao           2013-05-02  1632  		fpo->fpo_map_count++;
80e05b34f Dmitry Eremin      2016-05-05  1633  
80e05b34f Dmitry Eremin      2016-05-05  1634  		if (fpo->fpo_is_fmr) {
80e05b34f Dmitry Eremin      2016-05-05  1635  			struct ib_pool_fmr *pfmr;
80e05b34f Dmitry Eremin      2016-05-05  1636  
d7e09d039 Peng Tao           2013-05-02  1637  			spin_unlock(&fps->fps_lock);
d7e09d039 Peng Tao           2013-05-02  1638  
80e05b34f Dmitry Eremin      2016-05-05  1639  			if (!tx_pages_mapped) {
80e05b34f Dmitry Eremin      2016-05-05  1640  				npages = kiblnd_map_tx_pages(tx, rd);
80e05b34f Dmitry Eremin      2016-05-05  1641  				tx_pages_mapped = 1;
80e05b34f Dmitry Eremin      2016-05-05  1642  			}
80e05b34f Dmitry Eremin      2016-05-05  1643  
87f4f6f53 Dmitry Eremin      2016-05-05  1644  			pfmr = ib_fmr_pool_map_phys(fpo->fmr.fpo_fmr_pool,
d7e09d039 Peng Tao           2013-05-02  1645  						    pages, npages, iov);
d7e09d039 Peng Tao           2013-05-02  1646  			if (likely(!IS_ERR(pfmr))) {
c1b2e0b51 Dmitry Eremin      2016-05-05  1647  				fmr->fmr_key = is_rx ? pfmr->fmr->rkey :
c1b2e0b51 Dmitry Eremin      2016-05-05  1648  						       pfmr->fmr->lkey;
80e05b34f Dmitry Eremin      2016-05-05  1649  				fmr->fmr_frd = NULL;
d7e09d039 Peng Tao           2013-05-02  1650  				fmr->fmr_pfmr = pfmr;
c1b2e0b51 Dmitry Eremin      2016-05-05  1651  				fmr->fmr_pool = fpo;
d7e09d039 Peng Tao           2013-05-02  1652  				return 0;
d7e09d039 Peng Tao           2013-05-02  1653  			}
c1b2e0b51 Dmitry Eremin      2016-05-05  1654  			rc = PTR_ERR(pfmr);
80e05b34f Dmitry Eremin      2016-05-05  1655  		} else {
80e05b34f Dmitry Eremin      2016-05-05  1656  			if (!list_empty(&fpo->fast_reg.fpo_pool_list)) {
80e05b34f Dmitry Eremin      2016-05-05  1657  				struct kib_fast_reg_descriptor *frd;
80e05b34f Dmitry Eremin      2016-05-05  1658  				struct ib_reg_wr *wr;
80e05b34f Dmitry Eremin      2016-05-05  1659  				struct ib_mr *mr;
80e05b34f Dmitry Eremin      2016-05-05  1660  				int n;
80e05b34f Dmitry Eremin      2016-05-05  1661  
80e05b34f Dmitry Eremin      2016-05-05  1662  				frd = list_first_entry(&fpo->fast_reg.fpo_pool_list,
80e05b34f Dmitry Eremin      2016-05-05  1663  						       struct kib_fast_reg_descriptor,
80e05b34f Dmitry Eremin      2016-05-05  1664  						       frd_list);
80e05b34f Dmitry Eremin      2016-05-05  1665  				list_del(&frd->frd_list);
80e05b34f Dmitry Eremin      2016-05-05  1666  				spin_unlock(&fps->fps_lock);
80e05b34f Dmitry Eremin      2016-05-05  1667  
80e05b34f Dmitry Eremin      2016-05-05  1668  				mr = frd->frd_mr;
80e05b34f Dmitry Eremin      2016-05-05  1669  
80e05b34f Dmitry Eremin      2016-05-05  1670  				if (!frd->frd_valid) {
80e05b34f Dmitry Eremin      2016-05-05  1671  					__u32 key = is_rx ? mr->rkey : mr->lkey;
80e05b34f Dmitry Eremin      2016-05-05  1672  					struct ib_send_wr *inv_wr;
80e05b34f Dmitry Eremin      2016-05-05  1673  
80e05b34f Dmitry Eremin      2016-05-05  1674  					inv_wr = &frd->frd_inv_wr;
80e05b34f Dmitry Eremin      2016-05-05  1675  					memset(inv_wr, 0, sizeof(*inv_wr));
80e05b34f Dmitry Eremin      2016-05-05  1676  					inv_wr->opcode = IB_WR_LOCAL_INV;
80e05b34f Dmitry Eremin      2016-05-05  1677  					inv_wr->wr_id = IBLND_WID_MR;
80e05b34f Dmitry Eremin      2016-05-05  1678  					inv_wr->ex.invalidate_rkey = key;
80e05b34f Dmitry Eremin      2016-05-05  1679  
80e05b34f Dmitry Eremin      2016-05-05  1680  					/* Bump the key */
80e05b34f Dmitry Eremin      2016-05-05  1681  					key = ib_inc_rkey(key);
80e05b34f Dmitry Eremin      2016-05-05  1682  					ib_update_fast_reg_key(mr, key);
80e05b34f Dmitry Eremin      2016-05-05  1683  				}
80e05b34f Dmitry Eremin      2016-05-05  1684  
80e05b34f Dmitry Eremin      2016-05-05 @1685  				n = ib_map_mr_sg(mr, tx->tx_frags,
2f37dd131 Linus Torvalds     2016-05-20  1686  						 tx->tx_nfrags, NULL, PAGE_SIZE);
80e05b34f Dmitry Eremin      2016-05-05  1687  				if (unlikely(n != tx->tx_nfrags)) {
80e05b34f Dmitry Eremin      2016-05-05  1688  					CERROR("Failed to map mr %d/%d elements\n",
80e05b34f Dmitry Eremin      2016-05-05  1689  					       n, tx->tx_nfrags);
80e05b34f Dmitry Eremin      2016-05-05  1690  					return n < 0 ? n : -EINVAL;
80e05b34f Dmitry Eremin      2016-05-05  1691  				}
80e05b34f Dmitry Eremin      2016-05-05  1692  
80e05b34f Dmitry Eremin      2016-05-05  1693  				mr->iova = iov;
80e05b34f Dmitry Eremin      2016-05-05  1694  
80e05b34f Dmitry Eremin      2016-05-05  1695  				/* Prepare FastReg WR */
80e05b34f Dmitry Eremin      2016-05-05  1696  				wr = &frd->frd_fastreg_wr;
80e05b34f Dmitry Eremin      2016-05-05  1697  				memset(wr, 0, sizeof(*wr));
80e05b34f Dmitry Eremin      2016-05-05  1698  				wr->wr.opcode = IB_WR_REG_MR;
80e05b34f Dmitry Eremin      2016-05-05  1699  				wr->wr.wr_id = IBLND_WID_MR;
80e05b34f Dmitry Eremin      2016-05-05  1700  				wr->wr.num_sge = 0;
80e05b34f Dmitry Eremin      2016-05-05  1701  				wr->wr.send_flags = 0;
80e05b34f Dmitry Eremin      2016-05-05  1702  				wr->mr = mr;
80e05b34f Dmitry Eremin      2016-05-05  1703  				wr->key = is_rx ? mr->rkey : mr->lkey;
80e05b34f Dmitry Eremin      2016-05-05  1704  				wr->access = (IB_ACCESS_LOCAL_WRITE |
80e05b34f Dmitry Eremin      2016-05-05  1705  					      IB_ACCESS_REMOTE_WRITE);
80e05b34f Dmitry Eremin      2016-05-05  1706  
80e05b34f Dmitry Eremin      2016-05-05  1707  				fmr->fmr_key = is_rx ? mr->rkey : mr->lkey;
80e05b34f Dmitry Eremin      2016-05-05  1708  				fmr->fmr_frd = frd;
80e05b34f Dmitry Eremin      2016-05-05  1709  				fmr->fmr_pfmr = NULL;
80e05b34f Dmitry Eremin      2016-05-05  1710  				fmr->fmr_pool = fpo;
80e05b34f Dmitry Eremin      2016-05-05  1711  				return 0;
80e05b34f Dmitry Eremin      2016-05-05  1712  			}
80e05b34f Dmitry Eremin      2016-05-05  1713  			spin_unlock(&fps->fps_lock);
80e05b34f Dmitry Eremin      2016-05-05  1714  			rc = -EBUSY;
80e05b34f Dmitry Eremin      2016-05-05  1715  		}
d7e09d039 Peng Tao           2013-05-02  1716  
d7e09d039 Peng Tao           2013-05-02  1717  		spin_lock(&fps->fps_lock);
d7e09d039 Peng Tao           2013-05-02  1718  		fpo->fpo_map_count--;
c1b2e0b51 Dmitry Eremin      2016-05-05  1719  		if (rc != -EAGAIN) {
d7e09d039 Peng Tao           2013-05-02  1720  			spin_unlock(&fps->fps_lock);
c1b2e0b51 Dmitry Eremin      2016-05-05  1721  			return rc;
d7e09d039 Peng Tao           2013-05-02  1722  		}
d7e09d039 Peng Tao           2013-05-02  1723  
d7e09d039 Peng Tao           2013-05-02  1724  		/* EAGAIN and ... */
d7e09d039 Peng Tao           2013-05-02  1725  		if (version != fps->fps_version) {
d7e09d039 Peng Tao           2013-05-02  1726  			spin_unlock(&fps->fps_lock);
d7e09d039 Peng Tao           2013-05-02  1727  			goto again;
d7e09d039 Peng Tao           2013-05-02  1728  		}
d7e09d039 Peng Tao           2013-05-02  1729  	}
d7e09d039 Peng Tao           2013-05-02  1730  
d7e09d039 Peng Tao           2013-05-02  1731  	if (fps->fps_increasing) {
d7e09d039 Peng Tao           2013-05-02  1732  		spin_unlock(&fps->fps_lock);
c314c319c James Simmons      2016-02-12  1733  		CDEBUG(D_NET, "Another thread is allocating new FMR pool, waiting for her to complete\n");
d7e09d039 Peng Tao           2013-05-02  1734  		schedule();
d7e09d039 Peng Tao           2013-05-02  1735  		goto again;
d7e09d039 Peng Tao           2013-05-02  1736  	}
d7e09d039 Peng Tao           2013-05-02  1737  
699503bca Greg Kroah-Hartman 2014-07-12  1738  	if (time_before(cfs_time_current(), fps->fps_next_retry)) {
d7e09d039 Peng Tao           2013-05-02  1739  		/* someone failed recently */
d7e09d039 Peng Tao           2013-05-02  1740  		spin_unlock(&fps->fps_lock);
d7e09d039 Peng Tao           2013-05-02  1741  		return -EAGAIN;
d7e09d039 Peng Tao           2013-05-02  1742  	}
d7e09d039 Peng Tao           2013-05-02  1743  
d7e09d039 Peng Tao           2013-05-02  1744  	fps->fps_increasing = 1;
d7e09d039 Peng Tao           2013-05-02  1745  	spin_unlock(&fps->fps_lock);
d7e09d039 Peng Tao           2013-05-02  1746  
d7e09d039 Peng Tao           2013-05-02  1747  	CDEBUG(D_NET, "Allocate new FMR pool\n");
d7e09d039 Peng Tao           2013-05-02  1748  	rc = kiblnd_create_fmr_pool(fps, &fpo);
d7e09d039 Peng Tao           2013-05-02  1749  	spin_lock(&fps->fps_lock);
d7e09d039 Peng Tao           2013-05-02  1750  	fps->fps_increasing = 0;
5fd88337d James Simmons      2016-02-12  1751  	if (!rc) {
d7e09d039 Peng Tao           2013-05-02  1752  		fps->fps_version++;
d7e09d039 Peng Tao           2013-05-02  1753  		list_add_tail(&fpo->fpo_list, &fps->fps_pool_list);
d7e09d039 Peng Tao           2013-05-02  1754  	} else {
d7e09d039 Peng Tao           2013-05-02  1755  		fps->fps_next_retry = cfs_time_shift(IBLND_POOL_RETRY);
d7e09d039 Peng Tao           2013-05-02  1756  	}
d7e09d039 Peng Tao           2013-05-02  1757  	spin_unlock(&fps->fps_lock);
d7e09d039 Peng Tao           2013-05-02  1758  
d7e09d039 Peng Tao           2013-05-02  1759  	goto again;
d7e09d039 Peng Tao           2013-05-02  1760  }
d7e09d039 Peng Tao           2013-05-02  1761  

:::::: The code at line 1540 was first introduced by commit
:::::: 80e05b34f882dd03e3b7eaa1923e49deae6e409e staging: lustre: o2iblnd: Add Fast Reg memory registration support

:::::: TO: Dmitry Eremin <dmitry.eremin@xxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux