Home
last modified time | relevance | path

Searched refs:attr (Results 1 – 25 of 2413) sorted by relevance

12345678910>>...97

/linux/drivers/infiniband/hw/hfi1/
H A Dsysfs.c105 struct ib_port_attribute *attr, char *buf) in cc_prescan_show() argument
114 struct ib_port_attribute *attr, const char *buf, in cc_prescan_store() argument
130 &ib_port_attr_cc_prescan.attr,
142 struct ib_port_attribute attr; member
147 struct ib_port_attribute *attr, char *buf) in sc2vl_attr_show() argument
150 container_of(attr, struct hfi1_sc2vl_attr, attr); in sc2vl_attr_show()
158 .attr = __ATTR(N, 0444, sc2vl_attr_show, NULL), \
196 &hfi1_sc2vl_attr_0.attr.attr,
197 &hfi1_sc2vl_attr_1.attr.attr,
198 &hfi1_sc2vl_attr_2.attr.attr,
[all …]
/linux/tools/arch/x86/include/asm/
H A Dinat.h121 static inline int inat_is_legacy_prefix(insn_attr_t attr) in inat_is_legacy_prefix() argument
123 attr &= INAT_PFX_MASK; in inat_is_legacy_prefix()
124 return attr && attr <= INAT_LGCPFX_MAX; in inat_is_legacy_prefix()
127 static inline int inat_is_address_size_prefix(insn_attr_t attr) in inat_is_address_size_prefix() argument
129 return (attr & INAT_PFX_MASK) == INAT_PFX_ADDRSZ; in inat_is_address_size_prefix()
132 static inline int inat_is_operand_size_prefix(insn_attr_t attr) in inat_is_operand_size_prefix() argument
134 return (attr & INAT_PFX_MASK) == INAT_PFX_OPNDSZ; in inat_is_operand_size_prefix()
137 static inline int inat_is_rex_prefix(insn_attr_t attr) in inat_is_rex_prefix() argument
139 return (attr & INAT_PFX_MASK) == INAT_PFX_REX; in inat_is_rex_prefix()
142 static inline int inat_is_rex2_prefix(insn_attr_t attr) in inat_is_rex2_prefix() argument
[all …]
/linux/arch/x86/include/asm/
H A Dinat.h121 static inline int inat_is_legacy_prefix(insn_attr_t attr) in inat_is_legacy_prefix() argument
123 attr &= INAT_PFX_MASK; in inat_is_legacy_prefix()
124 return attr && attr <= INAT_LGCPFX_MAX; in inat_is_legacy_prefix()
127 static inline int inat_is_address_size_prefix(insn_attr_t attr) in inat_is_address_size_prefix() argument
129 return (attr & INAT_PFX_MASK) == INAT_PFX_ADDRSZ; in inat_is_address_size_prefix()
132 static inline int inat_is_operand_size_prefix(insn_attr_t attr) in inat_is_operand_size_prefix() argument
134 return (attr & INAT_PFX_MASK) == INAT_PFX_OPNDSZ; in inat_is_operand_size_prefix()
137 static inline int inat_is_rex_prefix(insn_attr_t attr) in inat_is_rex_prefix() argument
139 return (attr & INAT_PFX_MASK) == INAT_PFX_REX; in inat_is_rex_prefix()
142 static inline int inat_is_rex2_prefix(insn_attr_t attr) in inat_is_rex2_prefix() argument
[all …]
/linux/drivers/scsi/
H A Discsi_boot_sysfs.c24 struct attribute attr; member
33 struct attribute *attr, char *buf) in iscsi_boot_show_attribute() argument
38 container_of(attr, struct iscsi_boot_attr, attr); in iscsi_boot_show_attribute()
71 .attr = { .name = __stringify(sysfs_name), .mode = 0444 }, \
92 &iscsi_boot_attr_tgt_index.attr,
93 &iscsi_boot_attr_tgt_flags.attr,
94 &iscsi_boot_attr_tgt_ip.attr,
95 &iscsi_boot_attr_tgt_port.attr,
96 &iscsi_boot_attr_tgt_lun.attr,
97 &iscsi_boot_attr_tgt_chap.attr,
[all …]
H A Dscsi_transport_iscsi.c127 show_transport_handle(struct device *dev, struct device_attribute *attr, in show_transport_handle() argument
142 struct device_attribute *attr,char *buf) \
152 &dev_attr_handle.attr,
153 &dev_attr_caps.attr,
188 show_ep_handle(struct device *dev, struct device_attribute *attr, char *buf) in show_ep_handle() argument
196 &dev_attr_ep_handle.attr,
321 show_##type##_##name(struct device *dev, struct device_attribute *attr, \
442 struct attribute *attr, int i) in iscsi_iface_attr_is_visible() argument
449 if (attr == &dev_attr_iface_def_taskmgmt_tmo.attr) in iscsi_iface_attr_is_visible()
451 else if (attr == &dev_attr_iface_header_digest.attr) in iscsi_iface_attr_is_visible()
[all …]
/linux/drivers/memory/
H A Ddfl-emif.c52 struct device_attribute attr; member
58 container_of(dev_attr, struct emif_attr, attr)
61 struct device_attribute *attr, char *buf) in emif_state_show() argument
63 struct emif_attr *eattr = to_emif_attr(attr); in emif_state_show()
74 struct device_attribute *attr, in emif_clear_store() argument
77 struct emif_attr *eattr = to_emif_attr(attr); in emif_clear_store()
108 { .attr = __ATTR(inf##_index##_##_name, 0444, \
114 { .attr = __ATTR(inf##_index##_clear, 0200, \
148 &emif_attr_inf0_init_done.attr.attr,
149 &emif_attr_inf0_cal_fail.attr.attr,
[all …]
/linux/tools/net/ynl/lib/
H A Dynl-priv.h190 static inline unsigned int ynl_attr_type(const struct nlattr *attr) in ynl_attr_type() argument
192 return attr->nla_type & NLA_TYPE_MASK; in ynl_attr_type()
195 static inline unsigned int ynl_attr_data_len(const struct nlattr *attr) in ynl_attr_data_len() argument
197 return attr->nla_len - NLA_HDRLEN; in ynl_attr_data_len()
200 static inline void *ynl_attr_data(const struct nlattr *attr) in ynl_attr_data() argument
202 return (unsigned char *)attr + NLA_HDRLEN; in ynl_attr_data()
205 static inline void *ynl_attr_data_end(const struct nlattr *attr) in ynl_attr_data_end() argument
207 return (char *)ynl_attr_data(attr) + ynl_attr_data_len(attr); in ynl_attr_data_end()
210 #define ynl_attr_for_each(attr, nlh, fixed_hdr_sz) \ argument
211 for ((attr) = ynl_attr_first(nlh, (nlh)->nlmsg_len, \
[all …]
/linux/kernel/
H A Dfail_function.c58 struct fei_attr *attr; in fei_attr_new() local
60 attr = kzalloc(sizeof(*attr), GFP_KERNEL); in fei_attr_new()
61 if (attr) { in fei_attr_new()
62 attr->kp.symbol_name = kstrdup(sym, GFP_KERNEL); in fei_attr_new()
63 if (!attr->kp.symbol_name) { in fei_attr_new()
64 kfree(attr); in fei_attr_new()
67 attr->kp.pre_handler = fei_kprobe_handler; in fei_attr_new()
68 attr->kp.post_handler = fei_post_handler; in fei_attr_new()
69 attr->retval = adjust_error_retval(addr, 0); in fei_attr_new()
70 INIT_LIST_HEAD(&attr->list); in fei_attr_new()
[all …]
/linux/drivers/ufs/core/
H A Dufs-sysfs.c133 struct device_attribute *attr, in ufs_sysfs_pm_lvl_store() argument
162 struct device_attribute *attr, char *buf) in rpm_lvl_show() argument
170 struct device_attribute *attr, const char *buf, size_t count) in rpm_lvl_store() argument
172 return ufs_sysfs_pm_lvl_store(dev, attr, buf, count, true); in rpm_lvl_store()
176 struct device_attribute *attr, char *buf) in rpm_target_dev_state_show() argument
185 struct device_attribute *attr, char *buf) in rpm_target_link_state_show() argument
194 struct device_attribute *attr, char *buf) in spm_lvl_show() argument
202 struct device_attribute *attr, const char *buf, size_t count) in spm_lvl_store() argument
204 return ufs_sysfs_pm_lvl_store(dev, attr, buf, count, false); in spm_lvl_store()
208 struct device_attribute *attr, char *buf) in spm_target_dev_state_show() argument
[all …]
/linux/drivers/base/
H A Dsoc.c22 static ssize_t soc_info_show(struct device *dev, struct device_attribute *attr,
27 struct soc_device_attribute *attr; member
48 struct attribute *attr, in soc_attribute_mode() argument
54 if ((attr == &dev_attr_machine.attr) && soc_dev->attr->machine) in soc_attribute_mode()
55 return attr->mode; in soc_attribute_mode()
56 if ((attr == &dev_attr_family.attr) && soc_dev->attr->family) in soc_attribute_mode()
57 return attr->mode; in soc_attribute_mode()
58 if ((attr == &dev_attr_revision.attr) && soc_dev->attr->revision) in soc_attribute_mode()
59 return attr->mode; in soc_attribute_mode()
60 if ((attr == &dev_attr_serial_number.attr) && soc_dev->attr->serial_number) in soc_attribute_mode()
[all …]
/linux/drivers/hwmon/
H A Dnct7802.c83 struct device_attribute *attr, char *buf) in temp_type_show() argument
86 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in temp_type_show()
98 struct device_attribute *attr, const char *buf, in temp_type_store() argument
102 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in temp_type_store()
119 struct device_attribute *attr, char *buf) in pwm_mode_show() argument
121 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in pwm_mode_show()
139 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in pwm_show() local
144 if (!attr->index) in pwm_show()
147 ret = regmap_read(data->regmap, attr->index, &val); in pwm_show()
157 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in pwm_store() local
[all …]
H A Dadt7462.c781 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in temp_min_show() local
784 if (!temp_enabled(data, attr->index)) in temp_min_show()
787 return sprintf(buf, "%d\n", 1000 * (data->temp_min[attr->index] - 64)); in temp_min_show()
794 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in temp_min_store() local
799 if (kstrtol(buf, 10, &temp) || !temp_enabled(data, attr->index)) in temp_min_store()
806 data->temp_min[attr->index] = temp; in temp_min_store()
807 i2c_smbus_write_byte_data(client, ADT7462_TEMP_MIN_REG(attr->index), in temp_min_store()
817 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in temp_max_show() local
820 if (!temp_enabled(data, attr->index)) in temp_max_show()
823 return sprintf(buf, "%d\n", 1000 * (data->temp_max[attr->index] - 64)); in temp_max_show()
[all …]
/linux/drivers/infiniband/hw/bng_re/
H A Dbng_sp.c43 struct bng_re_dev_attr *attr = rcfw->res->dattr; in bng_re_get_dev_attr() local
70 attr->max_qp = le32_to_cpu(sb->max_qp); in bng_re_get_dev_attr()
72 attr->max_qp += 1; in bng_re_get_dev_attr()
73 attr->max_qp_rd_atom = in bng_re_get_dev_attr()
76 attr->max_qp_init_rd_atom = in bng_re_get_dev_attr()
79 attr->max_qp_wqes = le16_to_cpu(sb->max_qp_wr) - 1; in bng_re_get_dev_attr()
82 attr->max_qp_wqes = min_t(u32, attr->max_qp_wqes, BNG_VAR_MAX_WQE - 1); in bng_re_get_dev_attr()
84 attr->max_qp_sges = min_t(u32, sb->max_sge_var_wqe, BNG_VAR_MAX_SGE); in bng_re_get_dev_attr()
85 attr->max_cq = le32_to_cpu(sb->max_cq); in bng_re_get_dev_attr()
86 attr->max_cq_wqes = le32_to_cpu(sb->max_cqe); in bng_re_get_dev_attr()
[all …]
/linux/tools/perf/tests/
H A Dparse-events.c79 return (evsel->core.attr.config & PERF_HW_EVENT_MASK) == expected_config; in test_hw_config()
114 TEST_ASSERT_EVSEL("wrong type", PERF_TYPE_TRACEPOINT == evsel->core.attr.type, evsel); in test__checkevent_tracepoint()
116 PERF_TP_SAMPLE_TYPE == evsel->core.attr.sample_type, evsel); in test__checkevent_tracepoint()
117 TEST_ASSERT_EVSEL("wrong sample_period", 1 == evsel->core.attr.sample_period, evsel); in test__checkevent_tracepoint()
130 PERF_TYPE_TRACEPOINT == evsel->core.attr.type, in test__checkevent_tracepoint_multi()
133 PERF_TP_SAMPLE_TYPE == evsel->core.attr.sample_type, in test__checkevent_tracepoint_multi()
136 1 == evsel->core.attr.sample_period, in test__checkevent_tracepoint_multi()
155 evsel->core.attr.type == PERF_TYPE_RAW, in test__checkevent_raw()
167 if (pmu->type == evsel->core.attr.type) { in test__checkevent_raw()
186 TEST_ASSERT_EVSEL("wrong type", 1 == evsel->core.attr.type, evsel); in test__checkevent_numeric()
[all …]
/linux/drivers/usb/typec/
H A Dpd.c37 dual_role_power_show(struct device *dev, struct device_attribute *attr, char *buf) in dual_role_power_show() argument
44 usb_suspend_supported_show(struct device *dev, struct device_attribute *attr, char *buf) in usb_suspend_supported_show() argument
51 higher_capability_show(struct device *dev, struct device_attribute *attr, char *buf) in higher_capability_show() argument
58 unconstrained_power_show(struct device *dev, struct device_attribute *attr, char *buf) in unconstrained_power_show() argument
65 usb_communication_capable_show(struct device *dev, struct device_attribute *attr, char *buf) in usb_communication_capable_show() argument
72 dual_role_data_show(struct device *dev, struct device_attribute *attr, char *buf) in dual_role_data_show() argument
80 struct device_attribute *attr, char *buf) in unchunked_extended_messages_supported_show() argument
87 peak_current_show(struct device *dev, struct device_attribute *attr, char *buf) in peak_current_show() argument
94 fast_role_swap_current_show(struct device *dev, struct device_attribute *attr, char *buf) in fast_role_swap_current_show() argument
100 static ssize_t voltage_show(struct device *dev, struct device_attribute *attr, char *buf) in voltage_show() argument
[all …]
/linux/drivers/infiniband/sw/rxe/
H A Drxe_srq.c13 struct ib_srq_attr *attr = &init->attr; in rxe_srq_chk_init() local
15 if (attr->max_wr > rxe->attr.max_srq_wr) { in rxe_srq_chk_init()
17 attr->max_wr, rxe->attr.max_srq_wr); in rxe_srq_chk_init()
21 if (attr->max_wr <= 0) { in rxe_srq_chk_init()
22 rxe_dbg_dev(rxe, "max_wr(%d) <= 0\n", attr->max_wr); in rxe_srq_chk_init()
26 if (attr->max_wr < RXE_MIN_SRQ_WR) in rxe_srq_chk_init()
27 attr->max_wr = RXE_MIN_SRQ_WR; in rxe_srq_chk_init()
29 if (attr->max_sge > rxe->attr.max_srq_sge) { in rxe_srq_chk_init()
31 attr->max_sge, rxe->attr.max_srq_sge); in rxe_srq_chk_init()
35 if (attr->max_sge < RXE_MIN_SRQ_SGE) in rxe_srq_chk_init()
[all …]
H A Drxe_qp.c69 if (cap->max_send_wr > rxe->attr.max_qp_wr) { in rxe_qp_chk_cap()
71 cap->max_send_wr, rxe->attr.max_qp_wr); in rxe_qp_chk_cap()
75 if (cap->max_send_sge > rxe->attr.max_send_sge) { in rxe_qp_chk_cap()
77 cap->max_send_sge, rxe->attr.max_send_sge); in rxe_qp_chk_cap()
82 if (cap->max_recv_wr > rxe->attr.max_qp_wr) { in rxe_qp_chk_cap()
84 cap->max_recv_wr, rxe->attr.max_qp_wr); in rxe_qp_chk_cap()
88 if (cap->max_recv_sge > rxe->attr.max_recv_sge) { in rxe_qp_chk_cap()
90 cap->max_recv_sge, rxe->attr.max_recv_sge); in rxe_qp_chk_cap()
168 for (i = 0; i < qp->attr.max_dest_rd_atomic; i++) { in free_rd_atomic_resources()
189 for (i = 0; i < qp->attr.max_dest_rd_atomic; i++) { in cleanup_rd_atomic_resources()
[all …]
/linux/drivers/net/ethernet/meta/fbnic/
H A Dfbnic_tlv.c57 struct fbnic_tlv_msg *attr; in fbnic_tlv_attr_put_flag() local
60 if (attr_max_len < sizeof(*attr)) in fbnic_tlv_attr_put_flag()
64 attr = &msg[le16_to_cpu(msg->hdr.len)]; in fbnic_tlv_attr_put_flag()
70 attr->hdr = hdr; in fbnic_tlv_attr_put_flag()
99 struct fbnic_tlv_msg *attr; in fbnic_tlv_attr_put_value() local
102 if (attr_max_len < sizeof(*attr) + len) in fbnic_tlv_attr_put_value()
106 attr = &msg[le16_to_cpu(msg->hdr.len)]; in fbnic_tlv_attr_put_value()
114 attr->value[len / sizeof(hdr)] = 0; in fbnic_tlv_attr_put_value()
117 memcpy(attr->value, value, len); in fbnic_tlv_attr_put_value()
119 attr->hdr = hdr; in fbnic_tlv_attr_put_value()
[all …]
/linux/arch/arm64/kvm/vgic/
H A Dvgic-kvm-device.c93 static int kvm_vgic_addr(struct kvm *kvm, struct kvm_device_attr *attr, bool write) in kvm_vgic_addr() argument
95 u64 __user *uaddr = (u64 __user *)attr->addr; in kvm_vgic_addr()
103 if (write || attr->attr == KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION) in kvm_vgic_addr()
112 switch (attr->attr) { in kvm_vgic_addr()
211 struct kvm_device_attr *attr) in vgic_set_common_attr() argument
215 switch (attr->group) { in vgic_set_common_attr()
217 r = kvm_vgic_addr(dev->kvm, attr, true); in vgic_set_common_attr()
220 u32 __user *uaddr = (u32 __user *)(long)attr->addr; in vgic_set_common_attr()
256 switch (attr->attr) { in vgic_set_common_attr()
292 struct kvm_device_attr *attr) in vgic_get_common_attr() argument
[all …]
/linux/net/bridge/
H A Dbr_sysfs_br.c67 struct device_attribute *attr, char *buf) in forward_delay_show() argument
80 struct device_attribute *attr, in forward_delay_store() argument
87 static ssize_t hello_time_show(struct device *d, struct device_attribute *attr, in hello_time_show() argument
101 struct device_attribute *attr, const char *buf, in hello_time_store() argument
108 static ssize_t max_age_show(struct device *d, struct device_attribute *attr, in max_age_show() argument
121 static ssize_t max_age_store(struct device *d, struct device_attribute *attr, in max_age_store() argument
129 struct device_attribute *attr, char *buf) in ageing_time_show() argument
142 struct device_attribute *attr, in ageing_time_store() argument
150 struct device_attribute *attr, char *buf) in stp_state_show() argument
164 struct device_attribute *attr, const char *buf, in stp_state_store() argument
[all …]
/linux/drivers/fpga/
H A Ddfl-fme-perf.c179 struct device_attribute *attr, char *buf) in cpumask_show() argument
191 &dev_attr_cpumask.attr,
222 &format_attr_event.attr,
223 &format_attr_evtype.attr,
224 &format_attr_portid.attr,
523 struct device_attribute *attr, char *buf) in fme_perf_event_show() argument
529 eattr = container_of(attr, struct dev_ext_attribute, attr); in fme_perf_event_show()
558 .attr = FME_EVENT_ATTR(_name), \
565 &fme_perf_event_clock.attr.attr,
577 .attr = FME_EVENT_ATTR(cache_##_name), \
[all …]
/linux/drivers/net/ethernet/intel/fm10k/
H A Dfm10k_tlv.c38 u32 *attr; in fm10k_tlv_attr_put_null_string() local
44 attr = &msg[FM10K_TLV_DWORD_LEN(*msg)]; in fm10k_tlv_attr_put_null_string()
50 attr[len / 4] = attr_data; in fm10k_tlv_attr_put_null_string()
62 attr[(len + 3) / 4] = attr_data; in fm10k_tlv_attr_put_null_string()
66 attr[0] = len | attr_id; in fm10k_tlv_attr_put_null_string()
84 static s32 fm10k_tlv_attr_get_null_string(u32 *attr, unsigned char *string) in fm10k_tlv_attr_get_null_string() argument
89 if (!string || !attr) in fm10k_tlv_attr_get_null_string()
92 len = *attr >> FM10K_TLV_LEN_SHIFT; in fm10k_tlv_attr_get_null_string()
93 attr++; in fm10k_tlv_attr_get_null_string()
96 string[len] = (u8)(attr[len / 4] >> (8 * (len % 4))); in fm10k_tlv_attr_get_null_string()
[all …]
/linux/net/core/
H A Dselftests.c20 struct net_packet_attrs *attr)
30 size = attr->size + NET_TEST_PKT_SIZE;
32 if (attr->tcp)
37 if (attr->max_size && attr->max_size > size)
38 size = attr->max_size;
53 if (attr->tcp)
60 if (attr->src) in net_test_get_skb()
61 ether_addr_copy(ehdr->h_source, attr->src); in net_test_get_skb()
62 if (attr in net_test_get_skb()
56 net_test_get_skb(struct net_device * ndev,struct net_packet_attrs * attr) net_test_get_skb() argument
269 __net_test_loopback(struct net_device * ndev,struct net_packet_attrs * attr) __net_test_loopback() argument
348 struct net_packet_attrs attr = { }; net_test_phy_loopback_udp() local
356 struct net_packet_attrs attr = { }; net_test_phy_loopback_udp_mtu() local
365 struct net_packet_attrs attr = { }; net_test_phy_loopback_tcp() local
400 struct net_packet_attrs attr = { }; net_test_phy_loopback_tcp_bad_csum() local
[all...]
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dobj_name.c25 union bpf_attr attr; in test_obj_name() local
30 ncopy = name_len < sizeof(attr.prog_name) ? in test_obj_name()
31 name_len : sizeof(attr.prog_name); in test_obj_name()
32 bzero(&attr, sizeof(attr)); in test_obj_name()
33 attr.prog_type = BPF_PROG_TYPE_SCHED_CLS; in test_obj_name()
34 attr.insn_cnt = 2; in test_obj_name()
35 attr.insns = ptr_to_u64(prog); in test_obj_name()
36 attr.license = ptr_to_u64(""); in test_obj_name()
37 memcpy(attr.prog_name, tests[i].name, ncopy); in test_obj_name()
39 fd = syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr)); in test_obj_name()
[all …]
/linux/drivers/nvme/host/
H A Dsysfs.c14 struct device_attribute *attr, const char *buf, in nvme_sysfs_reset() argument
28 struct device_attribute *attr, const char *buf, in nvme_sysfs_rescan() argument
39 struct device_attribute *attr, char *buf) in nvme_adm_passthru_err_log_enabled_show() argument
48 struct device_attribute *attr, const char *buf, size_t count) in nvme_adm_passthru_err_log_enabled_store() argument
73 struct device_attribute *attr, char *buf) in nvme_io_passthru_err_log_enabled_show() argument
81 struct device_attribute *attr, const char *buf, size_t count) in nvme_io_passthru_err_log_enabled_store() argument
103 static ssize_t wwid_show(struct device *dev, struct device_attribute *attr, in wwid_show() argument
134 static ssize_t nguid_show(struct device *dev, struct device_attribute *attr, in nguid_show() argument
141 static ssize_t uuid_show(struct device *dev, struct device_attribute *attr, in uuid_show() argument
158 static ssize_t eui_show(struct device *dev, struct device_attribute *attr, in eui_show() argument
[all …]

12345678910>>...97