/linux/drivers/infiniband/hw/mlx5/ |
H A D | wr.c | 55 void **seg, int *size, void **cur_edge) in set_eth_seg() argument 57 struct mlx5_wqe_eth_seg *eseg = *seg; in set_eth_seg() 85 *seg += stride; in set_eth_seg() 88 handle_post_send_edge(&qp->sq, seg, *size, cur_edge); in set_eth_seg() 91 mlx5r_memcpy_send_wqe(&qp->sq, cur_edge, seg, size, in set_eth_seg() 98 *seg += sizeof(struct mlx5_wqe_eth_seg); in set_eth_seg() 189 static void set_reg_mkey_seg(struct mlx5_mkey_seg *seg, in set_reg_mkey_seg() argument 195 memset(seg, 0, sizeof(*seg)); in set_reg_mkey_seg() 198 seg->log2_page_size = ilog2(mr->ibmr.page_size); in set_reg_mkey_seg() 203 seg->flags = get_umr_flags(access) | mr->access_mode; in set_reg_mkey_seg() [all …]
|
H A D | wr.h | 47 * @seg: Current WQE position (16B aligned). 51 static inline void handle_post_send_edge(struct mlx5_ib_wq *sq, void **seg, in handle_post_send_edge() argument 56 if (likely(*seg != *cur_edge)) in handle_post_send_edge() 62 *seg = mlx5_frag_buf_get_wqe(&sq->fbc, idx); in handle_post_send_edge() 66 * WQ's pointers. At the end @seg is aligned to 16B regardless the copied size. 69 * @seg: Current WQE position (16B aligned). 75 void **seg, u32 *wqe_sz, in mlx5r_memcpy_send_wqe() argument 79 size_t leftlen = *cur_edge - *seg; in mlx5r_memcpy_send_wqe() 83 memcpy(*seg, src, copysz); in mlx5r_memcpy_send_wqe() 88 *seg += stride; in mlx5r_memcpy_send_wqe() [all …]
|
/linux/ipc/ |
H A D | msgutil.c | 74 struct msg_msgseg *seg; in alloc_msg() local 79 seg = kmalloc(sizeof(*seg) + alen, GFP_KERNEL_ACCOUNT); in alloc_msg() 80 if (seg == NULL) in alloc_msg() 82 *pseg = seg; in alloc_msg() 83 seg->next = NULL; in alloc_msg() 84 pseg = &seg->next; in alloc_msg() 98 struct msg_msgseg *seg; in load_msg() local 110 for (seg = msg->next; seg != NULL; seg = seg->next) { in load_msg() 114 if (copy_from_user(seg + 1, src, alen)) in load_msg() 164 struct msg_msgseg *seg; in store_msg() local [all …]
|
/linux/tools/testing/selftests/sgx/ |
H A D | load.c | 106 static bool encl_ioc_add_pages(struct encl *encl, struct encl_segment *seg) in encl_ioc_add_pages() argument 113 secinfo.flags = seg->flags; in encl_ioc_add_pages() 115 ioc.src = (uint64_t)seg->src; in encl_ioc_add_pages() 116 ioc.offset = seg->offset; in encl_ioc_add_pages() 117 ioc.length = seg->size; in encl_ioc_add_pages() 119 if (seg->measure) in encl_ioc_add_pages() 180 struct encl_segment *seg; in encl_load() local 253 seg = &encl->segment_tbl[j]; in encl_load() 273 seg->prot = PROT_READ | PROT_WRITE; in encl_load() 274 seg->flags = SGX_PAGE_TYPE_TCS << 8; in encl_load() [all …]
|
/linux/net/ipv4/ |
H A D | udp_offload.c | 192 static void __udpv4_gso_segment_csum(struct sk_buff *seg, in __udpv4_gso_segment_csum() argument 202 uh = udp_hdr(seg); in __udpv4_gso_segment_csum() 203 iph = ip_hdr(seg); in __udpv4_gso_segment_csum() 206 inet_proto_csum_replace4(&uh->check, seg, *oldip, *newip, in __udpv4_gso_segment_csum() 208 inet_proto_csum_replace2(&uh->check, seg, *oldport, *newport, in __udpv4_gso_segment_csum() 221 struct sk_buff *seg; in __udpv4_gso_segment_list_csum() local 225 seg = segs; in __udpv4_gso_segment_list_csum() 226 uh = udp_hdr(seg); in __udpv4_gso_segment_list_csum() 227 iph = ip_hdr(seg); in __udpv4_gso_segment_list_csum() 229 if ((udp_hdr(seg)->dest == udp_hdr(seg->next)->dest) && in __udpv4_gso_segment_list_csum() [all …]
|
H A D | tcp_offload.c | 31 static void __tcpv4_gso_segment_csum(struct sk_buff *seg, in __tcpv4_gso_segment_csum() argument 41 th = tcp_hdr(seg); in __tcpv4_gso_segment_csum() 42 iph = ip_hdr(seg); in __tcpv4_gso_segment_csum() 44 inet_proto_csum_replace4(&th->check, seg, *oldip, newip, true); in __tcpv4_gso_segment_csum() 45 inet_proto_csum_replace2(&th->check, seg, *oldport, newport, false); in __tcpv4_gso_segment_csum() 56 struct sk_buff *seg; in __tcpv4_gso_segment_list_csum() local 60 seg = segs; in __tcpv4_gso_segment_list_csum() 61 th = tcp_hdr(seg); in __tcpv4_gso_segment_list_csum() 62 iph = ip_hdr(seg); in __tcpv4_gso_segment_list_csum() 63 th2 = tcp_hdr(seg->next); in __tcpv4_gso_segment_list_csum() [all …]
|
/linux/drivers/firmware/google/ |
H A D | memconsole-coreboot.c | 45 struct seg { /* describes ring buffer segments in logical order */ in memconsole_coreboot_read() struct 48 } seg[2] = { {0}, {0} }; in memconsole_coreboot_read() local 55 seg[0] = (struct seg){.phys = cursor, .len = size - cursor}; in memconsole_coreboot_read() 56 seg[1] = (struct seg){.phys = 0, .len = cursor}; in memconsole_coreboot_read() 58 seg[0] = (struct seg){.phys = 0, .len = min(cursor, size)}; in memconsole_coreboot_read() 61 for (i = 0; i < ARRAY_SIZE(seg) && count > done; i++) { in memconsole_coreboot_read() 63 cbmem_console->body + seg[i].phys, seg[i].len); in memconsole_coreboot_read() 64 pos -= seg[i].len; in memconsole_coreboot_read()
|
/linux/net/ipv6/ |
H A D | tcpv6_offload.c | 96 static void __tcpv6_gso_segment_csum(struct sk_buff *seg, in __tcpv6_gso_segment_csum() argument 104 th = tcp_hdr(seg); in __tcpv6_gso_segment_csum() 105 inet_proto_csum_replace2(&th->check, seg, *oldport, newport, false); in __tcpv6_gso_segment_csum() 113 struct sk_buff *seg; in __tcpv6_gso_segment_list_csum() local 117 seg = segs; in __tcpv6_gso_segment_list_csum() 118 th = tcp_hdr(seg); in __tcpv6_gso_segment_list_csum() 119 iph = ipv6_hdr(seg); in __tcpv6_gso_segment_list_csum() 120 th2 = tcp_hdr(seg->next); in __tcpv6_gso_segment_list_csum() 121 iph2 = ipv6_hdr(seg->next); in __tcpv6_gso_segment_list_csum() 128 while ((seg = seg->next)) { in __tcpv6_gso_segment_list_csum() [all …]
|
/linux/drivers/net/ethernet/intel/ice/ |
H A D | ice_ethtool_fdir.c | 627 * @seg: protocol header description pointer 632 ice_fdir_set_hw_fltr_rule(struct ice_pf *pf, struct ice_flow_seg_info *seg, in ice_fdir_set_hw_fltr_rule() argument 666 if (!memcmp(old_seg, seg, sizeof(*seg))) in ice_fdir_set_hw_fltr_rule() 691 err = ice_flow_add_prof(hw, ICE_BLK_FD, ICE_FLOW_RX, seg, in ice_fdir_set_hw_fltr_rule() 697 seg, &entry1_h); in ice_fdir_set_hw_fltr_rule() 702 seg, &entry2_h); in ice_fdir_set_hw_fltr_rule() 706 hw_prof->fdir_seg[tun] = seg; in ice_fdir_set_hw_fltr_rule() 726 ICE_FLOW_PRIO_NORMAL, seg, in ice_fdir_set_hw_fltr_rule() 782 * @seg: flow segment for programming 791 ice_set_init_fdir_seg(struct ice_flow_seg_info *seg, in ice_set_init_fdir_seg() argument [all …]
|
H A D | ice_ddp.c | 60 const struct ice_generic_seg_hdr *seg; in ice_verify_pkg() local 63 if (len < off + sizeof(*seg)) in ice_verify_pkg() 66 seg = (void *)pkg + off; in ice_verify_pkg() 69 if (len < off + le32_to_cpu(seg->seg_size)) in ice_verify_pkg() 90 hw->seg = NULL; in ice_free_seg() 381 if (!hw->seg) in ice_get_prof_index_max() 384 ice_seg = hw->seg; in ice_get_prof_index_max() 785 ice_seg = hw->seg; in ice_get_sw_fv_bitmap() 830 if (!lkups->n_val_words || !hw->seg) in ice_get_sw_fv_list() 833 ice_seg = hw->seg; in ice_get_sw_fv_list() [all …]
|
H A D | ice_flow.c | 683 * @seg: index of packet segment whose header size is to be determined 685 static u16 ice_flow_calc_seg_sz(struct ice_flow_prof_params *params, u8 seg) in ice_flow_calc_seg_sz() argument 690 sz = (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_VLAN) ? in ice_flow_calc_seg_sz() 694 if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_IPV4) in ice_flow_calc_seg_sz() 696 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_IPV6) in ice_flow_calc_seg_sz() 698 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_ARP) in ice_flow_calc_seg_sz() 700 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDRS_L4_MASK) in ice_flow_calc_seg_sz() 705 if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_ICMP) in ice_flow_calc_seg_sz() 707 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_TCP) in ice_flow_calc_seg_sz() 709 else if (params->prof->segs[seg].hdrs & ICE_FLOW_SEG_HDR_UDP) in ice_flow_calc_seg_sz() [all …]
|
/linux/arch/m68k/sun3/ |
H A D | mmu_emu.c | 129 unsigned long seg, num; in mmu_emu_init() local 152 for(seg = bootmem_end; seg < 0x0f800000; seg += SUN3_PMEG_SIZE) { in mmu_emu_init() 153 i = sun3_get_segmap(seg); in mmu_emu_init() 158 print_pte_vaddr (seg); in mmu_emu_init() 160 sun3_put_segmap(seg, SUN3_INVALID_PMEG); in mmu_emu_init() 165 for (num=0, seg=0x0F800000; seg<0x10000000; seg+=16*PAGE_SIZE) { in mmu_emu_init() 166 if (sun3_get_segmap (seg) != SUN3_INVALID_PMEG) { in mmu_emu_init() 170 print_pte_vaddr (seg + (i*PAGE_SIZE)); in mmu_emu_init() 177 m68k_vmalloc_end = seg; in mmu_emu_init() 182 pmeg_alloc[sun3_get_segmap(seg)] = 2; in mmu_emu_init() [all …]
|
/linux/drivers/usb/cdns3/ |
H A D | cdnsp-mem.c | 34 struct cdnsp_segment *seg; in cdnsp_segment_alloc() local 38 seg = kzalloc(sizeof(*seg), flags); in cdnsp_segment_alloc() 39 if (!seg) in cdnsp_segment_alloc() 42 seg->trbs = dma_pool_zalloc(pdev->segment_pool, flags, &dma); in cdnsp_segment_alloc() 43 if (!seg->trbs) { in cdnsp_segment_alloc() 44 kfree(seg); in cdnsp_segment_alloc() 49 seg->bounce_buf = kzalloc(max_packet, flags | GFP_DMA); in cdnsp_segment_alloc() 50 if (!seg->bounce_buf) in cdnsp_segment_alloc() 57 seg->trbs[i].link.control |= cpu_to_le32(TRB_CYCLE); in cdnsp_segment_alloc() 59 seg->dma = dma; in cdnsp_segment_alloc() [all …]
|
/linux/drivers/acpi/ |
H A D | pci_mcfg.c | 46 #define AL_ECAM(table_id, rev, seg, ops) \ argument 47 { "AMAZON", table_id, rev, seg, MCFG_BUS_ANY, ops } 58 #define QCOM_ECAM32(seg) \ argument 59 { "QCOM ", "QDF2432 ", 1, seg, MCFG_BUS_ANY, &pci_32b_ops } 70 #define HISI_QUAD_DOM(table_id, seg, ops) \ argument 71 { "HISI ", table_id, 0, (seg) + 0, MCFG_BUS_ANY, ops }, \ 72 { "HISI ", table_id, 0, (seg) + 1, MCFG_BUS_ANY, ops }, \ 73 { "HISI ", table_id, 0, (seg) + 2, MCFG_BUS_ANY, ops }, \ 74 { "HISI ", table_id, 0, (seg) + 3, MCFG_BUS_ANY, ops } 100 #define THUNDER_ECAM_QUIRK(rev, seg) \ argument [all …]
|
/linux/drivers/media/test-drivers/visl/ |
H A D | visl-trace-vp9.h | 25 "seg.feature_data {%s}\n" 26 "seg.feature_enabled %s\n" 27 "seg.tree_probs %s\n" 28 "seg.pred_probs %s\n" 29 "seg.flags %s\n" 65 __entry->f.seg.feature_data, 66 sizeof(__entry->f.seg.feature_data), 68 __print_array(__entry->f.seg.feature_enabled, 69 ARRAY_SIZE(__entry->f.seg.feature_enabled), 70 sizeof(__entry->f.seg.feature_enabled[0])), [all …]
|
/linux/arch/m68k/include/asm/ |
H A D | tlbflush.h | 142 unsigned char seg; in flush_tlb_mm() local 149 seg = sun3_get_segmap(i); in flush_tlb_mm() 150 if (seg == SUN3_INVALID_PMEG) in flush_tlb_mm() 154 pmeg_alloc[seg] = 0; in flush_tlb_mm() 155 pmeg_ctx[seg] = 0; in flush_tlb_mm() 156 pmeg_vaddr[seg] = 0; in flush_tlb_mm() 189 unsigned char seg, oldctx; in flush_tlb_range() local 198 if((seg = sun3_get_segmap(start)) == SUN3_INVALID_PMEG) in flush_tlb_range() 200 if(pmeg_ctx[seg] == mm->context) { in flush_tlb_range() 201 pmeg_alloc[seg] = 0; in flush_tlb_range() [all …]
|
/linux/drivers/net/ethernet/marvell/octeontx2/nic/ |
H A D | otx2_txrx.c | 84 struct sk_buff *skb, int seg, int *len) in otx2_dma_map_skb_frag() argument 91 if (!seg) { in otx2_dma_map_skb_frag() 96 frag = &skb_shinfo(skb)->frags[seg - 1]; in otx2_dma_map_skb_frag() 106 int seg; in otx2_dma_unmap_skb_frags() local 108 for (seg = 0; seg < sg->num_segs; seg++) { in otx2_dma_unmap_skb_frags() 109 otx2_dma_unmap_page(pfvf, sg->dma_addr[seg], in otx2_dma_unmap_skb_frags() 110 sg->size[seg], DMA_TO_DEVICE); in otx2_dma_unmap_skb_frags() 260 int seg; in otx2_free_rcv_seg() local 267 for (seg = 0; seg < sg->segs; seg++, seg_addr++) in otx2_free_rcv_seg() 349 int seg; in otx2_rcv_pkt_handler() local [all …]
|
/linux/fs/nfsd/ |
H A D | flexfilelayout.c | 26 struct nfsd4_layout_seg *seg = &args->lg_seg; in nfsd4_ff_proc_layoutget() local 53 if (seg->iomode == IOMODE_READ) { in nfsd4_ff_proc_layoutget() 68 seg->offset = 0; in nfsd4_ff_proc_layoutget() 69 seg->length = NFS4_MAX_UINT64; in nfsd4_ff_proc_layoutget() 71 dprintk("GET: 0x%llx:0x%llx %d\n", seg->offset, seg->length, in nfsd4_ff_proc_layoutget() 72 seg->iomode); in nfsd4_ff_proc_layoutget() 76 seg->length = 0; in nfsd4_ff_proc_layoutget()
|
H A D | blocklayout.c | 24 struct nfsd4_layout_seg *seg = &args->lg_seg; in nfsd4_block_proc_layoutget() local 32 if (seg->offset & (block_size - 1)) { in nfsd4_block_proc_layoutget() 47 error = sb->s_export_op->map_blocks(inode, seg->offset, seg->length, in nfsd4_block_proc_layoutget() 48 &iomap, seg->iomode != IOMODE_READ, in nfsd4_block_proc_layoutget() 63 if (seg->iomode == IOMODE_READ) in nfsd4_block_proc_layoutget() 70 if (seg->iomode & IOMODE_RW) { in nfsd4_block_proc_layoutget() 85 if (seg->iomode == IOMODE_READ) { in nfsd4_block_proc_layoutget() 102 seg->offset = iomap.offset; in nfsd4_block_proc_layoutget() 103 seg->length = iomap.length; in nfsd4_block_proc_layoutget() 109 seg->length = 0; in nfsd4_block_proc_layoutget() [all …]
|
/linux/drivers/infiniband/hw/mthca/ |
H A D | mthca_mr.c | 88 u32 seg; in mthca_buddy_alloc() local 95 seg = find_first_bit(buddy->bits[o], m); in mthca_buddy_alloc() 96 if (seg < m) in mthca_buddy_alloc() 104 __clear_bit(seg, buddy->bits[o]); in mthca_buddy_alloc() 109 seg <<= 1; in mthca_buddy_alloc() 110 __set_bit(seg ^ 1, buddy->bits[o]); in mthca_buddy_alloc() 116 seg <<= order; in mthca_buddy_alloc() 118 return seg; in mthca_buddy_alloc() 121 static void mthca_buddy_free(struct mthca_buddy *buddy, u32 seg, int order) in mthca_buddy_free() argument 123 seg >>= order; in mthca_buddy_free() [all …]
|
/linux/arch/x86/kvm/ |
H A D | smm.c | 141 static u32 enter_smm_get_segment_flags(struct kvm_segment *seg) in enter_smm_get_segment_flags() argument 144 flags |= seg->g << 23; in enter_smm_get_segment_flags() 145 flags |= seg->db << 22; in enter_smm_get_segment_flags() 146 flags |= seg->l << 21; in enter_smm_get_segment_flags() 147 flags |= seg->avl << 20; in enter_smm_get_segment_flags() 148 flags |= seg->present << 15; in enter_smm_get_segment_flags() 149 flags |= seg->dpl << 13; in enter_smm_get_segment_flags() 150 flags |= seg->s << 12; in enter_smm_get_segment_flags() 151 flags |= seg->type << 8; in enter_smm_get_segment_flags() 159 struct kvm_segment seg; in enter_smm_save_seg_32() local [all …]
|
/linux/drivers/peci/ |
H A D | internal.h | 47 struct peci_request *peci_xfer_ep_pci_cfg_local_readb(struct peci_device *device, u8 seg, 49 struct peci_request *peci_xfer_ep_pci_cfg_local_readw(struct peci_device *device, u8 seg, 51 struct peci_request *peci_xfer_ep_pci_cfg_local_readl(struct peci_device *device, u8 seg, 54 struct peci_request *peci_xfer_ep_pci_cfg_readb(struct peci_device *device, u8 seg, 56 struct peci_request *peci_xfer_ep_pci_cfg_readw(struct peci_device *device, u8 seg, 58 struct peci_request *peci_xfer_ep_pci_cfg_readl(struct peci_device *device, u8 seg, 61 struct peci_request *peci_xfer_ep_mmio32_readl(struct peci_device *device, u8 bar, u8 seg, 64 struct peci_request *peci_xfer_ep_mmio64_readl(struct peci_device *device, u8 bar, u8 seg,
|
/linux/net/sunrpc/xprtrdma/ |
H A D | rpc_rdma.c | 209 rpcrdma_convert_kvec(struct kvec *vec, struct rpcrdma_mr_seg *seg, in rpcrdma_convert_kvec() argument 212 seg->mr_page = virt_to_page(vec->iov_base); in rpcrdma_convert_kvec() 213 seg->mr_offset = offset_in_page(vec->iov_base); in rpcrdma_convert_kvec() 214 seg->mr_len = vec->iov_len; in rpcrdma_convert_kvec() 215 ++seg; in rpcrdma_convert_kvec() 217 return seg; in rpcrdma_convert_kvec() 230 struct rpcrdma_mr_seg *seg) in rpcrdma_convert_iovs() argument 238 seg = rpcrdma_convert_kvec(&xdrbuf->head[0], seg, &n); in rpcrdma_convert_iovs() 244 seg->mr_page = *ppages; in rpcrdma_convert_iovs() 245 seg->mr_offset = page_base; in rpcrdma_convert_iovs() [all …]
|
/linux/drivers/usb/host/ |
H A D | xhci-mem.c | 34 struct xhci_segment *seg; in xhci_segment_alloc() local 38 seg = kzalloc_node(sizeof(*seg), flags, dev_to_node(dev)); in xhci_segment_alloc() 39 if (!seg) in xhci_segment_alloc() 42 seg->trbs = dma_pool_zalloc(xhci->segment_pool, flags, &dma); in xhci_segment_alloc() 43 if (!seg->trbs) { in xhci_segment_alloc() 44 kfree(seg); in xhci_segment_alloc() 49 seg->bounce_buf = kzalloc_node(max_packet, flags, in xhci_segment_alloc() 51 if (!seg->bounce_buf) { in xhci_segment_alloc() 52 dma_pool_free(xhci->segment_pool, seg->trbs, dma); in xhci_segment_alloc() 53 kfree(seg); in xhci_segment_alloc() [all …]
|
/linux/kernel/rcu/ |
H A D | rcu_segcblist.h | 18 long rcu_segcblist_get_seglen(struct rcu_segcblist *rsclp, int seg); 103 static inline bool rcu_segcblist_restempty(struct rcu_segcblist *rsclp, int seg) in rcu_segcblist_restempty() argument 105 return !READ_ONCE(*READ_ONCE(rsclp->tails[seg])); in rcu_segcblist_restempty() 112 static inline bool rcu_segcblist_segempty(struct rcu_segcblist *rsclp, int seg) in rcu_segcblist_segempty() argument 114 if (seg == RCU_DONE_TAIL) in rcu_segcblist_segempty() 116 return rsclp->tails[seg - 1] == rsclp->tails[seg]; in rcu_segcblist_segempty()
|