Print this page
8368 remove warlock leftovers from usr/src/uts

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/ib/clients/rdsv3/message.c
          +++ new/usr/src/uts/common/io/ib/clients/rdsv3/message.c
↓ open down ↓ 39 lines elided ↑ open up ↑
  40   40   * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  41   41   * SOFTWARE.
  42   42   *
  43   43   */
  44   44  #include <sys/rds.h>
  45   45  
  46   46  #include <sys/ib/clients/rdsv3/rdsv3.h>
  47   47  #include <sys/ib/clients/rdsv3/rdma.h>
  48   48  #include <sys/ib/clients/rdsv3/rdsv3_debug.h>
  49   49  
  50      -#ifndef __lock_lint
  51   50  static unsigned int     rdsv3_exthdr_size[__RDSV3_EXTHDR_MAX] = {
  52   51  [RDSV3_EXTHDR_NONE]     = 0,
  53   52  [RDSV3_EXTHDR_VERSION]  = sizeof (struct rdsv3_ext_header_version),
  54   53  [RDSV3_EXTHDR_RDMA]     = sizeof (struct rdsv3_ext_header_rdma),
  55   54  [RDSV3_EXTHDR_RDMA_DEST]        = sizeof (struct rdsv3_ext_header_rdma_dest),
  56   55  };
  57      -#else
  58      -static unsigned int     rdsv3_exthdr_size[__RDSV3_EXTHDR_MAX] = {
  59      -                        0,
  60      -                        sizeof (struct rdsv3_ext_header_version),
  61      -                        sizeof (struct rdsv3_ext_header_rdma),
  62      -                        sizeof (struct rdsv3_ext_header_rdma_dest),
  63      -};
  64      -#endif
  65   56  
  66   57  void
  67   58  rdsv3_message_addref(struct rdsv3_message *rm)
  68   59  {
  69   60          RDSV3_DPRINTF5("rdsv3_message_addref", "addref rm %p ref %d",
  70   61              rm, atomic_get(&rm->m_refcount));
  71   62          atomic_inc_32(&rm->m_refcount);
  72   63  }
  73   64  
  74   65  /*
↓ open down ↓ 223 lines elided ↑ open up ↑
 298  289  }
 299  290  
 300  291  struct rdsv3_message *
 301  292  rdsv3_message_map_pages(unsigned long *page_addrs, unsigned int total_len)
 302  293  {
 303  294          struct rdsv3_message *rm;
 304  295          unsigned int i;
 305  296  
 306  297          RDSV3_DPRINTF4("rdsv3_message_map_pages", "Enter(len: %d)", total_len);
 307  298  
 308      -#ifndef __lock_lint
 309  299          rm = rdsv3_message_alloc(ceil(total_len, PAGE_SIZE), KM_NOSLEEP);
 310      -#else
 311      -        rm = NULL;
 312      -#endif
 313  300          if (rm == NULL)
 314  301                  return (ERR_PTR(-ENOMEM));
 315  302  
 316  303          set_bit(RDSV3_MSG_PAGEVEC, &rm->m_flags);
 317  304          rm->m_inc.i_hdr.h_len = htonl(total_len);
 318      -#ifndef __lock_lint
 319  305          rm->m_nents = ceil(total_len, PAGE_SIZE);
 320      -#else
 321      -        rm->m_nents = 0;
 322      -#endif
 323      -
 324  306          for (i = 0; i < rm->m_nents; ++i) {
 325  307                  rdsv3_sg_set_page(&rm->m_sg[i],
 326  308                      page_addrs[i],
 327  309                      PAGE_SIZE, 0);
 328  310          }
 329  311  
 330  312          return (rm);
 331  313  }
 332  314  
 333  315  struct rdsv3_message *
 334  316  rdsv3_message_copy_from_user(struct uio *uiop,
 335  317      size_t total_len)
 336  318  {
 337  319          struct rdsv3_message *rm;
 338  320          struct rdsv3_scatterlist *sg;
 339  321          int ret;
 340  322  
 341  323          RDSV3_DPRINTF4("rdsv3_message_copy_from_user", "Enter: %d", total_len);
 342  324  
 343      -#ifndef __lock_lint
 344  325          rm = rdsv3_message_alloc(ceil(total_len, PAGE_SIZE), KM_NOSLEEP);
 345      -#else
 346      -        rm = NULL;
 347      -#endif
 348  326          if (rm == NULL) {
 349  327                  ret = -ENOMEM;
 350  328                  goto out;
 351  329          }
 352  330  
 353  331          rm->m_inc.i_hdr.h_len = htonl(total_len);
 354  332  
 355  333          /*
 356  334           * now allocate and copy in the data payload.
 357  335           */
↓ open down ↓ 98 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX