Lines Matching refs:h
50 struct hgsmi_buffer_header *h; in hgsmi_buffer_alloc() local
55 total_size = size + sizeof(*h) + sizeof(*t); in hgsmi_buffer_alloc()
56 h = gen_pool_dma_alloc(guest_pool, total_size, &offset); in hgsmi_buffer_alloc()
57 if (!h) in hgsmi_buffer_alloc()
60 t = (struct hgsmi_buffer_tail *)((u8 *)h + sizeof(*h) + size); in hgsmi_buffer_alloc()
62 h->flags = HGSMI_BUFFER_HEADER_F_SEQ_SINGLE; in hgsmi_buffer_alloc()
63 h->data_size = size; in hgsmi_buffer_alloc()
64 h->channel = channel; in hgsmi_buffer_alloc()
65 h->channel_info = channel_info; in hgsmi_buffer_alloc()
66 memset(&h->u.header_data, 0, sizeof(h->u.header_data)); in hgsmi_buffer_alloc()
69 t->checksum = hgsmi_checksum(offset, h, t); in hgsmi_buffer_alloc()
71 return (u8 *)h + sizeof(*h); in hgsmi_buffer_alloc()
76 struct hgsmi_buffer_header *h = in hgsmi_buffer_free() local
77 (struct hgsmi_buffer_header *)((u8 *)buf - sizeof(*h)); in hgsmi_buffer_free()
78 size_t total_size = h->data_size + sizeof(*h) + in hgsmi_buffer_free()
81 gen_pool_free(guest_pool, (unsigned long)h, total_size); in hgsmi_buffer_free()