method_elm 188 drivers/infiniband/core/rdma_core.h void uapi_compute_bundle_size(struct uverbs_api_ioctl_method *method_elm, method_elm 51 drivers/infiniband/core/uverbs_ioctl.c const struct uverbs_api_ioctl_method *method_elm; method_elm 75 drivers/infiniband/core/uverbs_ioctl.c void uapi_compute_bundle_size(struct uverbs_api_ioctl_method *method_elm, method_elm 81 drivers/infiniband/core/uverbs_ioctl.c sizeof(*pbundle->bundle.attrs) * method_elm->key_bitmap_len + method_elm 84 drivers/infiniband/core/uverbs_ioctl.c method_elm->use_stack = bundle_size <= sizeof(*pbundle); method_elm 85 drivers/infiniband/core/uverbs_ioctl.c method_elm->bundle_size = method_elm 89 drivers/infiniband/core/uverbs_ioctl.c WARN_ON_ONCE(method_elm->bundle_size > PAGE_SIZE); method_elm 423 drivers/infiniband/core/uverbs_ioctl.c unsigned int destroy_bkey = pbundle->method_elm->destroy_bkey; method_elm 429 drivers/infiniband/core/uverbs_ioctl.c pbundle->method_elm->handler, method_elm 447 drivers/infiniband/core/uverbs_ioctl.c if (unlikely(!bitmap_subset(pbundle->method_elm->attr_mandatory, method_elm 449 drivers/infiniband/core/uverbs_ioctl.c pbundle->method_elm->key_bitmap_len))) method_elm 452 drivers/infiniband/core/uverbs_ioctl.c if (pbundle->method_elm->has_udata) method_elm 479 drivers/infiniband/core/uverbs_ioctl.c if (!ret && pbundle->method_elm->has_udata) { method_elm 500 drivers/infiniband/core/uverbs_ioctl.c unsigned int key_bitmap_len = pbundle->method_elm->key_bitmap_len; method_elm 559 drivers/infiniband/core/uverbs_ioctl.c const struct uverbs_api_ioctl_method *method_elm; method_elm 577 drivers/infiniband/core/uverbs_ioctl.c method_elm = rcu_dereference_protected(*slot, true); method_elm 579 drivers/infiniband/core/uverbs_ioctl.c if (!method_elm->use_stack) { method_elm 580 drivers/infiniband/core/uverbs_ioctl.c pbundle = kmalloc(method_elm->bundle_size, GFP_KERNEL); method_elm 584 drivers/infiniband/core/uverbs_ioctl.c method_elm->bundle_size - method_elm 595 drivers/infiniband/core/uverbs_ioctl.c pbundle->method_elm = method_elm; method_elm 604 drivers/infiniband/core/uverbs_ioctl.c pbundle->internal_used = ALIGN(pbundle->method_elm->key_bitmap_len * method_elm 602 drivers/infiniband/core/uverbs_main.c const struct uverbs_api_write_method *method_elm) method_elm 604 drivers/infiniband/core/uverbs_main.c if (method_elm->is_ex) { method_elm 610 drivers/infiniband/core/uverbs_main.c if (hdr->in_words * 8 < method_elm->req_size) method_elm 620 drivers/infiniband/core/uverbs_main.c if (hdr->out_words * 8 < method_elm->resp_size) method_elm 638 drivers/infiniband/core/uverbs_main.c if (count < method_elm->req_size + sizeof(hdr)) { method_elm 653 drivers/infiniband/core/uverbs_main.c if (hdr->out_words * 4 < method_elm->resp_size) method_elm 663 drivers/infiniband/core/uverbs_main.c const struct uverbs_api_write_method *method_elm; method_elm 683 drivers/infiniband/core/uverbs_main.c method_elm = uapi_get_method(uapi, hdr.command); method_elm 684 drivers/infiniband/core/uverbs_main.c if (IS_ERR(method_elm)) method_elm 685 drivers/infiniband/core/uverbs_main.c return PTR_ERR(method_elm); method_elm 687 drivers/infiniband/core/uverbs_main.c if (method_elm->is_ex) { method_elm 694 drivers/infiniband/core/uverbs_main.c ret = verify_hdr(&hdr, &ex_hdr, count, method_elm); method_elm 705 drivers/infiniband/core/uverbs_main.c if (!method_elm->is_ex) { method_elm 710 drivers/infiniband/core/uverbs_main.c if (method_elm->has_udata) { method_elm 712 drivers/infiniband/core/uverbs_main.c in_len - method_elm->req_size; method_elm 713 drivers/infiniband/core/uverbs_main.c in_len = method_elm->req_size; method_elm 723 drivers/infiniband/core/uverbs_main.c if (method_elm->has_resp) { method_elm 733 drivers/infiniband/core/uverbs_main.c if (method_elm->has_udata) { method_elm 735 drivers/infiniband/core/uverbs_main.c out_len - method_elm->resp_size; method_elm 736 drivers/infiniband/core/uverbs_main.c out_len = method_elm->resp_size; method_elm 767 drivers/infiniband/core/uverbs_main.c ret = method_elm->handler(&bundle); method_elm 22 drivers/infiniband/core/uverbs_std_types_device.c const struct uverbs_api_write_method *method_elm; method_elm 30 drivers/infiniband/core/uverbs_std_types_device.c method_elm = uapi_get_method(uapi, cmd); method_elm 31 drivers/infiniband/core/uverbs_std_types_device.c if (IS_ERR(method_elm)) method_elm 32 drivers/infiniband/core/uverbs_std_types_device.c return PTR_ERR(method_elm); method_elm 37 drivers/infiniband/core/uverbs_std_types_device.c if (attrs->ucore.inlen < method_elm->req_size || method_elm 38 drivers/infiniband/core/uverbs_std_types_device.c attrs->ucore.outlen < method_elm->resp_size) method_elm 41 drivers/infiniband/core/uverbs_std_types_device.c return method_elm->handler(attrs); method_elm 63 drivers/infiniband/core/uverbs_uapi.c struct uverbs_api_write_method *method_elm; method_elm 72 drivers/infiniband/core/uverbs_uapi.c method_elm = uapi_add_get_elm(uapi, method_key, sizeof(*method_elm), method_elm 74 drivers/infiniband/core/uverbs_uapi.c if (IS_ERR(method_elm)) method_elm 75 drivers/infiniband/core/uverbs_uapi.c return PTR_ERR(method_elm); method_elm 77 drivers/infiniband/core/uverbs_uapi.c if (WARN_ON(exists && (def->write.is_ex != method_elm->is_ex))) method_elm 80 drivers/infiniband/core/uverbs_uapi.c method_elm->is_ex = def->write.is_ex; method_elm 81 drivers/infiniband/core/uverbs_uapi.c method_elm->handler = def->func_write; method_elm 83 drivers/infiniband/core/uverbs_uapi.c method_elm->disabled = !(ibdev->uverbs_ex_cmd_mask & method_elm 86 drivers/infiniband/core/uverbs_uapi.c method_elm->disabled = !(ibdev->uverbs_cmd_mask & method_elm 90 drivers/infiniband/core/uverbs_uapi.c method_elm->has_udata = def->write.has_udata; method_elm 91 drivers/infiniband/core/uverbs_uapi.c method_elm->has_resp = def->write.has_resp; method_elm 92 drivers/infiniband/core/uverbs_uapi.c method_elm->req_size = def->write.req_size; method_elm 93 drivers/infiniband/core/uverbs_uapi.c method_elm->resp_size = def->write.resp_size; method_elm 106 drivers/infiniband/core/uverbs_uapi.c struct uverbs_api_ioctl_method *method_elm; method_elm 113 drivers/infiniband/core/uverbs_uapi.c method_elm = uapi_add_get_elm(uapi, method_key, sizeof(*method_elm), method_elm 115 drivers/infiniband/core/uverbs_uapi.c if (IS_ERR(method_elm)) method_elm 116 drivers/infiniband/core/uverbs_uapi.c return PTR_ERR(method_elm); method_elm 125 drivers/infiniband/core/uverbs_uapi.c rcu_assign_pointer(method_elm->handler, method->handler); method_elm 127 drivers/infiniband/core/uverbs_uapi.c method_elm->driver_method = is_driver; method_elm 143 drivers/infiniband/core/uverbs_uapi.c method_elm->driver_method |= is_driver; method_elm 246 drivers/infiniband/core/uverbs_uapi.c struct uverbs_api_ioctl_method *method_elm; method_elm 248 drivers/infiniband/core/uverbs_uapi.c method_elm = uapi_add_get_elm(uapi, method_key, method_elm 249 drivers/infiniband/core/uverbs_uapi.c sizeof(*method_elm), &exists); method_elm 250 drivers/infiniband/core/uverbs_uapi.c if (IS_ERR(method_elm)) method_elm 251 drivers/infiniband/core/uverbs_uapi.c return PTR_ERR(method_elm); method_elm 252 drivers/infiniband/core/uverbs_uapi.c method_elm->disabled = 1; method_elm 356 drivers/infiniband/core/uverbs_uapi.c struct uverbs_api_ioctl_method *method_elm, method_elm 365 drivers/infiniband/core/uverbs_uapi.c method_elm->destroy_bkey = UVERBS_API_ATTR_BKEY_LEN; method_elm 379 drivers/infiniband/core/uverbs_uapi.c __set_bit(attr_bkey, method_elm->attr_mandatory); method_elm 382 drivers/infiniband/core/uverbs_uapi.c method_elm->has_udata = true; method_elm 404 drivers/infiniband/core/uverbs_uapi.c method_elm->destroy_bkey = attr_bkey; method_elm 411 drivers/infiniband/core/uverbs_uapi.c method_elm->key_bitmap_len = max_bkey + 1; method_elm 412 drivers/infiniband/core/uverbs_uapi.c WARN_ON(method_elm->key_bitmap_len > UVERBS_API_ATTR_BKEY_LEN); method_elm 414 drivers/infiniband/core/uverbs_uapi.c uapi_compute_bundle_size(method_elm, num_attrs); method_elm 429 drivers/infiniband/core/uverbs_uapi.c struct uverbs_api_ioctl_method *method_elm = method_elm 433 drivers/infiniband/core/uverbs_uapi.c rc = uapi_finalize_ioctl_method(uapi, method_elm, method_elm 552 drivers/infiniband/core/uverbs_uapi.c struct uverbs_api_ioctl_method *method_elm = method_elm 555 drivers/infiniband/core/uverbs_uapi.c if (method_elm->disabled) { method_elm 565 drivers/infiniband/core/uverbs_uapi.c struct uverbs_api_write_method *method_elm = method_elm 568 drivers/infiniband/core/uverbs_uapi.c if (method_elm->disabled) { method_elm 569 drivers/infiniband/core/uverbs_uapi.c kfree(method_elm); method_elm 690 drivers/infiniband/core/uverbs_uapi.c struct uverbs_api_ioctl_method *method_elm = method_elm 693 drivers/infiniband/core/uverbs_uapi.c if (method_elm->driver_method) method_elm 694 drivers/infiniband/core/uverbs_uapi.c rcu_assign_pointer(method_elm->handler, NULL);