/linux/kernel/events/ |
H A D | ring_buffer.c | 22 atomic_set(&handle->rb->poll, EPOLLIN); in perf_output_wakeup() 42 struct perf_buffer *rb = handle->rb; in perf_output_get_handle() local 50 (*(volatile unsigned int *)&rb->nest)++; in perf_output_get_handle() 51 handle->wakeup = local_read(&rb->wakeup); in perf_output_get_handle() 56 struct perf_buffer *rb = handle->rb; in perf_output_put_handle() local 64 nest = READ_ONCE(rb->nest); in perf_output_put_handle() 66 WRITE_ONCE(rb->nest, nest - 1); in perf_output_put_handle() 80 head = local_read(&rb->head); in perf_output_put_handle() 114 WRITE_ONCE(rb->user_page->data_head, head); in perf_output_put_handle() 122 WRITE_ONCE(rb->nest, 0); in perf_output_put_handle() [all …]
|
H A D | internal.h | 63 extern void rb_free(struct perf_buffer *rb); 67 struct perf_buffer *rb; in rb_free_rcu() local 69 rb = container_of(rcu_head, struct perf_buffer, rcu_head); in rb_free_rcu() 70 rb_free(rb); in rb_free_rcu() 73 static inline void rb_toggle_paused(struct perf_buffer *rb, bool pause) in rb_toggle_paused() argument 75 if (!pause && rb->nr_pages) in rb_toggle_paused() 76 rb->paused = 0; in rb_toggle_paused() 78 rb->paused = 1; in rb_toggle_paused() 84 extern int rb_alloc_aux(struct perf_buffer *rb, struct perf_event *event, 86 extern void rb_free_aux(struct perf_buffer *rb); [all …]
|
/linux/drivers/scsi/bfa/ |
H A D | bfa_ioc_ct.c | 185 void __iomem *rb; in bfa_ioc_ct_reg_init() local 188 rb = bfa_ioc_bar0(ioc); in bfa_ioc_ct_reg_init() 190 ioc->ioc_regs.hfn_mbox = rb + ct_fnreg[pcifn].hfn_mbox; in bfa_ioc_ct_reg_init() 191 ioc->ioc_regs.lpu_mbox = rb + ct_fnreg[pcifn].lpu_mbox; in bfa_ioc_ct_reg_init() 192 ioc->ioc_regs.host_page_num_fn = rb + ct_fnreg[pcifn].hfn_pgn; in bfa_ioc_ct_reg_init() 195 ioc->ioc_regs.heartbeat = rb + BFA_IOC0_HBEAT_REG; in bfa_ioc_ct_reg_init() 196 ioc->ioc_regs.ioc_fwstate = rb + BFA_IOC0_STATE_REG; in bfa_ioc_ct_reg_init() 197 ioc->ioc_regs.alt_ioc_fwstate = rb + BFA_IOC1_STATE_REG; in bfa_ioc_ct_reg_init() 198 ioc->ioc_regs.hfn_mbox_cmd = rb + ct_p0reg[pcifn].hfn; in bfa_ioc_ct_reg_init() 199 ioc->ioc_regs.lpu_mbox_cmd = rb + ct_p0reg[pcifn].lpu; in bfa_ioc_ct_reg_init() [all …]
|
H A D | bfa_ioc_cb.c | 138 void __iomem *rb; in bfa_ioc_cb_reg_init() local 141 rb = bfa_ioc_bar0(ioc); in bfa_ioc_cb_reg_init() 143 ioc->ioc_regs.hfn_mbox = rb + iocreg_fnreg[pcifn].hfn_mbox; in bfa_ioc_cb_reg_init() 144 ioc->ioc_regs.lpu_mbox = rb + iocreg_fnreg[pcifn].lpu_mbox; in bfa_ioc_cb_reg_init() 145 ioc->ioc_regs.host_page_num_fn = rb + iocreg_fnreg[pcifn].hfn_pgn; in bfa_ioc_cb_reg_init() 148 ioc->ioc_regs.heartbeat = rb + BFA_IOC0_HBEAT_REG; in bfa_ioc_cb_reg_init() 149 ioc->ioc_regs.ioc_fwstate = rb + BFA_IOC0_STATE_REG; in bfa_ioc_cb_reg_init() 150 ioc->ioc_regs.alt_ioc_fwstate = rb + BFA_IOC1_STATE_REG; in bfa_ioc_cb_reg_init() 152 ioc->ioc_regs.heartbeat = (rb + BFA_IOC1_HBEAT_REG); in bfa_ioc_cb_reg_init() 153 ioc->ioc_regs.ioc_fwstate = (rb + BFA_IOC1_STATE_REG); in bfa_ioc_cb_reg_init() [all …]
|
/linux/drivers/net/ethernet/brocade/bna/ |
H A D | bfa_ioc_ct.c | 49 static enum bfa_status bfa_ioc_ct_pll_init(void __iomem *rb, 51 static enum bfa_status bfa_ioc_ct2_pll_init(void __iomem *rb, 251 void __iomem *rb; in bfa_ioc_ct_reg_init() local 254 rb = bfa_ioc_bar0(ioc); in bfa_ioc_ct_reg_init() 256 ioc->ioc_regs.hfn_mbox = rb + ct_fnreg[pcifn].hfn_mbox; in bfa_ioc_ct_reg_init() 257 ioc->ioc_regs.lpu_mbox = rb + ct_fnreg[pcifn].lpu_mbox; in bfa_ioc_ct_reg_init() 258 ioc->ioc_regs.host_page_num_fn = rb + ct_fnreg[pcifn].hfn_pgn; in bfa_ioc_ct_reg_init() 261 ioc->ioc_regs.heartbeat = rb + BFA_IOC0_HBEAT_REG; in bfa_ioc_ct_reg_init() 262 ioc->ioc_regs.ioc_fwstate = rb + BFA_IOC0_STATE_REG; in bfa_ioc_ct_reg_init() 263 ioc->ioc_regs.alt_ioc_fwstate = rb + BFA_IOC1_STATE_REG; in bfa_ioc_ct_reg_init() [all …]
|
/linux/fs/xfs/scrub/ |
H A D | bmap_repair.c | 97 struct xrep_bmap *rb, in xrep_bmap_discover_shared() argument 101 struct xfs_scrub *sc = rb->sc; in xrep_bmap_discover_shared() 114 rb->reflink_scan = RLS_SET_IFLAG; in xrep_bmap_discover_shared() 122 struct xrep_bmap *rb, in xrep_bmap_from_rmap() argument 134 struct xfs_scrub *sc = rb->sc; in xrep_bmap_from_rmap() 142 if (rb->reflink_scan == RLS_UNKNOWN && !unwritten) { in xrep_bmap_from_rmap() 143 error = xrep_bmap_discover_shared(rb, startblock, blockcount); in xrep_bmap_from_rmap() 154 fa = xfs_bmap_validate_extent(sc->ip, rb->whichfork, &irec); in xrep_bmap_from_rmap() 160 trace_xrep_bmap_found(sc->ip, rb->whichfork, &irec); in xrep_bmap_from_rmap() 165 error = xfarray_append(rb->bmap_records, &rbe); in xrep_bmap_from_rmap() [all …]
|
/linux/kernel/bpf/ |
H A D | ringbuf.c | 80 struct bpf_ringbuf *rb; member 97 struct bpf_ringbuf *rb; in bpf_ringbuf_area_alloc() local 134 rb = vmap(pages, nr_meta_pages + 2 * nr_data_pages, in bpf_ringbuf_area_alloc() 136 if (rb) { in bpf_ringbuf_area_alloc() 138 rb->pages = pages; in bpf_ringbuf_area_alloc() 139 rb->nr_pages = nr_pages; in bpf_ringbuf_area_alloc() 140 return rb; in bpf_ringbuf_area_alloc() 152 struct bpf_ringbuf *rb = container_of(work, struct bpf_ringbuf, work); in bpf_ringbuf_notify() local 154 wake_up_all(&rb->waitq); in bpf_ringbuf_notify() 170 struct bpf_ringbuf *rb; in bpf_ringbuf_alloc() local [all …]
|
/linux/drivers/hid/intel-ish-hid/ishtp/ |
H A D | client-buffers.c | 23 struct ishtp_cl_rb *rb; in ishtp_cl_alloc_rx_ring() local 28 rb = ishtp_io_rb_init(cl); in ishtp_cl_alloc_rx_ring() 29 if (!rb) { in ishtp_cl_alloc_rx_ring() 33 ret = ishtp_io_rb_alloc_buf(rb, len); in ishtp_cl_alloc_rx_ring() 37 list_add_tail(&rb->list, &cl->free_rb_list.list); in ishtp_cl_alloc_rx_ring() 99 struct ishtp_cl_rb *rb; in ishtp_cl_free_rx_ring() local 105 rb = list_entry(cl->free_rb_list.list.next, struct ishtp_cl_rb, in ishtp_cl_free_rx_ring() 107 list_del(&rb->list); in ishtp_cl_free_rx_ring() 108 kfree(rb->buffer.data); in ishtp_cl_free_rx_ring() 109 kfree(rb); in ishtp_cl_free_rx_ring() [all …]
|
/linux/kernel/printk/ |
H A D | printk_ringbuffer.c | 568 static bool data_make_reusable(struct printk_ringbuffer *rb, in data_make_reusable() argument 574 struct prb_data_ring *data_ring = &rb->text_data_ring; in data_make_reusable() 575 struct prb_desc_ring *desc_ring = &rb->desc_ring; in data_make_reusable() 636 static bool data_push_tail(struct printk_ringbuffer *rb, unsigned long lpos) in data_push_tail() argument 638 struct prb_data_ring *data_ring = &rb->text_data_ring; in data_push_tail() 679 if (!data_make_reusable(rb, tail_lpos, lpos, &next_lpos)) { in data_push_tail() 771 static bool desc_push_tail(struct printk_ringbuffer *rb, in desc_push_tail() argument 774 struct prb_desc_ring *desc_ring = &rb->desc_ring; in desc_push_tail() 816 if (!data_push_tail(rb, desc.text_blk_lpos.next)) in desc_push_tail() 879 static bool desc_reserve(struct printk_ringbuffer *rb, unsigned long *id_out) in desc_reserve() argument [all …]
|
H A D | printk_ringbuffer.h | 109 struct printk_ringbuffer *rb; member 322 bool prb_reserve(struct prb_reserved_entry *e, struct printk_ringbuffer *rb, 324 bool prb_reserve_in_last(struct prb_reserved_entry *e, struct printk_ringbuffer *rb, 329 void prb_init(struct printk_ringbuffer *rb, 372 #define prb_for_each_record(from, rb, s, r) \ argument 373 for ((s) = from; prb_read_valid(rb, s, r); (s) = (r)->info->seq + 1) 390 #define prb_for_each_info(from, rb, s, i, lc) \ argument 391 for ((s) = from; prb_read_valid_info(rb, s, i, lc); (s) = (i)->seq + 1) 393 bool prb_read_valid(struct printk_ringbuffer *rb, u64 seq, 395 bool prb_read_valid_info(struct printk_ringbuffer *rb, u64 seq, [all …]
|
/linux/drivers/misc/mchp_pci1xxxx/ |
H A D | mchp_pci1xxxx_otpe2p.c | 99 void __iomem *rb = priv->reg_base; in is_eeprom_responsive() local 104 rb + MMAP_EEPROM_OFFSET(EEPROM_CMD_REG)); in is_eeprom_responsive() 106 rb + MMAP_EEPROM_OFFSET(EEPROM_CMD_REG)); in is_eeprom_responsive() 111 true, rb + MMAP_EEPROM_OFFSET(EEPROM_CMD_REG)); in is_eeprom_responsive() 124 void __iomem *rb = priv->reg_base; in pci1xxxx_eeprom_read() local 141 writel(EEPROM_CMD_EPC_BUSY_BIT | (off + byte), rb + in pci1xxxx_eeprom_read() 148 rb + MMAP_EEPROM_OFFSET(EEPROM_CMD_REG)); in pci1xxxx_eeprom_read() 154 buf[byte] = readl(rb + MMAP_EEPROM_OFFSET(EEPROM_DATA_REG)); in pci1xxxx_eeprom_read() 165 void __iomem *rb = priv->reg_base; in pci1xxxx_eeprom_write() local 182 writel(*(value + byte), rb + MMAP_EEPROM_OFFSET(EEPROM_DATA_REG)); in pci1xxxx_eeprom_write() [all …]
|
/linux/Documentation/translations/zh_CN/core-api/ |
H A D | rbtree.rst | 271 node = rb_entry(root->rb_node, struct interval_tree_node, rb); 274 if (node->rb.rb_left) { 276 rb_entry(node->rb.rb_left, 277 struct interval_tree_node, rb); 294 if (node->rb.rb_right) { 295 node = rb_entry(node->rb.rb_right, 296 struct interval_tree_node, rb); 311 if (node->rb.rb_left) { 312 subtree_last = rb_entry(node->rb.rb_left, 313 struct interval_tree_node, rb)->__subtree_last; [all …]
|
/linux/mm/ |
H A D | interval_tree.c | 23 INTERVAL_TREE_DEFINE(struct vm_area_struct, shared.rb, 38 if (!prev->shared.rb.rb_right) { in vma_interval_tree_insert_after() 40 link = &prev->shared.rb.rb_right; in vma_interval_tree_insert_after() 42 parent = rb_entry(prev->shared.rb.rb_right, in vma_interval_tree_insert_after() 43 struct vm_area_struct, shared.rb); in vma_interval_tree_insert_after() 46 while (parent->shared.rb.rb_left) { in vma_interval_tree_insert_after() 47 parent = rb_entry(parent->shared.rb.rb_left, in vma_interval_tree_insert_after() 48 struct vm_area_struct, shared.rb); in vma_interval_tree_insert_after() 52 link = &parent->shared.rb.rb_left; in vma_interval_tree_insert_after() 56 rb_link_node(&node->shared.rb, &parent->shared.rb, link); in vma_interval_tree_insert_after() [all …]
|
/linux/arch/arm64/crypto/ |
H A D | sm3-neon-core.S | 42 #define rb w4 macro 356 ldp ra, rb, [RSTATE, #0] 401 R1(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 0, 0, IW, _, 0) 402 R1(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 1, 1, IW, _, 0) 403 R1(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 2, 2, IW, _, 0) 404 R1(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 3, 3, IW, _, 0) 407 R1(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 4, 0, IW, _, 0) 408 R1(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 5, 1, IW, _, 0) 409 R1(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 6, 2, IW, SCHED_W_W0W1W2W3W4W5_1, 12) 410 R1(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 7, 3, IW, SCHED_W_W0W1W2W3W4W5_2, 12) [all …]
|
/linux/drivers/target/iscsi/ |
H A D | iscsi_target_configfs.c | 44 ssize_t rb; in lio_target_np_driver_show() local 48 rb = sysfs_emit(page, "1\n"); in lio_target_np_driver_show() 50 rb = sysfs_emit(page, "0\n"); in lio_target_np_driver_show() 52 return rb; in lio_target_np_driver_show() 474 ssize_t rb; \ 479 rb = snprintf(page, PAGE_SIZE, \ 483 rb = snprintf(page, PAGE_SIZE, "%u\n", \ 488 return rb; \ 530 ssize_t rb = 0; in lio_target_nacl_info_show() local 536 rb += sysfs_emit_at(page, rb, "No active iSCSI Session for Initiator" in lio_target_nacl_info_show() [all …]
|
/linux/drivers/firmware/arm_scmi/ |
H A D | raw_mode.c | 261 struct scmi_raw_buffer *rb = NULL; in scmi_raw_buffer_get() local 266 rb = list_first_entry(head, struct scmi_raw_buffer, node); in scmi_raw_buffer_get() 267 list_del_init(&rb->node); in scmi_raw_buffer_get() 271 return rb; in scmi_raw_buffer_get() 275 struct scmi_raw_buffer *rb) in scmi_raw_buffer_put() argument 280 rb->msg.len = rb->max_len; in scmi_raw_buffer_put() 283 list_add_tail(&rb->node, &q->free_bufs); in scmi_raw_buffer_put() 288 struct scmi_raw_buffer *rb) in scmi_raw_buffer_enqueue() argument 293 list_add_tail(&rb->node, &q->msg_q); in scmi_raw_buffer_enqueue() 302 struct scmi_raw_buffer *rb = NULL; in scmi_raw_buffer_dequeue_unlocked() local [all …]
|
/linux/drivers/gpu/drm/ |
H A D | drm_prime.c | 100 struct rb_node **p, *rb; in drm_prime_add_buf_handle() local 110 rb = NULL; in drm_prime_add_buf_handle() 115 rb = *p; in drm_prime_add_buf_handle() 116 pos = rb_entry(rb, struct drm_prime_member, dmabuf_rb); in drm_prime_add_buf_handle() 118 p = &rb->rb_right; in drm_prime_add_buf_handle() 120 p = &rb->rb_left; in drm_prime_add_buf_handle() 122 rb_link_node(&member->dmabuf_rb, rb, p); in drm_prime_add_buf_handle() 125 rb = NULL; in drm_prime_add_buf_handle() 130 rb = *p; in drm_prime_add_buf_handle() 131 pos = rb_entry(rb, struct drm_prime_member, handle_rb); in drm_prime_add_buf_handle() [all …]
|
/linux/fs/jffs2/ |
H A D | nodelist.h | 230 struct rb_node rb; member 271 struct rb_node rb; member 334 return rb_entry(node, struct jffs2_node_frag, rb); in frag_first() 344 return rb_entry(node, struct jffs2_node_frag, rb); in frag_last() 347 #define frag_next(frag) rb_entry(rb_next(&(frag)->rb), struct jffs2_node_frag, rb) 348 #define frag_prev(frag) rb_entry(rb_prev(&(frag)->rb), struct jffs2_node_frag, rb) 349 #define frag_parent(frag) rb_entry(rb_parent(&(frag)->rb), struct jffs2_node_frag, rb) 350 #define frag_left(frag) rb_entry((frag)->rb.rb_left, struct jffs2_node_frag, rb) 351 #define frag_right(frag) rb_entry((frag)->rb.rb_right, struct jffs2_node_frag, rb) 352 #define frag_erase(frag, list) rb_erase(&frag->rb, list) [all …]
|
/linux/tools/testing/selftests/bpf/benchs/ |
H A D | run_bench_ringbufs.sh | 10 for b in rb-libbpf rb-custom pb-libbpf pb-custom; do 15 for b in rb-libbpf rb-custom pb-libbpf pb-custom; do 20 for b in rb-libbpf rb-custom pb-libbpf pb-custom; do 43 for b in rb-libbpf rb-custom pb-libbpf pb-custom; do
|
/linux/net/sunrpc/xprtrdma/ |
H A D | verbs.c | 82 static void rpcrdma_regbuf_dma_unmap(struct rpcrdma_regbuf *rb); 83 static void rpcrdma_regbuf_free(struct rpcrdma_regbuf *rb); 861 struct rpcrdma_regbuf *rb; in rpcrdma_req_setup() local 868 rb = rpcrdma_regbuf_alloc(__roundup_pow_of_two(maxhdrsize), in rpcrdma_req_setup() 870 if (!rb) in rpcrdma_req_setup() 873 if (!__rpcrdma_regbuf_dma_map(r_xprt, rb)) in rpcrdma_req_setup() 876 req->rl_rdmabuf = rb; in rpcrdma_req_setup() 877 xdr_buf_init(&req->rl_hdrbuf, rdmab_data(rb), rdmab_length(rb)); in rpcrdma_req_setup() 881 rpcrdma_regbuf_free(rb); in rpcrdma_req_setup() 1246 struct rpcrdma_regbuf *rb; in rpcrdma_regbuf_alloc_node() local [all …]
|
H A D | xprt_rdma.h | 129 static inline u64 rdmab_addr(struct rpcrdma_regbuf *rb) in rdmab_addr() argument 131 return rb->rg_iov.addr; in rdmab_addr() 134 static inline u32 rdmab_length(struct rpcrdma_regbuf *rb) in rdmab_length() argument 136 return rb->rg_iov.length; in rdmab_length() 139 static inline u32 rdmab_lkey(struct rpcrdma_regbuf *rb) in rdmab_lkey() argument 141 return rb->rg_iov.lkey; in rdmab_lkey() 144 static inline struct ib_device *rdmab_device(struct rpcrdma_regbuf *rb) in rdmab_device() argument 146 return rb->rg_device; in rdmab_device() 149 static inline void *rdmab_data(const struct rpcrdma_regbuf *rb) in rdmab_data() argument 151 return rb->rg_data; in rdmab_data() [all …]
|
/linux/drivers/xen/xenbus/ |
H A D | xenbus_dev_frontend.c | 130 struct read_buffer *rb; in xenbus_file_read() local 148 rb = list_entry(u->read_buffers.next, struct read_buffer, list); in xenbus_file_read() 151 size_t sz = min_t(size_t, len - i, rb->len - rb->cons); in xenbus_file_read() 153 ret = copy_to_user(ubuf + i, &rb->msg[rb->cons], sz); in xenbus_file_read() 156 rb->cons += sz - ret; in xenbus_file_read() 165 if (rb->cons == rb->len) { in xenbus_file_read() 166 list_del(&rb->list); in xenbus_file_read() 167 kfree(rb); in xenbus_file_read() 170 rb = list_entry(u->read_buffers.next, in xenbus_file_read() 191 struct read_buffer *rb; in queue_reply() local [all …]
|
/linux/drivers/infiniband/hw/hfi1/ |
H A D | pin_system.c | 17 struct mmu_rb_node rb; member 74 return node->rb.handler->mn.mm; in mm_from_sdma_node() 111 return container_of(rb_node, struct sdma_mmu_node, rb); in find_system_node() 151 node->rb.addr = start_address; in pin_system_pages() 152 node->rb.len = length; in pin_system_pages() 181 kref_init(&node->rb.refcount); in add_system_pinning() 184 kref_get(&node->rb.refcount); in add_system_pinning() 189 ret = hfi1_mmu_rb_insert(pq->handler, &node->rb); in add_system_pinning() 239 if (node->rb.addr <= start) { in get_system_cache_entry() 249 node->rb.addr, kref_read(&node->rb.refcount)); in get_system_cache_entry() [all …]
|
/linux/arch/arm/lib/ |
H A D | getuser.S | 49 rb .req ip label 51 3: ldrbt rb, [r0], #0 53 rb .req r0 label 55 3: ldrb rb, [r0, #1] 58 orr r2, r2, rb, lsl #8 60 orr r2, rb, r2, lsl #8 117 rb .req ip label 119 10: ldrbt rb, [r0], #0 121 rb .req r0 label 123 10: ldrb rb, [r0, #1] [all …]
|
/linux/tools/testing/selftests/bpf/progs/ |
H A D | refcounted_kptr.c | 144 struct bpf_rb_node *rb; in __read_from_tree() local 150 rb = bpf_rbtree_first(root); in __read_from_tree() 151 if (!rb) { in __read_from_tree() 156 n = container_of(rb, struct node_data, r); in __read_from_tree() 164 rb = bpf_rbtree_remove(root, rb); in __read_from_tree() 166 if (!rb) in __read_from_tree() 168 n = container_of(rb, struct node_data, r); in __read_from_tree() 509 struct bpf_rb_node *rb; in BPF_PROG() local 519 rb = bpf_rbtree_first(&root); in BPF_PROG() 520 if (!rb) in BPF_PROG() [all …]
|