vrh 116 drivers/misc/mic/vop/vop_debugfs.c struct vringh *vrh = &vvr->vrh; vrh 117 drivers/misc/mic/vop/vop_debugfs.c int num = vrh->vring.num; vrh 121 drivers/misc/mic/vop/vop_debugfs.c desc = vrh->vring.desc; vrh 127 drivers/misc/mic/vop/vop_debugfs.c i, vrh->weak_barriers); vrh 129 drivers/misc/mic/vop/vop_debugfs.c vrh->last_avail_idx, vrh->last_used_idx); vrh 130 drivers/misc/mic/vop/vop_debugfs.c seq_printf(s, " completed %d\n", vrh->completed); vrh 138 drivers/misc/mic/vop/vop_debugfs.c avail = vrh->vring.avail; vrh 140 drivers/misc/mic/vop/vop_debugfs.c vringh16_to_cpu(vrh, avail->flags), vrh 141 drivers/misc/mic/vop/vop_debugfs.c vringh16_to_cpu(vrh, vrh 144 drivers/misc/mic/vop/vop_debugfs.c vringh16_to_cpu(vrh, avail->flags), vrh 145 drivers/misc/mic/vop/vop_debugfs.c vringh16_to_cpu(vrh, avail->idx)); vrh 149 drivers/misc/mic/vop/vop_debugfs.c used = vrh->vring.used; vrh 151 drivers/misc/mic/vop/vop_debugfs.c vringh16_to_cpu(vrh, used->flags), vrh 152 drivers/misc/mic/vop/vop_debugfs.c vringh16_to_cpu(vrh, used->idx) & (num - 1)); vrh 154 drivers/misc/mic/vop/vop_debugfs.c vringh16_to_cpu(vrh, used->flags), vrh 155 drivers/misc/mic/vop/vop_debugfs.c vringh16_to_cpu(vrh, used->idx)); vrh 158 drivers/misc/mic/vop/vop_debugfs.c j, vringh32_to_cpu(vrh, vrh 160 drivers/misc/mic/vop/vop_debugfs.c vringh32_to_cpu(vrh, vrh 83 drivers/misc/mic/vop/vop_main.h struct vringh vrh; vrh 45 drivers/misc/mic/vop/vop_vringh.c static void _vop_notify(struct vringh *vrh) vrh 47 drivers/misc/mic/vop/vop_vringh.c struct vop_vringh *vvrh = container_of(vrh, struct vop_vringh, vrh); vrh 70 drivers/misc/mic/vop/vop_vringh.c vdev->vvr[i].vrh.vring.used = vrh 103 drivers/misc/mic/vop/vop_vringh.c struct vringh *vrh = &vdev->vvr[i].vrh; vrh 106 drivers/misc/mic/vop/vop_vringh.c vrh->completed = 0; vrh 107 drivers/misc/mic/vop/vop_vringh.c vrh->last_avail_idx = 0; vrh 108 drivers/misc/mic/vop/vop_vringh.c vrh->last_used_idx = 0; vrh 325 drivers/misc/mic/vop/vop_vringh.c ret = vringh_init_kern(&vvr->vrh, vrh 338 drivers/misc/mic/vop/vop_vringh.c vvr->vrh.notify = _vop_notify; vrh 754 drivers/misc/mic/vop/vop_vringh.c struct vringh *vrh = &vvr->vrh; vrh 762 drivers/misc/mic/vop/vop_vringh.c ret = vringh_getdesc_kern(vrh, riov, wiov, vrh 822 drivers/misc/mic/vop/vop_vringh.c vringh_complete_kern(vrh, *head, total); vrh 824 drivers/misc/mic/vop/vop_vringh.c if (vringh_need_notify_kern(vrh) > 0) vrh 825 drivers/misc/mic/vop/vop_vringh.c vringh_notify(vrh); vrh 829 drivers/misc/mic/vop/vop_vringh.c vr->info->avail_idx = vrh->last_avail_idx; vrh 3012 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c struct virtchnl_rss_hena *vrh = NULL; vrh 3023 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c vrh = kzalloc(len, GFP_KERNEL); vrh 3024 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c if (!vrh) { vrh 3029 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c vrh->hena = i40e_pf_get_default_rss_hena(pf); vrh 3033 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c aq_ret, (u8 *)vrh, len); vrh 3034 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c kfree(vrh); vrh 3047 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c struct virtchnl_rss_hena *vrh = vrh 3057 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c i40e_write_rx_ctl(hw, I40E_VFQF_HENA1(0, vf->vf_id), (u32)vrh->hena); vrh 3059 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c (u32)(vrh->hena >> 32)); vrh 805 drivers/net/ethernet/intel/iavf/iavf_virtchnl.c struct virtchnl_rss_hena vrh; vrh 813 drivers/net/ethernet/intel/iavf/iavf_virtchnl.c vrh.hena = adapter->hena; vrh 816 drivers/net/ethernet/intel/iavf/iavf_virtchnl.c iavf_send_pf_msg(adapter, VIRTCHNL_OP_SET_RSS_HENA, (u8 *)&vrh, vrh 817 drivers/net/ethernet/intel/iavf/iavf_virtchnl.c sizeof(vrh)); vrh 1404 drivers/net/ethernet/intel/iavf/iavf_virtchnl.c struct virtchnl_rss_hena *vrh = (struct virtchnl_rss_hena *)msg; vrh 1406 drivers/net/ethernet/intel/iavf/iavf_virtchnl.c if (msglen == sizeof(*vrh)) vrh 1407 drivers/net/ethernet/intel/iavf/iavf_virtchnl.c adapter->hena = vrh->hena; vrh 34 drivers/staging/fbtft/fb_ili9325.c static unsigned int vrh = 0x0d; /* VREG1OUT=Vci*1.85 */ vrh 35 drivers/staging/fbtft/fb_ili9325.c module_param(vrh, uint, 0000); vrh 36 drivers/staging/fbtft/fb_ili9325.c MODULE_PARM_DESC(vrh, "Set the amplifying rate (1.6 ~ 1.9) of Vci applied to output the VREG1OUT"); vrh 93 drivers/staging/fbtft/fb_ili9325.c vrh &= 0x0f; vrh 123 drivers/staging/fbtft/fb_ili9325.c write_reg(par, 0x0012, vrh); /* Internal reference voltage= Vci; */ vrh 33 drivers/vhost/vringh.c static inline int __vringh_get_head(const struct vringh *vrh, vrh 34 drivers/vhost/vringh.c int (*getu16)(const struct vringh *vrh, vrh 41 drivers/vhost/vringh.c err = getu16(vrh, &avail_idx, &vrh->vring.avail->idx); vrh 44 drivers/vhost/vringh.c &vrh->vring.avail->idx); vrh 49 drivers/vhost/vringh.c return vrh->vring.num; vrh 52 drivers/vhost/vringh.c virtio_rmb(vrh->weak_barriers); vrh 54 drivers/vhost/vringh.c i = *last_avail_idx & (vrh->vring.num - 1); vrh 56 drivers/vhost/vringh.c err = getu16(vrh, &head, &vrh->vring.avail->ring[i]); vrh 59 drivers/vhost/vringh.c *last_avail_idx, &vrh->vring.avail->ring[i]); vrh 63 drivers/vhost/vringh.c if (head >= vrh->vring.num) { vrh 65 drivers/vhost/vringh.c head, vrh->vring.num); vrh 108 drivers/vhost/vringh.c static inline bool range_check(struct vringh *vrh, u64 addr, size_t *len, vrh 114 drivers/vhost/vringh.c if (!getrange(vrh, addr, range)) vrh 142 drivers/vhost/vringh.c static inline bool no_range_check(struct vringh *vrh, u64 addr, size_t *len, vrh 151 drivers/vhost/vringh.c static int move_to_indirect(const struct vringh *vrh, vrh 164 drivers/vhost/vringh.c len = vringh32_to_cpu(vrh, desc->len); vrh 171 drivers/vhost/vringh.c if (desc->flags & cpu_to_vringh16(vrh, VRING_DESC_F_NEXT)) vrh 172 drivers/vhost/vringh.c *up_next = vringh16_to_cpu(vrh, desc->next); vrh 209 drivers/vhost/vringh.c static u16 __cold return_from_indirect(const struct vringh *vrh, int *up_next, vrh 215 drivers/vhost/vringh.c *descs = vrh->vring.desc; vrh 216 drivers/vhost/vringh.c *desc_max = vrh->vring.num; vrh 220 drivers/vhost/vringh.c static int slow_copy(struct vringh *vrh, void *dst, const void *src, vrh 221 drivers/vhost/vringh.c bool (*rcheck)(struct vringh *vrh, u64 addr, size_t *len, vrh 223 drivers/vhost/vringh.c bool (*getrange)(struct vringh *vrh, vrh 226 drivers/vhost/vringh.c bool (*getrange)(struct vringh *vrh, vrh 241 drivers/vhost/vringh.c if (!rcheck(vrh, addr, &part, range, getrange)) vrh 256 drivers/vhost/vringh.c __vringh_iov(struct vringh *vrh, u16 i, vrh 259 drivers/vhost/vringh.c bool (*rcheck)(struct vringh *vrh, u64 addr, size_t *len, vrh 273 drivers/vhost/vringh.c descs = vrh->vring.desc; vrh 274 drivers/vhost/vringh.c desc_max = vrh->vring.num; vrh 291 drivers/vhost/vringh.c err = slow_copy(vrh, &desc, &descs[i], rcheck, getrange, vrh 299 drivers/vhost/vringh.c cpu_to_vringh16(vrh, VRING_DESC_F_INDIRECT))) { vrh 300 drivers/vhost/vringh.c u64 a = vringh64_to_cpu(vrh, desc.addr); vrh 303 drivers/vhost/vringh.c len = vringh32_to_cpu(vrh, desc.len); vrh 304 drivers/vhost/vringh.c if (!rcheck(vrh, a, &len, &range, getrange)) { vrh 309 drivers/vhost/vringh.c if (unlikely(len != vringh32_to_cpu(vrh, desc.len))) { vrh 316 drivers/vhost/vringh.c err = move_to_indirect(vrh, &up_next, &i, addr, &desc, vrh 323 drivers/vhost/vringh.c if (count++ == vrh->vring.num) { vrh 329 drivers/vhost/vringh.c if (desc.flags & cpu_to_vringh16(vrh, VRING_DESC_F_WRITE)) vrh 350 drivers/vhost/vringh.c len = vringh32_to_cpu(vrh, desc.len); vrh 351 drivers/vhost/vringh.c if (!rcheck(vrh, vringh64_to_cpu(vrh, desc.addr), &len, &range, vrh 356 drivers/vhost/vringh.c addr = (void *)(unsigned long)(vringh64_to_cpu(vrh, desc.addr) + vrh 369 drivers/vhost/vringh.c if (unlikely(len != vringh32_to_cpu(vrh, desc.len))) { vrh 370 drivers/vhost/vringh.c desc.len = cpu_to_vringh32(vrh, vrh 371 drivers/vhost/vringh.c vringh32_to_cpu(vrh, desc.len) - len); vrh 372 drivers/vhost/vringh.c desc.addr = cpu_to_vringh64(vrh, vrh 373 drivers/vhost/vringh.c vringh64_to_cpu(vrh, desc.addr) + len); vrh 377 drivers/vhost/vringh.c if (desc.flags & cpu_to_vringh16(vrh, VRING_DESC_F_NEXT)) { vrh 378 drivers/vhost/vringh.c i = vringh16_to_cpu(vrh, desc.next); vrh 382 drivers/vhost/vringh.c i = return_from_indirect(vrh, &up_next, vrh 402 drivers/vhost/vringh.c static inline int __vringh_complete(struct vringh *vrh, vrh 405 drivers/vhost/vringh.c int (*putu16)(const struct vringh *vrh, vrh 415 drivers/vhost/vringh.c used_ring = vrh->vring.used; vrh 416 drivers/vhost/vringh.c used_idx = vrh->last_used_idx + vrh->completed; vrh 418 drivers/vhost/vringh.c off = used_idx % vrh->vring.num; vrh 421 drivers/vhost/vringh.c if (num_used > 1 && unlikely(off + num_used >= vrh->vring.num)) { vrh 422 drivers/vhost/vringh.c u16 part = vrh->vring.num - off; vrh 437 drivers/vhost/vringh.c virtio_wmb(vrh->weak_barriers); vrh 439 drivers/vhost/vringh.c err = putu16(vrh, &vrh->vring.used->idx, used_idx + num_used); vrh 442 drivers/vhost/vringh.c &vrh->vring.used->idx); vrh 446 drivers/vhost/vringh.c vrh->completed += num_used; vrh 451 drivers/vhost/vringh.c static inline int __vringh_need_notify(struct vringh *vrh, vrh 452 drivers/vhost/vringh.c int (*getu16)(const struct vringh *vrh, vrh 463 drivers/vhost/vringh.c virtio_mb(vrh->weak_barriers); vrh 466 drivers/vhost/vringh.c if (!vrh->event_indices) { vrh 468 drivers/vhost/vringh.c err = getu16(vrh, &flags, &vrh->vring.avail->flags); vrh 471 drivers/vhost/vringh.c &vrh->vring.avail->flags); vrh 478 drivers/vhost/vringh.c err = getu16(vrh, &used_event, &vring_used_event(&vrh->vring)); vrh 481 drivers/vhost/vringh.c &vring_used_event(&vrh->vring)); vrh 486 drivers/vhost/vringh.c if (unlikely(vrh->completed > 0xffff)) vrh 490 drivers/vhost/vringh.c vrh->last_used_idx + vrh->completed, vrh 491 drivers/vhost/vringh.c vrh->last_used_idx); vrh 493 drivers/vhost/vringh.c vrh->last_used_idx += vrh->completed; vrh 494 drivers/vhost/vringh.c vrh->completed = 0; vrh 498 drivers/vhost/vringh.c static inline bool __vringh_notify_enable(struct vringh *vrh, vrh 499 drivers/vhost/vringh.c int (*getu16)(const struct vringh *vrh, vrh 501 drivers/vhost/vringh.c int (*putu16)(const struct vringh *vrh, vrh 506 drivers/vhost/vringh.c if (!vrh->event_indices) { vrh 508 drivers/vhost/vringh.c if (putu16(vrh, &vrh->vring.used->flags, 0) != 0) { vrh 510 drivers/vhost/vringh.c &vrh->vring.used->flags); vrh 514 drivers/vhost/vringh.c if (putu16(vrh, &vring_avail_event(&vrh->vring), vrh 515 drivers/vhost/vringh.c vrh->last_avail_idx) != 0) { vrh 517 drivers/vhost/vringh.c &vring_avail_event(&vrh->vring)); vrh 524 drivers/vhost/vringh.c virtio_mb(vrh->weak_barriers); vrh 526 drivers/vhost/vringh.c if (getu16(vrh, &avail, &vrh->vring.avail->idx) != 0) { vrh 528 drivers/vhost/vringh.c &vrh->vring.avail->idx); vrh 535 drivers/vhost/vringh.c return avail == vrh->last_avail_idx; vrh 538 drivers/vhost/vringh.c static inline void __vringh_notify_disable(struct vringh *vrh, vrh 539 drivers/vhost/vringh.c int (*putu16)(const struct vringh *vrh, vrh 542 drivers/vhost/vringh.c if (!vrh->event_indices) { vrh 544 drivers/vhost/vringh.c if (putu16(vrh, &vrh->vring.used->flags, vrh 547 drivers/vhost/vringh.c &vrh->vring.used->flags); vrh 553 drivers/vhost/vringh.c static inline int getu16_user(const struct vringh *vrh, u16 *val, const __virtio16 *p) vrh 557 drivers/vhost/vringh.c *val = vringh16_to_cpu(vrh, v); vrh 561 drivers/vhost/vringh.c static inline int putu16_user(const struct vringh *vrh, __virtio16 *p, u16 val) vrh 563 drivers/vhost/vringh.c __virtio16 v = cpu_to_vringh16(vrh, val); vrh 606 drivers/vhost/vringh.c int vringh_init_user(struct vringh *vrh, u64 features, vrh 618 drivers/vhost/vringh.c vrh->little_endian = (features & (1ULL << VIRTIO_F_VERSION_1)); vrh 619 drivers/vhost/vringh.c vrh->event_indices = (features & (1 << VIRTIO_RING_F_EVENT_IDX)); vrh 620 drivers/vhost/vringh.c vrh->weak_barriers = weak_barriers; vrh 621 drivers/vhost/vringh.c vrh->completed = 0; vrh 622 drivers/vhost/vringh.c vrh->last_avail_idx = 0; vrh 623 drivers/vhost/vringh.c vrh->last_used_idx = 0; vrh 624 drivers/vhost/vringh.c vrh->vring.num = num; vrh 626 drivers/vhost/vringh.c vrh->vring.desc = (__force struct vring_desc *)desc; vrh 627 drivers/vhost/vringh.c vrh->vring.avail = (__force struct vring_avail *)avail; vrh 628 drivers/vhost/vringh.c vrh->vring.used = (__force struct vring_used *)used; vrh 650 drivers/vhost/vringh.c int vringh_getdesc_user(struct vringh *vrh, vrh 653 drivers/vhost/vringh.c bool (*getrange)(struct vringh *vrh, vrh 659 drivers/vhost/vringh.c *head = vrh->vring.num; vrh 660 drivers/vhost/vringh.c err = __vringh_get_head(vrh, getu16_user, &vrh->last_avail_idx); vrh 665 drivers/vhost/vringh.c if (err == vrh->vring.num) vrh 689 drivers/vhost/vringh.c err = __vringh_iov(vrh, *head, (struct vringh_kiov *)riov, vrh 738 drivers/vhost/vringh.c void vringh_abandon_user(struct vringh *vrh, unsigned int num) vrh 742 drivers/vhost/vringh.c vrh->last_avail_idx -= num; vrh 755 drivers/vhost/vringh.c int vringh_complete_user(struct vringh *vrh, u16 head, u32 len) vrh 759 drivers/vhost/vringh.c used.id = cpu_to_vringh32(vrh, head); vrh 760 drivers/vhost/vringh.c used.len = cpu_to_vringh32(vrh, len); vrh 761 drivers/vhost/vringh.c return __vringh_complete(vrh, &used, 1, putu16_user, putused_user); vrh 774 drivers/vhost/vringh.c int vringh_complete_multi_user(struct vringh *vrh, vrh 778 drivers/vhost/vringh.c return __vringh_complete(vrh, used, num_used, vrh 790 drivers/vhost/vringh.c bool vringh_notify_enable_user(struct vringh *vrh) vrh 792 drivers/vhost/vringh.c return __vringh_notify_enable(vrh, getu16_user, putu16_user); vrh 803 drivers/vhost/vringh.c void vringh_notify_disable_user(struct vringh *vrh) vrh 805 drivers/vhost/vringh.c __vringh_notify_disable(vrh, putu16_user); vrh 815 drivers/vhost/vringh.c int vringh_need_notify_user(struct vringh *vrh) vrh 817 drivers/vhost/vringh.c return __vringh_need_notify(vrh, getu16_user); vrh 822 drivers/vhost/vringh.c static inline int getu16_kern(const struct vringh *vrh, vrh 825 drivers/vhost/vringh.c *val = vringh16_to_cpu(vrh, READ_ONCE(*p)); vrh 829 drivers/vhost/vringh.c static inline int putu16_kern(const struct vringh *vrh, __virtio16 *p, u16 val) vrh 831 drivers/vhost/vringh.c WRITE_ONCE(*p, cpu_to_vringh16(vrh, val)); vrh 873 drivers/vhost/vringh.c int vringh_init_kern(struct vringh *vrh, u64 features, vrh 885 drivers/vhost/vringh.c vrh->little_endian = (features & (1ULL << VIRTIO_F_VERSION_1)); vrh 886 drivers/vhost/vringh.c vrh->event_indices = (features & (1 << VIRTIO_RING_F_EVENT_IDX)); vrh 887 drivers/vhost/vringh.c vrh->weak_barriers = weak_barriers; vrh 888 drivers/vhost/vringh.c vrh->completed = 0; vrh 889 drivers/vhost/vringh.c vrh->last_avail_idx = 0; vrh 890 drivers/vhost/vringh.c vrh->last_used_idx = 0; vrh 891 drivers/vhost/vringh.c vrh->vring.num = num; vrh 892 drivers/vhost/vringh.c vrh->vring.desc = desc; vrh 893 drivers/vhost/vringh.c vrh->vring.avail = avail; vrh 894 drivers/vhost/vringh.c vrh->vring.used = used; vrh 916 drivers/vhost/vringh.c int vringh_getdesc_kern(struct vringh *vrh, vrh 924 drivers/vhost/vringh.c err = __vringh_get_head(vrh, getu16_kern, &vrh->last_avail_idx); vrh 929 drivers/vhost/vringh.c if (err == vrh->vring.num) vrh 933 drivers/vhost/vringh.c err = __vringh_iov(vrh, *head, riov, wiov, no_range_check, NULL, vrh 979 drivers/vhost/vringh.c void vringh_abandon_kern(struct vringh *vrh, unsigned int num) vrh 983 drivers/vhost/vringh.c vrh->last_avail_idx -= num; vrh 996 drivers/vhost/vringh.c int vringh_complete_kern(struct vringh *vrh, u16 head, u32 len) vrh 1000 drivers/vhost/vringh.c used.id = cpu_to_vringh32(vrh, head); vrh 1001 drivers/vhost/vringh.c used.len = cpu_to_vringh32(vrh, len); vrh 1003 drivers/vhost/vringh.c return __vringh_complete(vrh, &used, 1, putu16_kern, putused_kern); vrh 1014 drivers/vhost/vringh.c bool vringh_notify_enable_kern(struct vringh *vrh) vrh 1016 drivers/vhost/vringh.c return __vringh_notify_enable(vrh, getu16_kern, putu16_kern); vrh 1027 drivers/vhost/vringh.c void vringh_notify_disable_kern(struct vringh *vrh) vrh 1029 drivers/vhost/vringh.c __vringh_notify_disable(vrh, putu16_kern); vrh 1039 drivers/vhost/vringh.c int vringh_need_notify_kern(struct vringh *vrh) vrh 1041 drivers/vhost/vringh.c return __vringh_need_notify(vrh, getu16_kern); vrh 99 include/linux/vringh.h int vringh_init_user(struct vringh *vrh, u64 features, vrh 131 include/linux/vringh.h int vringh_getdesc_user(struct vringh *vrh, vrh 134 include/linux/vringh.h bool (*getrange)(struct vringh *vrh, vrh 146 include/linux/vringh.h int vringh_complete_user(struct vringh *vrh, u16 head, u32 len); vrh 147 include/linux/vringh.h int vringh_complete_multi_user(struct vringh *vrh, vrh 152 include/linux/vringh.h void vringh_abandon_user(struct vringh *vrh, unsigned int num); vrh 155 include/linux/vringh.h int vringh_need_notify_user(struct vringh *vrh); vrh 157 include/linux/vringh.h bool vringh_notify_enable_user(struct vringh *vrh); vrh 158 include/linux/vringh.h void vringh_notify_disable_user(struct vringh *vrh); vrh 161 include/linux/vringh.h int vringh_init_kern(struct vringh *vrh, u64 features, vrh 192 include/linux/vringh.h int vringh_getdesc_kern(struct vringh *vrh, vrh 201 include/linux/vringh.h void vringh_abandon_kern(struct vringh *vrh, unsigned int num); vrh 202 include/linux/vringh.h int vringh_complete_kern(struct vringh *vrh, u16 head, u32 len); vrh 204 include/linux/vringh.h bool vringh_notify_enable_kern(struct vringh *vrh); vrh 205 include/linux/vringh.h void vringh_notify_disable_kern(struct vringh *vrh); vrh 207 include/linux/vringh.h int vringh_need_notify_kern(struct vringh *vrh); vrh 210 include/linux/vringh.h static inline void vringh_notify(struct vringh *vrh) vrh 212 include/linux/vringh.h if (vrh->notify) vrh 213 include/linux/vringh.h vrh->notify(vrh); vrh 216 include/linux/vringh.h static inline bool vringh_is_little_endian(const struct vringh *vrh) vrh 218 include/linux/vringh.h return vrh->little_endian || vrh 222 include/linux/vringh.h static inline u16 vringh16_to_cpu(const struct vringh *vrh, __virtio16 val) vrh 224 include/linux/vringh.h return __virtio16_to_cpu(vringh_is_little_endian(vrh), val); vrh 227 include/linux/vringh.h static inline __virtio16 cpu_to_vringh16(const struct vringh *vrh, u16 val) vrh 229 include/linux/vringh.h return __cpu_to_virtio16(vringh_is_little_endian(vrh), val); vrh 232 include/linux/vringh.h static inline u32 vringh32_to_cpu(const struct vringh *vrh, __virtio32 val) vrh 234 include/linux/vringh.h return __virtio32_to_cpu(vringh_is_little_endian(vrh), val); vrh 237 include/linux/vringh.h static inline __virtio32 cpu_to_vringh32(const struct vringh *vrh, u32 val) vrh 239 include/linux/vringh.h return __cpu_to_virtio32(vringh_is_little_endian(vrh), val); vrh 242 include/linux/vringh.h static inline u64 vringh64_to_cpu(const struct vringh *vrh, __virtio64 val) vrh 244 include/linux/vringh.h return __virtio64_to_cpu(vringh_is_little_endian(vrh), val); vrh 247 include/linux/vringh.h static inline __virtio64 cpu_to_vringh64(const struct vringh *vrh, u64 val) vrh 249 include/linux/vringh.h return __cpu_to_virtio64(vringh_is_little_endian(vrh), val); vrh 37 tools/virtio/vringh_test.c static bool getrange_iov(struct vringh *vrh, u64 addr, struct vringh_range *r) vrh 51 tools/virtio/vringh_test.c static bool getrange_slow(struct vringh *vrh, u64 addr, struct vringh_range *r) vrh 111 tools/virtio/vringh_test.c static inline int vringh_get_head(struct vringh *vrh, u16 *head) vrh 116 tools/virtio/vringh_test.c err = get_user(avail_idx, &vrh->vring.avail->idx); vrh 120 tools/virtio/vringh_test.c if (vrh->last_avail_idx == avail_idx) vrh 124 tools/virtio/vringh_test.c virtio_rmb(vrh->weak_barriers); vrh 126 tools/virtio/vringh_test.c i = vrh->last_avail_idx & (vrh->vring.num - 1); vrh 128 tools/virtio/vringh_test.c err = get_user(*head, &vrh->vring.avail->ring[i]); vrh 132 tools/virtio/vringh_test.c vrh->last_avail_idx++; vrh 137 tools/virtio/vringh_test.c bool (*getrange)(struct vringh *vrh, vrh 173 tools/virtio/vringh_test.c struct vringh vrh; vrh 188 tools/virtio/vringh_test.c vring_init(&vrh.vring, RINGSIZE, host_map, ALIGN); vrh 189 tools/virtio/vringh_test.c vringh_init_user(&vrh, features, RINGSIZE, true, vrh 190 tools/virtio/vringh_test.c vrh.vring.desc, vrh.vring.avail, vrh.vring.used); vrh 202 tools/virtio/vringh_test.c err = vringh_get_head(&vrh, &head); vrh 205 tools/virtio/vringh_test.c err = vringh_need_notify_user(&vrh); vrh 226 tools/virtio/vringh_test.c err = vringh_getdesc_user(&vrh, &riov, &wiov, vrh 230 tools/virtio/vringh_test.c err = vringh_need_notify_user(&vrh); vrh 239 tools/virtio/vringh_test.c if (!vringh_notify_enable_user(&vrh)) vrh 246 tools/virtio/vringh_test.c vringh_notify_disable_user(&vrh); vrh 273 tools/virtio/vringh_test.c err = vringh_complete_user(&vrh, head, written); vrh 278 tools/virtio/vringh_test.c err = vringh_need_notify_user(&vrh); vrh 441 tools/virtio/vringh_test.c struct vringh vrh; vrh 451 tools/virtio/vringh_test.c bool (*getrange)(struct vringh *vrh, u64 addr, struct vringh_range *r); vrh 490 tools/virtio/vringh_test.c vring_init(&vrh.vring, RINGSIZE, __user_addr_min, ALIGN); vrh 491 tools/virtio/vringh_test.c vringh_init_user(&vrh, vdev.features, RINGSIZE, true, vrh 492 tools/virtio/vringh_test.c vrh.vring.desc, vrh.vring.avail, vrh.vring.used); vrh 495 tools/virtio/vringh_test.c err = vringh_getdesc_user(&vrh, &riov, &wiov, getrange, &head); vrh 519 tools/virtio/vringh_test.c err = vringh_getdesc_user(&vrh, &riov, &wiov, getrange, &head); vrh 554 tools/virtio/vringh_test.c err = vringh_complete_user(&vrh, head, err); vrh 588 tools/virtio/vringh_test.c err = vringh_getdesc_user(&vrh, &riov, &wiov, getrange, &head); vrh 618 tools/virtio/vringh_test.c err = vringh_complete_multi_user(&vrh, used, 1); vrh 641 tools/virtio/vringh_test.c err = vringh_getdesc_user(&vrh, &riov, &wiov, getrange, &head); vrh 648 tools/virtio/vringh_test.c assert(vrh.vring.used->idx % RINGSIZE != 0); vrh 649 tools/virtio/vringh_test.c err = vringh_complete_multi_user(&vrh, used, RINGSIZE); vrh 725 tools/virtio/vringh_test.c err = vringh_getdesc_user(&vrh, &riov, &wiov, getrange, &head);