| /linux/drivers/infiniband/hw/hfi1/ |
| H A D | sysfs.c | 105 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 D | inat.h | 121 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 D | inat.h | 121 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/infiniband/core/ |
| H A D | sysfs.c | 50 struct ib_port_attribute attr; member 77 struct device_attribute attr; member 86 struct ib_port_attribute attr; member 106 struct attribute *attr, char *buf) in port_attr_show() argument 109 container_of(attr, struct ib_port_attribute, attr); in port_attr_show() 119 struct attribute *attr, in port_attr_store() argument 123 container_of(attr, struct ib_port_attribute, attr); in port_attr_store() 147 struct device_attribute *attr, char *buf) in hw_stat_device_show() argument 150 container_of(attr, struct hw_stats_device_attribute, attr); in hw_stat_device_show() 158 struct device_attribute *attr, in hw_stat_device_store() argument [all …]
|
| /linux/drivers/gpu/drm/xe/ |
| H A D | xe_gt_throttle.c | 65 struct kobj_attribute attr; member 79 static struct throttle_attribute *kobj_attribute_to_throttle(struct kobj_attribute *attr) in kobj_attribute_to_throttle() argument 81 return container_of(attr, struct throttle_attribute, attr); in kobj_attribute_to_throttle() 110 struct kobj_attribute *attr, char *buff) in reason_show() argument 112 struct throttle_attribute *ta = kobj_attribute_to_throttle(attr); in reason_show() 121 struct kobj_attribute *attr, char *buff) in reasons_show() argument 136 struct kobj_attribute *kattr = container_of(*pother, struct kobj_attribute, attr); in reasons_show() 158 .attr = __ATTR(name, 0444, reason_show, NULL), \ 164 .attr = __ATTR(name, 0444, _show, NULL), \ 180 &attr_reasons.attr.attr, [all …]
|
| /linux/drivers/scsi/ |
| H A D | iscsi_boot_sysfs.c | 24 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 D | scsi_transport_iscsi.c | 127 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/fs/orangefs/ |
| H A D | orangefs-sysfs.c | 166 struct attribute attr; member 168 struct orangefs_attribute *attr, 171 struct orangefs_attribute *attr, 177 struct attribute *attr, in orangefs_attr_show() argument 182 attribute = container_of(attr, struct orangefs_attribute, attr); in orangefs_attr_show() 189 struct attribute *attr, in orangefs_attr_store() argument 199 attribute = container_of(attr, struct orangefs_attribute, attr); in orangefs_attr_store() 211 struct orangefs_attribute *attr, char *buf) in sysfs_int_show() argument 219 if (!strcmp(attr->attr.name, "op_timeout_secs")) { in sysfs_int_show() 224 } else if (!strcmp(attr->attr.name, in sysfs_int_show() [all …]
|
| /linux/drivers/memory/ |
| H A D | dfl-emif.c | 52 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 D | ynl-priv.h | 190 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 D | fail_function.c | 58 struct fei_attr *attr; in fei_attr_new() local 60 attr = kzalloc_obj(*attr); 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/hwmon/ |
| H A D | nct7802.c | 83 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 D | adt7462.c | 781 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 D | bng_sp.c | 43 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 D | parse-events.c | 79 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 in test__checkevent_numeric() [all...] |
| /linux/drivers/usb/typec/ |
| H A D | pd.c | 37 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/fs/ntfs3/ |
| H A D | record.c | 38 struct ATTRIB *attr; in mi_new_attt_id() local 52 attr = NULL; in mi_new_attt_id() 55 attr = mi_enum_attr(ni, mi, attr); in mi_new_attt_id() 56 if (!attr) { in mi_new_attt_id() 62 t16 = le16_to_cpu(attr->id); in mi_new_attt_id() 65 attr = NULL; in mi_new_attt_id() 199 struct ATTRIB *attr) in mi_enum_attr() argument 207 if (!attr) { in mi_enum_attr() 225 attr = Add2Ptr(rec, off); in mi_enum_attr() 231 off = PtrOffset(rec, attr); in mi_enum_attr() [all …]
|
| /linux/drivers/infiniband/sw/rxe/ |
| H A D | rxe_qp.c | 69 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/fpga/ |
| H A D | dfl-fme-perf.c | 179 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/nvme/host/ |
| H A D | sysfs.c | 14 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 …]
|
| /linux/drivers/net/ethernet/intel/fm10k/ |
| H A D | fm10k_tlv.c | 38 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 D | selftests.c | 20 struct net_packet_attrs *attr) in net_test_get_skb() argument 30 size = attr->size + NET_TEST_PKT_SIZE; in net_test_get_skb() 32 if (attr->tcp) in net_test_get_skb() 37 if (attr->max_size && attr->max_size > size) in net_test_get_skb() 38 size = attr->max_size; in net_test_get_skb() 53 if (attr->tcp) in net_test_get_skb() 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->dst) in net_test_get_skb() 63 ether_addr_copy(ehdr->h_dest, attr->dst); in net_test_get_skb() [all …]
|
| /linux/drivers/dma/idxd/ |
| H A D | sysfs.c | 21 struct device_attribute *attr, char *buf) in engine_group_id_show() argument 32 struct device_attribute *attr, in engine_group_id_store() argument 74 &dev_attr_engine_group.attr, 116 struct device_attribute *attr, in group_read_buffers_reserved_show() argument 125 struct device_attribute *attr, in group_tokens_reserved_show() argument 129 return group_read_buffers_reserved_show(dev, attr, buf); in group_tokens_reserved_show() 133 struct device_attribute *attr, in group_read_buffers_reserved_store() argument 166 struct device_attribute *attr, in group_tokens_reserved_store() argument 170 return group_read_buffers_reserved_store(dev, attr, buf, count); in group_tokens_reserved_store() 182 struct device_attribute *attr, in group_read_buffers_allowed_show() argument [all …]
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | obj_name.c | 25 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/gpu/drm/amd/pm/ |
| H A D | amdgpu_pm.c | 58 ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr, 60 ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr, 216 struct device_attribute *attr, in amdgpu_get_power_dpm_state() argument 238 struct device_attribute *attr, in amdgpu_set_power_dpm_state() argument 328 struct device_attribute *attr, in amdgpu_get_power_dpm_force_performance_level() argument 358 struct device_attribute *attr, in amdgpu_set_power_dpm_force_performance_level() argument 410 struct device_attribute *attr, in amdgpu_get_pp_num_states() argument 440 struct device_attribute *attr, in amdgpu_get_pp_cur_state() argument 474 struct device_attribute *attr, in amdgpu_get_pp_force_state() argument 481 return amdgpu_get_pp_cur_state(dev, attr, buf); in amdgpu_get_pp_force_state() [all …]
|