Home
last modified time | relevance | path

Searched refs:th (Results 1 – 25 of 334) sorted by relevance

12345678910>>...14

/linux/drivers/macintosh/
H A Dtherm_adt746x.c92 static void write_both_fan_speed(struct thermostat *th, int speed);
93 static void write_fan_speed(struct thermostat *th, int speed, int fan);
96 write_reg(struct thermostat* th, int reg, u8 data) in write_reg() argument
103 rc = i2c_master_send(th->clt, (const char *)tmp, 2); in write_reg()
112 read_reg(struct thermostat* th, int reg) in read_reg() argument
118 rc = i2c_master_send(th->clt, &reg_addr, 1); in read_reg()
123 rc = i2c_master_recv(th->clt, (char *)&data, 1); in read_reg()
129 static int read_fan_speed(struct thermostat *th, u8 addr) in read_fan_speed() argument
135 tmp[1] = read_reg(th, addr); in read_fan_speed()
136 tmp[0] = read_reg(th, addr + 1); in read_fan_speed()
[all …]
/linux/tools/lib/thermal/
H A Dsampling.c17 struct thermal_handler *th = thp->th; in handle_thermal_sample() local
26 return th->ops->sampling.tz_temp( in handle_thermal_sample()
34 thermal_error_t thermal_sampling_handle(struct thermal_handler *th, void *arg) in thermal_sampling_handle() argument
36 struct thermal_handler_param thp = { .th = th, .arg = arg }; in thermal_sampling_handle()
38 if (!th) in thermal_sampling_handle()
41 if (nl_cb_set(th->cb_sampling, NL_CB_VALID, NL_CB_CUSTOM, in thermal_sampling_handle()
45 return nl_recvmsgs(th->sk_sampling, th->cb_sampling); in thermal_sampling_handle()
48 int thermal_sampling_fd(struct thermal_handler *th) in thermal_sampling_fd() argument
50 if (!th) in thermal_sampling_fd()
53 return nl_socket_get_fd(th->sk_sampling); in thermal_sampling_fd()
[all …]
H A Dthermal.c9 int for_each_thermal_threshold(struct thermal_threshold *th, cb_th_t cb, void *arg) in for_each_thermal_threshold() argument
13 if (!th) in for_each_thermal_threshold()
16 for (i = 0; th[i].temperature != INT_MAX; i++) in for_each_thermal_threshold()
17 ret |= cb(&th[i], arg); in for_each_thermal_threshold()
92 static int __thermal_zone_discover(struct thermal_zone *tz, void *th) in __thermal_zone_discover() argument
94 if (thermal_cmd_get_trip(th, tz) < 0) in __thermal_zone_discover()
97 if (thermal_cmd_threshold_get(th, tz)) in __thermal_zone_discover()
100 if (thermal_cmd_get_governor(th, tz)) in __thermal_zone_discover()
106 struct thermal_zone *thermal_zone_discover(struct thermal_handler *th) in thermal_zone_discover() argument
110 if (thermal_cmd_get_tz(th, &tz) < 0) in thermal_zone_discover()
[all …]
H A Devents.c27 struct thermal_events_ops *ops = &thp->th->ops->events; in handle_thermal_event()
148 thermal_error_t thermal_events_handle(struct thermal_handler *th, void *arg) in thermal_events_handle() argument
150 struct thermal_handler_param thp = { .th = th, .arg = arg }; in thermal_events_handle()
152 if (!th) in thermal_events_handle()
155 if (nl_cb_set(th->cb_event, NL_CB_VALID, NL_CB_CUSTOM, in thermal_events_handle()
159 return nl_recvmsgs(th->sk_event, th->cb_event); in thermal_events_handle()
162 int thermal_events_fd(struct thermal_handler *th) in thermal_events_fd() argument
164 if (!th) in thermal_events_fd()
167 return nl_socket_get_fd(th->sk_event); in thermal_events_fd()
170 thermal_error_t thermal_events_exit(struct thermal_handler *th) in thermal_events_exit() argument
[all …]
H A Dcommands.c374 static thermal_error_t thermal_genl_auto(struct thermal_handler *th, cmd_cb_t cmd_cb, in thermal_genl_auto() argument
394 if (nl_send_msg(th->sk_cmd, th->cb_cmd, msg, genl_handle_msg, arg)) in thermal_genl_auto()
404 thermal_error_t thermal_cmd_get_tz(struct thermal_handler *th, struct thermal_zone **tz) in thermal_cmd_get_tz() argument
406 return thermal_genl_auto(th, NULL, NULL, THERMAL_GENL_CMD_TZ_GET_ID, in thermal_cmd_get_tz()
410 thermal_error_t thermal_cmd_get_cdev(struct thermal_handler *th, struct thermal_cdev **tc) in thermal_cmd_get_cdev() argument
412 return thermal_genl_auto(th, NULL, NULL, THERMAL_GENL_CMD_CDEV_GET, in thermal_cmd_get_cdev()
416 thermal_error_t thermal_cmd_get_trip(struct thermal_handler *th, struct thermal_zone *tz) in thermal_cmd_get_trip() argument
420 return thermal_genl_auto(th, thermal_genl_tz_id_encode, &p, in thermal_cmd_get_trip()
424 thermal_error_t thermal_cmd_get_governor(struct thermal_handler *th, struct thermal_zone *tz) in thermal_cmd_get_governor() argument
428 return thermal_genl_auto(th, thermal_genl_tz_id_encode, &p, in thermal_cmd_get_governor()
[all …]
/linux/drivers/thermal/
H A Ddb8500_thermal.c64 struct db8500_thermal_zone *th = thermal_zone_device_priv(tz); in db8500_thermal_get_temp() local
71 *temp = th->interpolated_temp; in db8500_thermal_get_temp()
80 static void db8500_thermal_update_config(struct db8500_thermal_zone *th, in db8500_thermal_update_config() argument
87 th->cur_index = idx; in db8500_thermal_update_config()
88 th->interpolated_temp = (next_low + next_high)/2; in db8500_thermal_update_config()
100 struct db8500_thermal_zone *th = irq_data; in prcmu_low_irq_handler() local
101 unsigned int idx = th->cur_index; in prcmu_low_irq_handler()
117 db8500_thermal_update_config(th, idx, next_low, next_high); in prcmu_low_irq_handler()
118 dev_dbg(th->dev, in prcmu_low_irq_handler()
121 thermal_zone_device_update(th->tz, THERMAL_EVENT_UNSPECIFIED); in prcmu_low_irq_handler()
[all …]
/linux/drivers/hwtracing/intel_th/
H A Dcore.c105 struct intel_th *th = to_intel_th(hub); in intel_th_remove() local
121 for (i = 0, lowest = -1; i < th->num_thdevs; i++) { in intel_th_remove()
127 if (th->thdev[i]->type != INTEL_TH_OUTPUT) { in intel_th_remove()
129 th->thdev[lowest] = th->thdev[i]; in intel_th_remove()
130 th->thdev[i] = NULL; in intel_th_remove()
140 intel_th_device_remove(th->thdev[i]); in intel_th_remove()
141 th->thdev[i] = NULL; in intel_th_remove()
145 th->num_thdevs = lowest; in intel_th_remove()
192 const struct intel_th *th = to_intel_th(thdev); in intel_th_output_devnode() local
196 node = kasprintf(GFP_KERNEL, "intel_th%d/%s%d", th->id, in intel_th_output_devnode()
[all …]
H A Dpci.c30 static int intel_th_pci_activate(struct intel_th *th) in intel_th_pci_activate() argument
32 struct pci_dev *pdev = to_pci_dev(th->dev); in intel_th_pci_activate()
36 if (!INTEL_TH_CAP(th, tscu_enable)) in intel_th_pci_activate()
51 static void intel_th_pci_deactivate(struct intel_th *th) in intel_th_pci_deactivate() argument
53 struct pci_dev *pdev = to_pci_dev(th->dev); in intel_th_pci_deactivate()
57 if (!INTEL_TH_CAP(th, tscu_enable)) in intel_th_pci_deactivate()
79 struct intel_th *th; in intel_th_pci_probe() local
107 th = intel_th_alloc(&pdev->dev, drvdata, resource, r); in intel_th_pci_probe()
108 if (IS_ERR(th)) { in intel_th_pci_probe()
109 err = PTR_ERR(th); in intel_th_pci_probe()
[all …]
H A Dacpi.c42 struct intel_th *th; in intel_th_acpi_probe() local
54 th = intel_th_alloc(&pdev->dev, (void *)id->driver_data, resource, r); in intel_th_acpi_probe()
55 if (IS_ERR(th)) in intel_th_acpi_probe()
56 return PTR_ERR(th); in intel_th_acpi_probe()
58 adev->driver_data = th; in intel_th_acpi_probe()
65 struct intel_th *th = platform_get_drvdata(pdev); in intel_th_acpi_remove() local
67 intel_th_free(th); in intel_th_acpi_remove()
/linux/net/ipv4/
H A Dtcp_offload.c38 struct tcphdr *th; in __tcpv4_gso_segment_csum() local
44 th = tcp_hdr(seg); in __tcpv4_gso_segment_csum()
47 inet_proto_csum_replace4(&th->check, seg, *oldip, newip, true); in __tcpv4_gso_segment_csum()
48 inet_proto_csum_replace2(&th->check, seg, *oldport, newport, false); in __tcpv4_gso_segment_csum()
57 const struct tcphdr *th; in __tcpv4_gso_segment_list_csum() local
64 th = tcp_hdr(seg); in __tcpv4_gso_segment_list_csum()
69 if (!(*(const u32 *)&th->source ^ *(const u32 *)&th2->source) && in __tcpv4_gso_segment_list_csum()
79 &th2->source, th->source); in __tcpv4_gso_segment_list_csum()
82 &th2->dest, th->dest); in __tcpv4_gso_segment_list_csum()
108 struct tcphdr *th = tcp_hdr(skb); in tcp4_gso_segment() local
[all …]
H A Dsyncookies.c155 u32 __cookie_v4_init_sequence(const struct iphdr *iph, const struct tcphdr *th, in __cookie_v4_init_sequence() argument
167 th->source, th->dest, ntohl(th->seq), in __cookie_v4_init_sequence()
175 const struct tcphdr *th = tcp_hdr(skb); in cookie_v4_init_sequence() local
177 return __cookie_v4_init_sequence(iph, th, mssp); in cookie_v4_init_sequence()
184 int __cookie_v4_check(const struct iphdr *iph, const struct tcphdr *th) in __cookie_v4_check() argument
186 __u32 cookie = ntohl(th->ack_seq) - 1; in __cookie_v4_check()
187 __u32 seq = ntohl(th->seq) - 1; in __cookie_v4_check()
191 th->source, th->dest, seq); in __cookie_v4_check()
270 const struct tcphdr *th = tcp_hdr(skb); in cookie_tcp_reqsk_init() local
274 ireq->ir_num = ntohs(th->dest); in cookie_tcp_reqsk_init()
[all …]
/linux/net/ceph/
H A Dauth_x.c122 struct ceph_x_ticket_handler *th; in get_ticket_handler() local
128 th = rb_entry(parent, struct ceph_x_ticket_handler, node); in get_ticket_handler()
129 if (service < th->service) in get_ticket_handler()
131 else if (service > th->service) in get_ticket_handler()
134 return th; in get_ticket_handler()
138 th = kzalloc(sizeof(*th), GFP_NOFS); in get_ticket_handler()
139 if (!th) in get_ticket_handler()
141 th->service = service; in get_ticket_handler()
142 rb_link_node(&th->node, parent, p); in get_ticket_handler()
143 rb_insert_color(&th->node, &xi->ticket_handlers); in get_ticket_handler()
[all …]
/linux/net/ipv6/
H A Dtcpv6_offload.c18 struct tcphdr *th) in tcp6_check_fraglist_gro() argument
30 p = tcp_gro_lookup(head, th); in tcp6_check_fraglist_gro()
39 sk = __inet6_lookup_established(net, &hdr->saddr, th->source, in tcp6_check_fraglist_gro()
40 &hdr->daddr, ntohs(th->dest), in tcp6_check_fraglist_gro()
51 struct tcphdr *th; in tcp6_gro_receive() local
59 th = tcp_gro_pull_header(skb); in tcp6_gro_receive()
60 if (!th) in tcp6_gro_receive()
63 tcp6_check_fraglist_gro(head, skb, th); in tcp6_gro_receive()
65 return tcp_gro_receive(head, skb, th); in tcp6_gro_receive()
76 struct tcphdr *th = tcp_hdr(skb); in tcp6_gro_complete() local
[all …]
/linux/net/netfilter/
H A Dnf_synproxy_core.c29 const struct tcphdr *th, struct synproxy_options *opts) in synproxy_parse_options() argument
31 int length = (th->doff * 4) - sizeof(*th); in synproxy_parse_options()
37 ptr = skb_header_pointer(skb, doff + sizeof(*th), length, buf); in synproxy_parse_options()
115 synproxy_build_options(struct tcphdr *th, const struct synproxy_options *opts) in synproxy_build_options() argument
117 __be32 *ptr = (__be32 *)(th + 1); in synproxy_build_options()
186 struct tcphdr *th, struct nf_conn *ct, in synproxy_tstamp_adjust() argument
197 optend = protoff + th->doff * 4; in synproxy_tstamp_adjust()
229 inet_proto_csum_replace4(&th->check, skb, in synproxy_tstamp_adjust()
448 const struct sk_buff *skb, const struct tcphdr *th, in synproxy_send_client_synack() argument
470 nth->source = th->dest; in synproxy_send_client_synack()
[all …]
H A Dxt_tcpmss.c28 const struct tcphdr *th; in tcpmss_mt() local
36 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in tcpmss_mt()
37 if (th == NULL) in tcpmss_mt()
41 if (th->doff*4 < sizeof(*th)) in tcpmss_mt()
44 optlen = th->doff*4 - sizeof(*th); in tcpmss_mt()
49 op = skb_header_pointer(skb, par->thoff + sizeof(*th), optlen, _opt); in tcpmss_mt()
/linux/tools/lib/thermal/include/
H A Dthermal.h105 LIBTHERMAL_API int for_each_thermal_threshold(struct thermal_threshold *th, cb_th_t cb, void *arg);
112 LIBTHERMAL_API struct thermal_zone *thermal_zone_discover(struct thermal_handler *th);
116 LIBTHERMAL_API void thermal_exit(struct thermal_handler *th);
121 LIBTHERMAL_API thermal_error_t thermal_events_exit(struct thermal_handler *th);
123 LIBTHERMAL_API thermal_error_t thermal_events_init(struct thermal_handler *th);
125 LIBTHERMAL_API thermal_error_t thermal_events_handle(struct thermal_handler *th, void *arg);
127 LIBTHERMAL_API int thermal_events_fd(struct thermal_handler *th);
132 LIBTHERMAL_API thermal_error_t thermal_cmd_exit(struct thermal_handler *th);
134 LIBTHERMAL_API thermal_error_t thermal_cmd_init(struct thermal_handler *th);
136 LIBTHERMAL_API thermal_error_t thermal_cmd_get_tz(struct thermal_handler *th,
[all …]
/linux/net/ipv4/netfilter/
H A Dipt_SYNPROXY.c19 struct tcphdr *th, _th; in synproxy_tg4() local
24 th = skb_header_pointer(skb, par->thoff, sizeof(_th), &_th); in synproxy_tg4()
25 if (th == NULL) in synproxy_tg4()
28 if (!synproxy_parse_options(skb, par->thoff, th, &opts)) in synproxy_tg4()
31 if (th->syn && !(th->ack || th->fin || th->rst)) { in synproxy_tg4()
35 if (th->ece && th->cwr) in synproxy_tg4()
48 synproxy_send_client_synack(net, skb, th, &opts); in synproxy_tg4()
51 } else if (th->ack && !(th->fin || th->rst || th->syn)) { in synproxy_tg4()
53 if (synproxy_recv_client_ack(net, skb, th, &opts, ntohl(th->seq))) { in synproxy_tg4()
/linux/net/ipv6/netfilter/
H A Dip6t_SYNPROXY.c19 struct tcphdr *th, _th; in synproxy_tg6() local
24 th = skb_header_pointer(skb, par->thoff, sizeof(_th), &_th); in synproxy_tg6()
25 if (th == NULL) in synproxy_tg6()
28 if (!synproxy_parse_options(skb, par->thoff, th, &opts)) in synproxy_tg6()
31 if (th->syn && !(th->ack || th->fin || th->rst)) { in synproxy_tg6()
35 if (th->ece && th->cwr) in synproxy_tg6()
48 synproxy_send_client_synack_ipv6(net, skb, th, &opts); in synproxy_tg6()
52 } else if (th->ack && !(th->fin || th->rst || th->syn)) { in synproxy_tg6()
54 if (synproxy_recv_client_ack_ipv6(net, skb, th, &opts, in synproxy_tg6()
55 ntohl(th->seq))) { in synproxy_tg6()
/linux/tools/testing/selftests/bpf/progs/
H A Dtest_btf_skc_cls_ingress.c24 struct tcphdr *th, struct tcp_sock *tp, in test_syncookie_helper() argument
27 if (th->syn) { in test_syncookie_helper()
33 if (th->doff * 4 != 40) { in test_syncookie_helper()
38 if ((void *)th + 40 > data_end) { in test_syncookie_helper()
44 th, 40); in test_syncookie_helper()
55 th, sizeof(*th)); in test_syncookie_helper()
61 recv_cookie = bpf_ntohl(th->ack_seq) - 1; in test_syncookie_helper()
74 struct tcphdr *th; in handle_ip_tcp() local
86 th = (struct tcphdr *)(ip4h + 1); in handle_ip_tcp()
87 if (th + 1 > data_end) in handle_ip_tcp()
[all …]
H A Dtest_misc_tcp_hdr_options.c36 struct tcphdr th; in __check_active_hdr_in() member
119 if (hdr.th.dest != passive_lport_n || hdr.th.source != active_lport_n) in __check_active_hdr_in()
132 struct tcphdr *th; in check_active_hdr_in() local
137 th = skops->skb_data; in check_active_hdr_in()
138 if (th + 1 > skops->skb_data_end) in check_active_hdr_in()
141 if (tcp_hdrlen(th) < skops->skb_len) in check_active_hdr_in()
144 if (th->fin) in check_active_hdr_in()
147 if (th->ack && !th->fin && tcp_hdrlen(th) == skops->skb_len) in check_active_hdr_in()
175 struct tcphdr *th; in write_active_opt() local
217 th = skops->skb_data; in write_active_opt()
[all …]
/linux/drivers/net/slip/
H A Dslhc.c239 struct tcphdr *th, *oth; in slhc_compress() local
264 if (isize < nlen + sizeof(*th)) in slhc_compress()
267 th = (struct tcphdr *)(icp + nlen); in slhc_compress()
268 if (th->doff < sizeof(struct tcphdr) / 4) in slhc_compress()
270 hlen = nlen + th->doff * 4; in slhc_compress()
276 if(hlen > isize || th->syn || th->fin || th->rst || in slhc_compress()
277 ! (th->ack)){ in slhc_compress()
299 && th->source == cs->cs_tcp.source in slhc_compress()
300 && th->dest == cs->cs_tcp.dest) in slhc_compress()
357 || th->doff != cs->cs_tcp.doff in slhc_compress()
[all …]
/linux/include/net/
H A Dtcp_ecn.h99 static inline u8 tcp_accecn_ace(const struct tcphdr *th) in tcp_accecn_ace() argument
101 return (th->ae << 2) | (th->cwr << 1) | th->ece; in tcp_accecn_ace()
341 const struct tcphdr *th = (const struct tcphdr *)skb->data; in tcp_ecn_received_counters_payload() local
343 tcp_ecn_received_counters(sk, skb, skb->len - th->doff * 4); in tcp_ecn_received_counters_payload()
350 static inline bool cookie_accecn_ok(const struct tcphdr *th) in cookie_accecn_ok() argument
352 return tcp_accecn_ace(th) > 0x1; in cookie_accecn_ok()
377 static inline bool tcp_accecn_syn_requested(const struct tcphdr *th) in tcp_accecn_syn_requested() argument
379 u8 ace = tcp_accecn_ace(th); in tcp_accecn_syn_requested()
407 static inline void tcp_accecn_echo_syn_ect(struct tcphdr *th, u8 ect) in tcp_accecn_echo_syn_ect() argument
421 th->ae = !!(ect & INET_ECN_ECT_0); in tcp_accecn_echo_syn_ect()
[all …]
/linux/drivers/spi/
H A Dspi-virtio.c88 static int virtio_spi_set_delays(struct spi_transfer_head *th, in virtio_spi_set_delays() argument
105 th->cs_setup_ns = cpu_to_le32(cs_setup); in virtio_spi_set_delays()
118 th->word_delay_ns = cpu_to_le32(max(cs_word_delay_spi, cs_word_delay_xfer)); in virtio_spi_set_delays()
130 th->cs_delay_hold_ns = cpu_to_le32(delay + cs_hold); in virtio_spi_set_delays()
142 th->cs_change_delay_inactive_ns = in virtio_spi_set_delays()
154 struct spi_transfer_head *th; in virtio_spi_transfer_one() local
168 th = &spi_req->transfer_head; in virtio_spi_transfer_one()
171 th->chip_select_id = spi_get_chipselect(spi, 0); in virtio_spi_transfer_one()
172 th->bits_per_word = spi->bits_per_word; in virtio_spi_transfer_one()
173 th->cs_change = xfer->cs_change; in virtio_spi_transfer_one()
[all …]
/linux/tools/testing/selftests/drivers/net/mlxsw/
H A Dsharedbuffer_configuration.py36 def _get_static_size(self, th): argument
39 return th * 8000 * self._cell_size()
49 th = random.randint(3, 16)
51 return th
53 return self._get_static_size(th)
82 th = self._get_th(pool)
84 return (pool_n, th)
89 th = self._get_th(pool)
90 return (th,)
237 def dl_set(self, pool, th): argument
[all …]
/linux/drivers/char/
H A Dds1620.c336 struct therm th; in ds1620_proc_therm_show() local
339 ds1620_read_state(&th); in ds1620_proc_therm_show()
343 th.hi >> 1, th.hi & 1 ? 5 : 0, in ds1620_proc_therm_show()
344 th.lo >> 1, th.lo & 1 ? 5 : 0, in ds1620_proc_therm_show()
367 struct therm th, th_start; in ds1620_init() local
381 ds1620_read_state(&th); in ds1620_init()
388 ds1620_write_state(&th); in ds1620_init()
399 ds1620_read_state(&th); in ds1620_init()
404 th.hi >> 1, th.hi & 1 ? 5 : 0, in ds1620_init()
405 th.lo >> 1, th.lo & 1 ? 5 : 0, in ds1620_init()

12345678910>>...14