Home
last modified time | relevance | path

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

12345678910>>...88

/Linux-v4.19/tools/lib/bpf/
Dbpf.c70 static inline int sys_bpf(enum bpf_cmd cmd, union bpf_attr *attr, in sys_bpf() argument
73 return syscall(__NR_bpf, cmd, attr, size); in sys_bpf()
79 union bpf_attr attr; in bpf_create_map_xattr() local
81 memset(&attr, '\0', sizeof(attr)); in bpf_create_map_xattr()
83 attr.map_type = create_attr->map_type; in bpf_create_map_xattr()
84 attr.key_size = create_attr->key_size; in bpf_create_map_xattr()
85 attr.value_size = create_attr->value_size; in bpf_create_map_xattr()
86 attr.max_entries = create_attr->max_entries; in bpf_create_map_xattr()
87 attr.map_flags = create_attr->map_flags; in bpf_create_map_xattr()
88 memcpy(attr.map_name, create_attr->name, in bpf_create_map_xattr()
[all …]
/Linux-v4.19/tools/perf/tests/
Dparse-events.c27 TEST_ASSERT_VAL("wrong type", PERF_TYPE_TRACEPOINT == evsel->attr.type); in test__checkevent_tracepoint()
29 PERF_TP_SAMPLE_TYPE == evsel->attr.sample_type); in test__checkevent_tracepoint()
30 TEST_ASSERT_VAL("wrong sample_period", 1 == evsel->attr.sample_period); in test__checkevent_tracepoint()
43 PERF_TYPE_TRACEPOINT == evsel->attr.type); in test__checkevent_tracepoint_multi()
45 PERF_TP_SAMPLE_TYPE == evsel->attr.sample_type); in test__checkevent_tracepoint_multi()
47 1 == evsel->attr.sample_period); in test__checkevent_tracepoint_multi()
57 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->attr.type); in test__checkevent_raw()
58 TEST_ASSERT_VAL("wrong config", 0x1a == evsel->attr.config); in test__checkevent_raw()
67 TEST_ASSERT_VAL("wrong type", 1 == evsel->attr.type); in test__checkevent_numeric()
68 TEST_ASSERT_VAL("wrong config", 1 == evsel->attr.config); in test__checkevent_numeric()
[all …]
Dbp_account.c32 static int __event(bool is_x, void *addr, struct perf_event_attr *attr) in __event() argument
36 memset(attr, 0, sizeof(struct perf_event_attr)); in __event()
37 attr->type = PERF_TYPE_BREAKPOINT; in __event()
38 attr->size = sizeof(struct perf_event_attr); in __event()
40 attr->config = 0; in __event()
41 attr->bp_type = is_x ? HW_BREAKPOINT_X : HW_BREAKPOINT_W; in __event()
42 attr->bp_addr = (unsigned long) addr; in __event()
43 attr->bp_len = sizeof(long); in __event()
45 attr->sample_period = 1; in __event()
46 attr->sample_type = PERF_SAMPLE_IP; in __event()
[all …]
/Linux-v4.19/arch/x86/include/asm/
Dinat.h124 static inline int inat_is_legacy_prefix(insn_attr_t attr) in inat_is_legacy_prefix() argument
126 attr &= INAT_PFX_MASK; in inat_is_legacy_prefix()
127 return attr && attr <= INAT_LGCPFX_MAX; in inat_is_legacy_prefix()
130 static inline int inat_is_address_size_prefix(insn_attr_t attr) in inat_is_address_size_prefix() argument
132 return (attr & INAT_PFX_MASK) == INAT_PFX_ADDRSZ; in inat_is_address_size_prefix()
135 static inline int inat_is_operand_size_prefix(insn_attr_t attr) in inat_is_operand_size_prefix() argument
137 return (attr & INAT_PFX_MASK) == INAT_PFX_OPNDSZ; in inat_is_operand_size_prefix()
140 static inline int inat_is_rex_prefix(insn_attr_t attr) in inat_is_rex_prefix() argument
142 return (attr & INAT_PFX_MASK) == INAT_PFX_REX; in inat_is_rex_prefix()
145 static inline int inat_last_prefix_id(insn_attr_t attr) in inat_last_prefix_id() argument
[all …]
/Linux-v4.19/tools/perf/util/intel-pt-decoder/
Dinat.h124 static inline int inat_is_legacy_prefix(insn_attr_t attr) in inat_is_legacy_prefix() argument
126 attr &= INAT_PFX_MASK; in inat_is_legacy_prefix()
127 return attr && attr <= INAT_LGCPFX_MAX; in inat_is_legacy_prefix()
130 static inline int inat_is_address_size_prefix(insn_attr_t attr) in inat_is_address_size_prefix() argument
132 return (attr & INAT_PFX_MASK) == INAT_PFX_ADDRSZ; in inat_is_address_size_prefix()
135 static inline int inat_is_operand_size_prefix(insn_attr_t attr) in inat_is_operand_size_prefix() argument
137 return (attr & INAT_PFX_MASK) == INAT_PFX_OPNDSZ; in inat_is_operand_size_prefix()
140 static inline int inat_is_rex_prefix(insn_attr_t attr) in inat_is_rex_prefix() argument
142 return (attr & INAT_PFX_MASK) == INAT_PFX_REX; in inat_is_rex_prefix()
145 static inline int inat_last_prefix_id(insn_attr_t attr) in inat_last_prefix_id() argument
[all …]
/Linux-v4.19/tools/objtool/arch/x86/include/asm/
Dinat.h124 static inline int inat_is_legacy_prefix(insn_attr_t attr) in inat_is_legacy_prefix() argument
126 attr &= INAT_PFX_MASK; in inat_is_legacy_prefix()
127 return attr && attr <= INAT_LGCPFX_MAX; in inat_is_legacy_prefix()
130 static inline int inat_is_address_size_prefix(insn_attr_t attr) in inat_is_address_size_prefix() argument
132 return (attr & INAT_PFX_MASK) == INAT_PFX_ADDRSZ; in inat_is_address_size_prefix()
135 static inline int inat_is_operand_size_prefix(insn_attr_t attr) in inat_is_operand_size_prefix() argument
137 return (attr & INAT_PFX_MASK) == INAT_PFX_OPNDSZ; in inat_is_operand_size_prefix()
140 static inline int inat_is_rex_prefix(insn_attr_t attr) in inat_is_rex_prefix() argument
142 return (attr & INAT_PFX_MASK) == INAT_PFX_REX; in inat_is_rex_prefix()
145 static inline int inat_last_prefix_id(insn_attr_t attr) in inat_last_prefix_id() argument
[all …]
/Linux-v4.19/drivers/scsi/ufs/
Dufs-sysfs.c35 struct device_attribute *attr, in ufs_sysfs_pm_lvl_store() argument
58 struct device_attribute *attr, char *buf) in rpm_lvl_show() argument
66 struct device_attribute *attr, const char *buf, size_t count) in rpm_lvl_store() argument
68 return ufs_sysfs_pm_lvl_store(dev, attr, buf, count, true); in rpm_lvl_store()
72 struct device_attribute *attr, char *buf) in rpm_target_dev_state_show() argument
81 struct device_attribute *attr, char *buf) in rpm_target_link_state_show() argument
90 struct device_attribute *attr, char *buf) in spm_lvl_show() argument
98 struct device_attribute *attr, const char *buf, size_t count) in spm_lvl_store() argument
100 return ufs_sysfs_pm_lvl_store(dev, attr, buf, count, false); in spm_lvl_store()
104 struct device_attribute *attr, char *buf) in spm_target_dev_state_show() argument
[all …]
/Linux-v4.19/fs/orangefs/
Dorangefs-sysfs.c158 struct attribute attr; member
160 struct orangefs_attribute *attr,
163 struct orangefs_attribute *attr,
169 struct attribute *attr, in orangefs_attr_show() argument
174 attribute = container_of(attr, struct orangefs_attribute, attr); in orangefs_attr_show()
181 struct attribute *attr, in orangefs_attr_store() argument
191 attribute = container_of(attr, struct orangefs_attribute, attr); in orangefs_attr_store()
203 struct orangefs_attribute *attr, char *buf) in sysfs_int_show() argument
211 if (!strcmp(attr->attr.name, "op_timeout_secs")) { in sysfs_int_show()
217 } else if (!strcmp(attr->attr.name, in sysfs_int_show()
[all …]
/Linux-v4.19/drivers/scsi/
Discsi_boot_sysfs.c32 struct attribute attr; member
41 struct attribute *attr, char *buf) in iscsi_boot_show_attribute() argument
46 container_of(attr, struct iscsi_boot_attr, attr); in iscsi_boot_show_attribute()
79 .attr = { .name = __stringify(sysfs_name), .mode = 0444 }, \
100 &iscsi_boot_attr_tgt_index.attr,
101 &iscsi_boot_attr_tgt_flags.attr,
102 &iscsi_boot_attr_tgt_ip.attr,
103 &iscsi_boot_attr_tgt_port.attr,
104 &iscsi_boot_attr_tgt_lun.attr,
105 &iscsi_boot_attr_tgt_chap.attr,
[all …]
Dscsi_transport_iscsi.c116 show_transport_handle(struct device *dev, struct device_attribute *attr, in show_transport_handle() argument
127 struct device_attribute *attr,char *buf) \
137 &dev_attr_handle.attr,
138 &dev_attr_caps.attr,
168 show_ep_handle(struct device *dev, struct device_attribute *attr, char *buf) in show_ep_handle() argument
176 &dev_attr_ep_handle.attr,
298 show_##type##_##name(struct device *dev, struct device_attribute *attr, \
419 struct attribute *attr, int i) in iscsi_iface_attr_is_visible() argument
427 if (attr == &dev_attr_iface_enabled.attr) in iscsi_iface_attr_is_visible()
429 else if (attr == &dev_attr_iface_vlan_id.attr) in iscsi_iface_attr_is_visible()
[all …]
/Linux-v4.19/lib/
Dfault-inject.c17 int setup_fault_attr(struct fault_attr *attr, char *str) in setup_fault_attr() argument
32 attr->probability = probability; in setup_fault_attr()
33 attr->interval = interval; in setup_fault_attr()
34 atomic_set(&attr->times, times); in setup_fault_attr()
35 atomic_set(&attr->space, space); in setup_fault_attr()
41 static void fail_dump(struct fault_attr *attr) in fail_dump() argument
43 if (attr->verbose > 0 && __ratelimit(&attr->ratelimit_state)) { in fail_dump()
46 "space %d, times %d\n", attr->dname, in fail_dump()
47 attr->interval, attr->probability, in fail_dump()
48 atomic_read(&attr->space), in fail_dump()
[all …]
/Linux-v4.19/drivers/infiniband/core/
Dsysfs.c68 struct attribute attr; member
81 struct port_attribute attr; member
88 struct attribute attr; member
90 struct attribute *attr, char *buf);
92 struct attribute *attr,
100 struct attribute *attr, char *buf) in port_attr_show() argument
103 container_of(attr, struct port_attribute, attr); in port_attr_show()
113 struct attribute *attr, in port_attr_store() argument
117 container_of(attr, struct port_attribute, attr); in port_attr_store()
131 struct attribute *attr, char *buf) in gid_attr_show() argument
[all …]
/Linux-v4.19/kernel/
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-v4.19/drivers/infiniband/sw/rxe/
Drxe.c85 rxe->attr.fw_ver = RXE_FW_VER; in rxe_init_device_param()
86 rxe->attr.max_mr_size = RXE_MAX_MR_SIZE; in rxe_init_device_param()
87 rxe->attr.page_size_cap = RXE_PAGE_SIZE_CAP; in rxe_init_device_param()
88 rxe->attr.vendor_id = RXE_VENDOR_ID; in rxe_init_device_param()
89 rxe->attr.vendor_part_id = RXE_VENDOR_PART_ID; in rxe_init_device_param()
90 rxe->attr.hw_ver = RXE_HW_VER; in rxe_init_device_param()
91 rxe->attr.max_qp = RXE_MAX_QP; in rxe_init_device_param()
92 rxe->attr.max_qp_wr = RXE_MAX_QP_WR; in rxe_init_device_param()
93 rxe->attr.device_cap_flags = RXE_DEVICE_CAP_FLAGS; in rxe_init_device_param()
94 rxe->attr.max_send_sge = RXE_MAX_SGE; in rxe_init_device_param()
[all …]
Drxe_qp.c46 if (cap->max_send_wr > rxe->attr.max_qp_wr) { in rxe_qp_chk_cap()
48 cap->max_send_wr, rxe->attr.max_qp_wr); in rxe_qp_chk_cap()
52 if (cap->max_send_sge > rxe->attr.max_send_sge) { in rxe_qp_chk_cap()
54 cap->max_send_sge, rxe->attr.max_send_sge); in rxe_qp_chk_cap()
59 if (cap->max_recv_wr > rxe->attr.max_qp_wr) { in rxe_qp_chk_cap()
61 cap->max_recv_wr, rxe->attr.max_qp_wr); in rxe_qp_chk_cap()
65 if (cap->max_recv_sge > rxe->attr.max_recv_sge) { in rxe_qp_chk_cap()
67 cap->max_recv_sge, rxe->attr.max_recv_sge); in rxe_qp_chk_cap()
140 for (i = 0; i < qp->attr.max_dest_rd_atomic; i++) { in free_rd_atomic_resources()
168 for (i = 0; i < qp->attr.max_dest_rd_atomic; i++) { in cleanup_rd_atomic_resources()
[all …]
Drxe_srq.c39 struct ib_srq_attr *attr, enum ib_srq_attr_mask mask) in rxe_srq_chk_attr() argument
47 if (attr->max_wr > rxe->attr.max_srq_wr) { in rxe_srq_chk_attr()
49 attr->max_wr, rxe->attr.max_srq_wr); in rxe_srq_chk_attr()
53 if (attr->max_wr <= 0) { in rxe_srq_chk_attr()
54 pr_warn("max_wr(%d) <= 0\n", attr->max_wr); in rxe_srq_chk_attr()
58 if (srq && srq->limit && (attr->max_wr < srq->limit)) { in rxe_srq_chk_attr()
60 attr->max_wr, srq->limit); in rxe_srq_chk_attr()
64 if (attr->max_wr < RXE_MIN_SRQ_WR) in rxe_srq_chk_attr()
65 attr->max_wr = RXE_MIN_SRQ_WR; in rxe_srq_chk_attr()
69 if (attr->srq_limit > rxe->attr.max_srq_wr) { in rxe_srq_chk_attr()
[all …]
/Linux-v4.19/drivers/infiniband/hw/hfi1/
Dsysfs.c99 .attr = {.name = "cc_table_bin", .mode = 0444},
141 .attr = {.name = "cc_settings_bin", .mode = 0444},
147 struct attribute attr; member
171 static ssize_t cc_attr_show(struct kobject *kobj, struct attribute *attr, in cc_attr_show() argument
175 container_of(attr, struct hfi1_port_attr, attr); in cc_attr_show()
182 static ssize_t cc_attr_store(struct kobject *kobj, struct attribute *attr, in cc_attr_store() argument
186 container_of(attr, struct hfi1_port_attr, attr); in cc_attr_store()
199 &cc_prescan_attr.attr,
212 .attr = { .name = __stringify(N), .mode = 0444 }, \
217 struct attribute attr; member
[all …]
/Linux-v4.19/drivers/staging/iio/meter/
Dade7854.c26 struct device_attribute *attr, in ade7854_read_8bit() argument
33 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); in ade7854_read_8bit()
43 struct device_attribute *attr, in ade7854_read_16bit() argument
50 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); in ade7854_read_16bit()
60 struct device_attribute *attr, in ade7854_read_24bit() argument
67 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); in ade7854_read_24bit()
77 struct device_attribute *attr, in ade7854_read_32bit() argument
82 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); in ade7854_read_32bit()
94 struct device_attribute *attr, in ade7854_write_8bit() argument
98 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); in ade7854_write_8bit()
[all …]
/Linux-v4.19/drivers/base/
Dsoc.c21 struct device_attribute *attr,
26 struct soc_device_attribute *attr; member
45 struct attribute *attr, in soc_attribute_mode() argument
51 if ((attr == &dev_attr_machine.attr) in soc_attribute_mode()
52 && (soc_dev->attr->machine != NULL)) in soc_attribute_mode()
53 return attr->mode; in soc_attribute_mode()
54 if ((attr == &dev_attr_family.attr) in soc_attribute_mode()
55 && (soc_dev->attr->family != NULL)) in soc_attribute_mode()
56 return attr->mode; in soc_attribute_mode()
57 if ((attr == &dev_attr_revision.attr) in soc_attribute_mode()
[all …]
/Linux-v4.19/drivers/hwmon/
Dnct7802.c72 static ssize_t show_temp_type(struct device *dev, struct device_attribute *attr, in show_temp_type() argument
76 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in show_temp_type()
88 struct device_attribute *attr, in store_temp_type() argument
92 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in store_temp_type()
108 static ssize_t show_pwm_mode(struct device *dev, struct device_attribute *attr, in show_pwm_mode() argument
111 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in show_pwm_mode()
129 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in show_pwm() local
134 if (!attr->index) in show_pwm()
137 ret = regmap_read(data->regmap, attr->index, &val); in show_pwm()
147 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in store_pwm() local
[all …]
Dadt7462.c791 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in show_temp_min() local
794 if (!temp_enabled(data, attr->index)) in show_temp_min()
797 return sprintf(buf, "%d\n", 1000 * (data->temp_min[attr->index] - 64)); in show_temp_min()
805 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in set_temp_min() local
810 if (kstrtol(buf, 10, &temp) || !temp_enabled(data, attr->index)) in set_temp_min()
817 data->temp_min[attr->index] = temp; in set_temp_min()
818 i2c_smbus_write_byte_data(client, ADT7462_TEMP_MIN_REG(attr->index), in set_temp_min()
829 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in show_temp_max() local
832 if (!temp_enabled(data, attr->index)) in show_temp_max()
835 return sprintf(buf, "%d\n", 1000 * (data->temp_max[attr->index] - 64)); in show_temp_max()
[all …]
Demc1403.c47 struct device_attribute *attr, char *buf) in show_temp() argument
49 struct sensor_device_attribute *sda = to_sensor_dev_attr(attr); in show_temp()
61 struct device_attribute *attr, char *buf) in show_bit() argument
63 struct sensor_device_attribute_2 *sda = to_sensor_dev_attr_2(attr); in show_bit()
75 struct device_attribute *attr, const char *buf, size_t count) in store_temp() argument
77 struct sensor_device_attribute *sda = to_sensor_dev_attr(attr); in store_temp()
92 struct device_attribute *attr, const char *buf, size_t count) in store_bit() argument
94 struct sensor_device_attribute_2 *sda = to_sensor_dev_attr_2(attr); in store_bit()
110 struct device_attribute *attr, char *buf, in show_hyst_common() argument
113 struct sensor_device_attribute *sda = to_sensor_dev_attr(attr); in show_hyst_common()
[all …]
/Linux-v4.19/virt/kvm/arm/vgic/
Dvgic-kvm-device.c164 struct kvm_device_attr *attr) in vgic_set_common_attr() argument
168 switch (attr->group) { in vgic_set_common_attr()
170 u64 __user *uaddr = (u64 __user *)(long)attr->addr; in vgic_set_common_attr()
172 unsigned long type = (unsigned long)attr->attr; in vgic_set_common_attr()
181 u32 __user *uaddr = (u32 __user *)(long)attr->addr; in vgic_set_common_attr()
212 switch (attr->attr) { in vgic_set_common_attr()
227 struct kvm_device_attr *attr) in vgic_get_common_attr() argument
231 switch (attr->group) { in vgic_get_common_attr()
233 u64 __user *uaddr = (u64 __user *)(long)attr->addr; in vgic_get_common_attr()
235 unsigned long type = (unsigned long)attr->attr; in vgic_get_common_attr()
[all …]
/Linux-v4.19/net/bridge/
Dbr_sysfs_br.c60 struct device_attribute *attr, char *buf) in forward_delay_show() argument
67 struct device_attribute *attr, in forward_delay_store() argument
74 static ssize_t hello_time_show(struct device *d, struct device_attribute *attr, in hello_time_show() argument
82 struct device_attribute *attr, const char *buf, in hello_time_store() argument
89 static ssize_t max_age_show(struct device *d, struct device_attribute *attr, in max_age_show() argument
96 static ssize_t max_age_store(struct device *d, struct device_attribute *attr, in max_age_store() argument
104 struct device_attribute *attr, char *buf) in ageing_time_show() argument
116 struct device_attribute *attr, in ageing_time_store() argument
124 struct device_attribute *attr, char *buf) in stp_state_show() argument
139 struct device_attribute *attr, const char *buf, in stp_state_store() argument
[all …]
/Linux-v4.19/drivers/net/ethernet/intel/fm10k/
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 …]

12345678910>>...88