| /linux/drivers/gpu/drm/amd/amdgpu/ |
| H A D | amdgpu_ih.c | 42 int amdgpu_ih_ring_init(struct amdgpu_device *adev, struct amdgpu_ih_ring *ih, in amdgpu_ih_ring_init() argument 51 ih->ring_size = ring_size; in amdgpu_ih_ring_init() 52 ih->ptr_mask = ih->ring_size - 1; in amdgpu_ih_ring_init() 53 ih->rptr = 0; in amdgpu_ih_ring_init() 54 ih->use_bus_addr = use_bus_addr; in amdgpu_ih_ring_init() 59 if (ih->ring) in amdgpu_ih_ring_init() 65 ih->ring = dma_alloc_coherent(adev->dev, ih->ring_size + 8, in amdgpu_ih_ring_init() 67 if (ih->ring == NULL) in amdgpu_ih_ring_init() 70 ih->gpu_addr = dma_addr; in amdgpu_ih_ring_init() 71 ih->wptr_addr = dma_addr + ih->ring_size; in amdgpu_ih_ring_init() [all …]
|
| H A D | vega20_ih.c | 59 if (adev->irq.ih.ring_size) { in vega20_ih_init_register_offset() 60 ih_regs = &adev->irq.ih.ih_regs; in vega20_ih_init_register_offset() 105 struct amdgpu_ih_ring *ih, in vega20_ih_toggle_ring_interrupts() argument 111 ih_regs = &ih->ih_regs; in vega20_ih_toggle_ring_interrupts() 145 if (ih == &adev->irq.ih) in vega20_ih_toggle_ring_interrupts() 157 ih->enabled = true; in vega20_ih_toggle_ring_interrupts() 162 ih->enabled = false; in vega20_ih_toggle_ring_interrupts() 163 ih->rptr = 0; in vega20_ih_toggle_ring_interrupts() 179 struct amdgpu_ih_ring *ih[] = {&adev->irq.ih, &adev->irq.ih1, &adev->irq.ih2}; in vega20_ih_toggle_interrupts() local 183 for (i = 0; i < ARRAY_SIZE(ih); i++) { in vega20_ih_toggle_interrupts() [all …]
|
| H A D | vega10_ih.c | 51 if (adev->irq.ih.ring_size) { in vega10_ih_init_register_offset() 52 ih_regs = &adev->irq.ih.ih_regs; in vega10_ih_init_register_offset() 97 struct amdgpu_ih_ring *ih, in vega10_ih_toggle_ring_interrupts() argument 103 ih_regs = &ih->ih_regs; in vega10_ih_toggle_ring_interrupts() 109 if (ih == &adev->irq.ih) in vega10_ih_toggle_ring_interrupts() 121 ih->enabled = true; in vega10_ih_toggle_ring_interrupts() 126 ih->enabled = false; in vega10_ih_toggle_ring_interrupts() 127 ih->rptr = 0; in vega10_ih_toggle_ring_interrupts() 143 struct amdgpu_ih_ring *ih[] = {&adev->irq.ih, &adev->irq.ih1, &adev->irq.ih2}; in vega10_ih_toggle_interrupts() local 147 for (i = 0; i < ARRAY_SIZE(ih); i++) { in vega10_ih_toggle_interrupts() [all …]
|
| H A D | navi10_ih.c | 53 if (adev->irq.ih.ring_size) { in navi10_ih_init_register_offset() 54 ih_regs = &adev->irq.ih.ih_regs; in navi10_ih_init_register_offset() 153 struct amdgpu_ih_ring *ih, in navi10_ih_toggle_ring_interrupts() argument 159 ih_regs = &ih->ih_regs; in navi10_ih_toggle_ring_interrupts() 165 if (ih == &adev->irq.ih) in navi10_ih_toggle_ring_interrupts() 176 ih->enabled = true; in navi10_ih_toggle_ring_interrupts() 181 ih->enabled = false; in navi10_ih_toggle_ring_interrupts() 182 ih->rptr = 0; in navi10_ih_toggle_ring_interrupts() 198 struct amdgpu_ih_ring *ih[] = {&adev->irq.ih, &adev->irq.ih1, &adev->irq.ih2}; in navi10_ih_toggle_interrupts() local 202 for (i = 0; i < ARRAY_SIZE(ih); i++) { in navi10_ih_toggle_interrupts() [all …]
|
| H A D | ih_v6_0.c | 52 if (adev->irq.ih.ring_size) { in ih_v6_0_init_register_offset() 53 ih_regs = &adev->irq.ih.ih_regs; in ih_v6_0_init_register_offset() 128 struct amdgpu_ih_ring *ih, in ih_v6_0_toggle_ring_interrupts() argument 134 ih_regs = &ih->ih_regs; in ih_v6_0_toggle_ring_interrupts() 167 if (ih == &adev->irq.ih) in ih_v6_0_toggle_ring_interrupts() 178 ih->enabled = true; in ih_v6_0_toggle_ring_interrupts() 183 ih->enabled = false; in ih_v6_0_toggle_ring_interrupts() 184 ih->rptr = 0; in ih_v6_0_toggle_ring_interrupts() 200 struct amdgpu_ih_ring *ih[] = {&adev->irq.ih, &adev->irq.ih1}; in ih_v6_0_toggle_interrupts() local 204 for (i = 0; i < ARRAY_SIZE(ih); i++) { in ih_v6_0_toggle_interrupts() [all …]
|
| H A D | ih_v6_1.c | 52 if (adev->irq.ih.ring_size) { in ih_v6_1_init_register_offset() 53 ih_regs = &adev->irq.ih.ih_regs; in ih_v6_1_init_register_offset() 128 struct amdgpu_ih_ring *ih, in ih_v6_1_toggle_ring_interrupts() argument 134 ih_regs = &ih->ih_regs; in ih_v6_1_toggle_ring_interrupts() 139 if (ih == &adev->irq.ih) in ih_v6_1_toggle_ring_interrupts() 150 ih->enabled = true; in ih_v6_1_toggle_ring_interrupts() 155 ih->enabled = false; in ih_v6_1_toggle_ring_interrupts() 156 ih->rptr = 0; in ih_v6_1_toggle_ring_interrupts() 172 struct amdgpu_ih_ring *ih[] = {&adev->irq.ih, &adev->irq.ih1}; in ih_v6_1_toggle_interrupts() local 176 for (i = 0; i < ARRAY_SIZE(ih); i++) { in ih_v6_1_toggle_interrupts() [all …]
|
| H A D | tonga_ih.c | 67 adev->irq.ih.enabled = true; in tonga_ih_enable_interrupts() 87 adev->irq.ih.enabled = false; in tonga_ih_disable_interrupts() 88 adev->irq.ih.rptr = 0; in tonga_ih_disable_interrupts() 105 struct amdgpu_ih_ring *ih = &adev->irq.ih; in tonga_ih_irq_init() local 123 WREG32(mmIH_RB_BASE, ih->gpu_addr >> 8); in tonga_ih_irq_init() 125 rb_bufsz = order_base_2(adev->irq.ih.ring_size / 4); in tonga_ih_irq_init() 138 WREG32(mmIH_RB_WPTR_ADDR_LO, lower_32_bits(ih->wptr_addr)); in tonga_ih_irq_init() 139 WREG32(mmIH_RB_WPTR_ADDR_HI, upper_32_bits(ih->wptr_addr) & 0xFF); in tonga_ih_irq_init() 146 if (adev->irq.ih.use_doorbell) { in tonga_ih_irq_init() 148 OFFSET, adev->irq.ih.doorbell_index); in tonga_ih_irq_init() [all …]
|
| H A D | amdgpu_ih.h | 88 u32 (*get_wptr)(struct amdgpu_device *adev, struct amdgpu_ih_ring *ih); 89 void (*decode_iv)(struct amdgpu_device *adev, struct amdgpu_ih_ring *ih, 91 uint64_t (*decode_iv_ts)(struct amdgpu_ih_ring *ih, u32 rptr, 93 void (*set_rptr)(struct amdgpu_device *adev, struct amdgpu_ih_ring *ih); 96 #define amdgpu_ih_get_wptr(adev, ih) (adev)->irq.ih_funcs->get_wptr((adev), (ih)) argument 98 (adev)->irq.ih_funcs->decode_iv((adev), (ih), (iv)) 99 #define amdgpu_ih_decode_iv_ts(adev, ih, rptr, offset) \ argument 101 (adev)->irq.ih_funcs->decode_iv_ts((ih), (rptr), (offset))) 102 #define amdgpu_ih_set_rptr(adev, ih) (adev)->irq.ih_funcs->set_rptr((adev), (ih)) argument 104 int amdgpu_ih_ring_init(struct amdgpu_device *adev, struct amdgpu_ih_ring *ih, [all …]
|
| H A D | si_ih.c | 45 adev->irq.ih.enabled = true; in si_ih_enable_interrupts() 59 adev->irq.ih.enabled = false; in si_ih_disable_interrupts() 60 adev->irq.ih.rptr = 0; in si_ih_disable_interrupts() 65 struct amdgpu_ih_ring *ih = &adev->irq.ih; in si_ih_irq_init() local 77 WREG32(IH_RB_BASE, adev->irq.ih.gpu_addr >> 8); in si_ih_irq_init() 78 rb_bufsz = order_base_2(adev->irq.ih.ring_size / 4); in si_ih_irq_init() 85 WREG32(IH_RB_WPTR_ADDR_LO, lower_32_bits(ih->wptr_addr)); in si_ih_irq_init() 86 WREG32(IH_RB_WPTR_ADDR_HI, upper_32_bits(ih->wptr_addr) & 0xFF); in si_ih_irq_init() 112 struct amdgpu_ih_ring *ih) in si_ih_get_wptr() argument 116 wptr = le32_to_cpu(*ih->wptr_cpu); in si_ih_get_wptr() [all …]
|
| H A D | cik_ih.c | 69 adev->irq.ih.enabled = true; in cik_ih_enable_interrupts() 91 adev->irq.ih.enabled = false; in cik_ih_disable_interrupts() 92 adev->irq.ih.rptr = 0; in cik_ih_disable_interrupts() 108 struct amdgpu_ih_ring *ih = &adev->irq.ih; in cik_ih_irq_init() local 126 WREG32(mmIH_RB_BASE, adev->irq.ih.gpu_addr >> 8); in cik_ih_irq_init() 127 rb_bufsz = order_base_2(adev->irq.ih.ring_size / 4); in cik_ih_irq_init() 136 WREG32(mmIH_RB_WPTR_ADDR_LO, lower_32_bits(ih->wptr_addr)); in cik_ih_irq_init() 137 WREG32(mmIH_RB_WPTR_ADDR_HI, upper_32_bits(ih->wptr_addr) & 0xFF); in cik_ih_irq_init() 192 struct amdgpu_ih_ring *ih) in cik_ih_get_wptr() argument 196 wptr = le32_to_cpu(*ih->wptr_cpu); in cik_ih_get_wptr() [all …]
|
| H A D | cz_ih.c | 69 adev->irq.ih.enabled = true; in cz_ih_enable_interrupts() 91 adev->irq.ih.enabled = false; in cz_ih_disable_interrupts() 92 adev->irq.ih.rptr = 0; in cz_ih_disable_interrupts() 108 struct amdgpu_ih_ring *ih = &adev->irq.ih; in cz_ih_irq_init() local 127 WREG32(mmIH_RB_BASE, adev->irq.ih.gpu_addr >> 8); in cz_ih_irq_init() 129 rb_bufsz = order_base_2(adev->irq.ih.ring_size / 4); in cz_ih_irq_init() 138 WREG32(mmIH_RB_WPTR_ADDR_LO, lower_32_bits(ih->wptr_addr)); in cz_ih_irq_init() 139 WREG32(mmIH_RB_WPTR_ADDR_HI, upper_32_bits(ih->wptr_addr) & 0xFF); in cz_ih_irq_init() 194 struct amdgpu_ih_ring *ih) in cz_ih_get_wptr() argument 198 wptr = le32_to_cpu(*ih->wptr_cpu); in cz_ih_get_wptr() [all …]
|
| H A D | iceland_ih.c | 69 adev->irq.ih.enabled = true; in iceland_ih_enable_interrupts() 91 adev->irq.ih.enabled = false; in iceland_ih_disable_interrupts() 92 adev->irq.ih.rptr = 0; in iceland_ih_disable_interrupts() 108 struct amdgpu_ih_ring *ih = &adev->irq.ih; in iceland_ih_irq_init() local 127 WREG32(mmIH_RB_BASE, adev->irq.ih.gpu_addr >> 8); in iceland_ih_irq_init() 129 rb_bufsz = order_base_2(adev->irq.ih.ring_size / 4); in iceland_ih_irq_init() 138 WREG32(mmIH_RB_WPTR_ADDR_LO, lower_32_bits(ih->wptr_addr)); in iceland_ih_irq_init() 139 WREG32(mmIH_RB_WPTR_ADDR_HI, upper_32_bits(ih->wptr_addr) & 0xFF); in iceland_ih_irq_init() 194 struct amdgpu_ih_ring *ih) in iceland_ih_get_wptr() argument 198 wptr = le32_to_cpu(*ih->wptr_cpu); in iceland_ih_get_wptr() [all …]
|
| H A D | amdgpu_irq.c | 206 ret = amdgpu_ih_process(adev, &adev->irq.ih); in amdgpu_irq_handler() 375 amdgpu_ih_ring_fini(adev, &adev->irq.ih); in amdgpu_irq_fini_hw() 471 struct amdgpu_ih_ring *ih) in amdgpu_irq_dispatch() argument 473 u32 ring_index = ih->rptr >> 2; in amdgpu_irq_dispatch() 480 entry.ih = ih; in amdgpu_irq_dispatch() 481 entry.iv_entry = (const uint32_t *)&ih->ring[ring_index]; in amdgpu_irq_dispatch() 492 trace_amdgpu_iv(ih - &adev->irq.ih, &entry); in amdgpu_irq_dispatch() 531 if (amdgpu_ih_ts_after(ih->processed_timestamp, entry.timestamp)) in amdgpu_irq_dispatch() 532 ih->processed_timestamp = entry.timestamp; in amdgpu_irq_dispatch()
|
| /linux/net/bridge/netfilter/ |
| H A D | ebt_log.c | 99 const struct iphdr *ih; in ebt_log_packet() local 102 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in ebt_log_packet() 103 if (ih == NULL) { in ebt_log_packet() 108 &ih->saddr, &ih->daddr, ih->tos, ih->protocol); in ebt_log_packet() 109 print_ports(skb, ih->protocol, ih->ihl*4); in ebt_log_packet() 116 const struct ipv6hdr *ih; in ebt_log_packet() local 122 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in ebt_log_packet() 123 if (ih == NULL) { in ebt_log_packet() 128 &ih->saddr, &ih->daddr, ih->priority, ih->nexthdr); in ebt_log_packet() 129 nexthdr = ih->nexthdr; in ebt_log_packet()
|
| H A D | ebt_ip.c | 41 const struct iphdr *ih; in ebt_ip_mt() local 46 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in ebt_ip_mt() 47 if (ih == NULL) in ebt_ip_mt() 50 NF_INVF(info, EBT_IP_TOS, info->tos != ih->tos)) in ebt_ip_mt() 54 (ih->saddr & info->smsk) != info->saddr)) in ebt_ip_mt() 58 (ih->daddr & info->dmsk) != info->daddr)) in ebt_ip_mt() 61 if (NF_INVF(info, EBT_IP_PROTO, info->protocol != ih->protocol)) in ebt_ip_mt() 66 if (ntohs(ih->frag_off) & IP_OFFSET) in ebt_ip_mt() 70 pptr = skb_header_pointer(skb, ih->ihl*4, in ebt_ip_mt()
|
| H A D | ebt_among.c | 74 const struct iphdr *ih; in get_ip_dst() local 77 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in get_ip_dst() 78 if (ih == NULL) in get_ip_dst() 80 *addr = ih->daddr; in get_ip_dst() 105 const struct iphdr *ih; in get_ip_src() local 108 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in get_ip_src() 109 if (ih == NULL) in get_ip_src() 111 *addr = ih->saddr; in get_ip_src()
|
| /linux/net/netfilter/ipvs/ |
| H A D | ip_vs_proto.c | 220 struct iphdr _iph, *ih; in ip_vs_tcpudp_debug_packet_v4() local 222 ih = skb_header_pointer(skb, offset, sizeof(_iph), &_iph); in ip_vs_tcpudp_debug_packet_v4() 223 if (ih == NULL) in ip_vs_tcpudp_debug_packet_v4() 225 else if (ih->frag_off & htons(IP_OFFSET)) in ip_vs_tcpudp_debug_packet_v4() 226 sprintf(buf, "%pI4->%pI4 frag", &ih->saddr, &ih->daddr); in ip_vs_tcpudp_debug_packet_v4() 230 pptr = skb_header_pointer(skb, offset + ih->ihl*4, in ip_vs_tcpudp_debug_packet_v4() 234 &ih->saddr, &ih->daddr); in ip_vs_tcpudp_debug_packet_v4() 237 &ih->saddr, ntohs(pptr[0]), in ip_vs_tcpudp_debug_packet_v4() 238 &ih->daddr, ntohs(pptr[1])); in ip_vs_tcpudp_debug_packet_v4() 252 struct ipv6hdr _iph, *ih; in ip_vs_tcpudp_debug_packet_v6() local [all …]
|
| /linux/include/uapi/linux/ |
| H A D | coda.h | 322 struct coda_in_hdr ih; member 336 struct coda_in_hdr ih; member 347 struct coda_in_hdr ih; member 358 struct coda_in_hdr ih; member 369 struct coda_in_hdr ih; member 386 struct coda_in_hdr ih; member 398 struct coda_in_hdr ih; member 409 struct coda_in_hdr ih; member 425 struct coda_in_hdr ih; member 440 struct coda_in_hdr ih; member [all …]
|
| /linux/net/netfilter/ |
| H A D | nf_log_syslog.c | 305 const struct iphdr *ih; in dump_ipv4_packet() local 314 ih = skb_header_pointer(skb, iphoff, sizeof(_iph), &_iph); in dump_ipv4_packet() 315 if (!ih) { in dump_ipv4_packet() 324 nf_log_buf_add(m, "SRC=%pI4 DST=%pI4 ", &ih->saddr, &ih->daddr); in dump_ipv4_packet() 328 iph_totlen(skb, ih), ih->tos & IPTOS_TOS_MASK, in dump_ipv4_packet() 329 ih->tos & IPTOS_PREC_MASK, ih->ttl, ntohs(ih->id)); in dump_ipv4_packet() 332 if (ntohs(ih->frag_off) & IP_CE) in dump_ipv4_packet() 334 if (ntohs(ih->frag_off) & IP_DF) in dump_ipv4_packet() 336 if (ntohs(ih->frag_off) & IP_MF) in dump_ipv4_packet() 340 if (ntohs(ih->frag_off) & IP_OFFSET) in dump_ipv4_packet() [all …]
|
| H A D | nf_conntrack_proto_sctp.c | 263 struct sctp_inithdr _inithdr, *ih; in sctp_new() local 268 ih = skb_header_pointer(skb, offset + sizeof(_sch), in sctp_new() 270 if (!ih) in sctp_new() 274 ih->init_tag); in sctp_new() 276 ct->proto.sctp.vtag[IP_CT_DIR_REPLY] = ih->init_tag; in sctp_new() 463 struct sctp_inithdr _ih, *ih; in nf_conntrack_sctp_packet() local 465 ih = skb_header_pointer(skb, offset + sizeof(_sch), sizeof(*ih), &_ih); in nf_conntrack_sctp_packet() 466 if (!ih) in nf_conntrack_sctp_packet() 473 pr_debug("Setting vtag %x for dir %d\n", ih->init_tag, !dir); in nf_conntrack_sctp_packet() 474 ct->proto.sctp.vtag[!dir] = ih->init_tag; in nf_conntrack_sctp_packet() [all …]
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | xdp_features.c | 78 struct iphdr *ih = (struct iphdr *)(eh + 1); in xdp_process_echo_packet() local 84 ih = (struct iphdr *)(eh + 1); in xdp_process_echo_packet() 85 if (ih + 1 > (struct iphdr *)data_end) in xdp_process_echo_packet() 88 if (saddr != ih->saddr) in xdp_process_echo_packet() 91 if (daddr != ih->daddr) in xdp_process_echo_packet() 94 if (ih->protocol != IPPROTO_UDP) in xdp_process_echo_packet() 97 uh = (struct udphdr *)(ih + 1); in xdp_process_echo_packet()
|
| /linux/drivers/gpu/drm/amd/display/amdgpu_dm/ |
| H A D | amdgpu_dm_irq.c | 101 void (*ih)(void *), in init_handler_common_data() 105 hcd->handler = ih; in init_handler_common_data() 133 void *ih, in remove_irq_handler() argument 165 if (ih == handler->handler) { in remove_irq_handler() 186 ih, int_params->irq_source, int_params->int_context); in remove_irq_handler() 242 void (*ih)(void *)) in validate_irq_registration_params() 244 if (NULL == int_params || NULL == ih) { in validate_irq_registration_params() 305 void (*ih)(void *), in amdgpu_dm_irq_register_interrupt() 313 if (false == validate_irq_registration_params(int_params, ih)) in amdgpu_dm_irq_register_interrupt() 322 init_handler_common_data(handler_data, ih, handler_args, &adev->dm); in amdgpu_dm_irq_register_interrupt() [all …]
|
| /linux/drivers/net/ethernet/amd/xgbe/ |
| H A D | xgbe-selftest.c | 44 struct iphdr *ih; in xgbe_test_loopback_validate() local 74 ih = ip_hdr(skb); in xgbe_test_loopback_validate() 77 if (ih->protocol != IPPROTO_TCP) in xgbe_test_loopback_validate() 80 th = (struct tcphdr *)((u8 *)ih + 4 * ih->ihl); in xgbe_test_loopback_validate() 86 if (ih->protocol != IPPROTO_UDP) in xgbe_test_loopback_validate() 89 uh = (struct udphdr *)((u8 *)ih + 4 * ih->ihl); in xgbe_test_loopback_validate()
|
| /linux/kernel/ |
| H A D | audit.c | 2514 const struct iphdr *ih; in audit_log_nf_skb() local 2516 ih = skb_header_pointer(skb, skb_network_offset(skb), in audit_log_nf_skb() 2518 if (!ih) in audit_log_nf_skb() 2521 switch (ih->protocol) { in audit_log_nf_skb() 2532 &ih->saddr, &ih->daddr, ih->protocol, in audit_log_nf_skb() 2547 &ih->saddr, &ih->daddr, ih->protocol, in audit_log_nf_skb() 2561 &ih->saddr, &ih->daddr, ih->protocol, in audit_log_nf_skb() 2567 &ih->saddr, &ih->daddr, ih->protocol); in audit_log_nf_skb() 2574 const struct ipv6hdr *ih; in audit_log_nf_skb() local 2578 ih = skb_header_pointer(skb, skb_network_offset(skb), in audit_log_nf_skb() [all …]
|
| /linux/drivers/net/ethernet/sgi/ |
| H A D | ioc3-eth.c | 302 struct iphdr *ih; in ioc3_tcpudp_checksum() local 322 ih = (struct iphdr *)((char *)eh + ETH_HLEN); in ioc3_tcpudp_checksum() 323 if (ip_is_fragment(ih)) in ioc3_tcpudp_checksum() 326 proto = ih->protocol; in ioc3_tcpudp_checksum() 332 (ih->tot_len - (ih->ihl << 2)) + in ioc3_tcpudp_checksum() 333 htons((u16)ih->protocol) + in ioc3_tcpudp_checksum() 334 (ih->saddr >> 16) + (ih->saddr & 0xffff) + in ioc3_tcpudp_checksum() 335 (ih->daddr >> 16) + (ih->daddr & 0xffff); in ioc3_tcpudp_checksum() 996 const struct iphdr *ih = ip_hdr(skb); in ioc3_start_xmit() local 997 const int proto = ntohs(ih->protocol); in ioc3_start_xmit() [all …]
|