Home
last modified time | relevance | path

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

12345678910>>...111

/Linux-v5.10/tools/lib/bpf/
Dbpf.c62 static inline int sys_bpf(enum bpf_cmd cmd, union bpf_attr *attr, in sys_bpf() argument
65 return syscall(__NR_bpf, cmd, attr, size); in sys_bpf()
68 static inline int sys_bpf_prog_load(union bpf_attr *attr, unsigned int size) in sys_bpf_prog_load() argument
73 fd = sys_bpf(BPF_PROG_LOAD, attr, size); in sys_bpf_prog_load()
81 union bpf_attr attr; in bpf_create_map_xattr() local
83 memset(&attr, '\0', sizeof(attr)); in bpf_create_map_xattr()
85 attr.map_type = create_attr->map_type; in bpf_create_map_xattr()
86 attr.key_size = create_attr->key_size; in bpf_create_map_xattr()
87 attr.value_size = create_attr->value_size; in bpf_create_map_xattr()
88 attr.max_entries = create_attr->max_entries; in bpf_create_map_xattr()
[all …]
/Linux-v5.10/arch/x86/include/asm/
Dinat.h110 static inline int inat_is_legacy_prefix(insn_attr_t attr) in inat_is_legacy_prefix() argument
112 attr &= INAT_PFX_MASK; in inat_is_legacy_prefix()
113 return attr && attr <= INAT_LGCPFX_MAX; in inat_is_legacy_prefix()
116 static inline int inat_is_address_size_prefix(insn_attr_t attr) in inat_is_address_size_prefix() argument
118 return (attr & INAT_PFX_MASK) == INAT_PFX_ADDRSZ; in inat_is_address_size_prefix()
121 static inline int inat_is_operand_size_prefix(insn_attr_t attr) in inat_is_operand_size_prefix() argument
123 return (attr & INAT_PFX_MASK) == INAT_PFX_OPNDSZ; in inat_is_operand_size_prefix()
126 static inline int inat_is_rex_prefix(insn_attr_t attr) in inat_is_rex_prefix() argument
128 return (attr & INAT_PFX_MASK) == INAT_PFX_REX; in inat_is_rex_prefix()
131 static inline int inat_last_prefix_id(insn_attr_t attr) in inat_last_prefix_id() argument
[all …]
/Linux-v5.10/tools/arch/x86/include/asm/
Dinat.h110 static inline int inat_is_legacy_prefix(insn_attr_t attr) in inat_is_legacy_prefix() argument
112 attr &= INAT_PFX_MASK; in inat_is_legacy_prefix()
113 return attr && attr <= INAT_LGCPFX_MAX; in inat_is_legacy_prefix()
116 static inline int inat_is_address_size_prefix(insn_attr_t attr) in inat_is_address_size_prefix() argument
118 return (attr & INAT_PFX_MASK) == INAT_PFX_ADDRSZ; in inat_is_address_size_prefix()
121 static inline int inat_is_operand_size_prefix(insn_attr_t attr) in inat_is_operand_size_prefix() argument
123 return (attr & INAT_PFX_MASK) == INAT_PFX_OPNDSZ; in inat_is_operand_size_prefix()
126 static inline int inat_is_rex_prefix(insn_attr_t attr) in inat_is_rex_prefix() argument
128 return (attr & INAT_PFX_MASK) == INAT_PFX_REX; in inat_is_rex_prefix()
131 static inline int inat_last_prefix_id(insn_attr_t attr) in inat_last_prefix_id() argument
[all …]
/Linux-v5.10/fs/orangefs/
Dorangefs-sysfs.c166 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()
225 } else if (!strcmp(attr->attr.name, in sysfs_int_show()
[all …]
/Linux-v5.10/tools/perf/tests/
Dparse-events.c53 TEST_ASSERT_VAL("wrong type", PERF_TYPE_TRACEPOINT == evsel->core.attr.type); in test__checkevent_tracepoint()
55 PERF_TP_SAMPLE_TYPE == evsel->core.attr.sample_type); in test__checkevent_tracepoint()
56 TEST_ASSERT_VAL("wrong sample_period", 1 == evsel->core.attr.sample_period); in test__checkevent_tracepoint()
69 PERF_TYPE_TRACEPOINT == evsel->core.attr.type); in test__checkevent_tracepoint_multi()
71 PERF_TP_SAMPLE_TYPE == evsel->core.attr.sample_type); in test__checkevent_tracepoint_multi()
73 1 == evsel->core.attr.sample_period); in test__checkevent_tracepoint_multi()
83 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_raw()
84 TEST_ASSERT_VAL("wrong config", 0x1a == evsel->core.attr.config); in test__checkevent_raw()
93 TEST_ASSERT_VAL("wrong type", 1 == evsel->core.attr.type); in test__checkevent_numeric()
94 TEST_ASSERT_VAL("wrong config", 1 == evsel->core.attr.config); in test__checkevent_numeric()
[all …]
Dbp_account.c29 static int __event(bool is_x, void *addr, struct perf_event_attr *attr) in __event() argument
33 memset(attr, 0, sizeof(struct perf_event_attr)); in __event()
34 attr->type = PERF_TYPE_BREAKPOINT; in __event()
35 attr->size = sizeof(struct perf_event_attr); in __event()
37 attr->config = 0; in __event()
38 attr->bp_type = is_x ? HW_BREAKPOINT_X : HW_BREAKPOINT_W; in __event()
39 attr->bp_addr = (unsigned long) addr; in __event()
40 attr->bp_len = sizeof(long); in __event()
42 attr->sample_period = 1; in __event()
43 attr->sample_type = PERF_SAMPLE_IP; in __event()
[all …]
/Linux-v5.10/lib/
Dfault-inject.c18 int setup_fault_attr(struct fault_attr *attr, char *str) in setup_fault_attr() argument
33 attr->probability = probability; in setup_fault_attr()
34 attr->interval = interval; in setup_fault_attr()
35 atomic_set(&attr->times, times); in setup_fault_attr()
36 atomic_set(&attr->space, space); in setup_fault_attr()
42 static void fail_dump(struct fault_attr *attr) in fail_dump() argument
44 if (attr->verbose > 0 && __ratelimit(&attr->ratelimit_state)) { in fail_dump()
47 "space %d, times %d\n", attr->dname, in fail_dump()
48 attr->interval, attr->probability, in fail_dump()
49 atomic_read(&attr->space), in fail_dump()
[all …]
/Linux-v5.10/drivers/scsi/ufs/
Dufs-sysfs.c36 struct device_attribute *attr, in ufs_sysfs_pm_lvl_store() argument
59 struct device_attribute *attr, char *buf) in rpm_lvl_show() argument
67 struct device_attribute *attr, const char *buf, size_t count) in rpm_lvl_store() argument
69 return ufs_sysfs_pm_lvl_store(dev, attr, buf, count, true); in rpm_lvl_store()
73 struct device_attribute *attr, char *buf) in rpm_target_dev_state_show() argument
82 struct device_attribute *attr, char *buf) in rpm_target_link_state_show() argument
91 struct device_attribute *attr, char *buf) in spm_lvl_show() argument
99 struct device_attribute *attr, const char *buf, size_t count) in spm_lvl_store() argument
101 return ufs_sysfs_pm_lvl_store(dev, attr, buf, count, false); in spm_lvl_store()
105 struct device_attribute *attr, char *buf) in spm_target_dev_state_show() argument
[all …]
/Linux-v5.10/drivers/scsi/
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 …]
Dscsi_transport_iscsi.c131 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,
183 show_ep_handle(struct device *dev, struct device_attribute *attr, char *buf) in show_ep_handle() argument
191 &dev_attr_ep_handle.attr,
313 show_##type##_##name(struct device *dev, struct device_attribute *attr, \
434 struct attribute *attr, int i) in iscsi_iface_attr_is_visible() argument
442 if (attr == &dev_attr_iface_enabled.attr) in iscsi_iface_attr_is_visible()
444 else if (attr == &dev_attr_iface_vlan_id.attr) in iscsi_iface_attr_is_visible()
[all …]
/Linux-v5.10/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-v5.10/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-v5.10/drivers/base/
Dsoc.c21 static ssize_t soc_info_show(struct device *dev, struct device_attribute *attr,
26 struct soc_device_attribute *attr; member
46 struct attribute *attr, in soc_attribute_mode() argument
52 if ((attr == &dev_attr_machine.attr) && soc_dev->attr->machine) in soc_attribute_mode()
53 return attr->mode; in soc_attribute_mode()
54 if ((attr == &dev_attr_family.attr) && soc_dev->attr->family) in soc_attribute_mode()
55 return attr->mode; in soc_attribute_mode()
56 if ((attr == &dev_attr_revision.attr) && soc_dev->attr->revision) in soc_attribute_mode()
57 return attr->mode; in soc_attribute_mode()
58 if ((attr == &dev_attr_serial_number.attr) && soc_dev->attr->serial_number) in soc_attribute_mode()
[all …]
/Linux-v5.10/drivers/infiniband/core/
Dsysfs.c69 struct attribute attr; member
82 struct port_attribute attr; member
89 struct attribute attr; member
91 struct attribute *attr, char *buf);
93 struct attribute *attr,
101 struct attribute *attr, char *buf) in port_attr_show() argument
104 container_of(attr, struct port_attribute, attr); in port_attr_show()
114 struct attribute *attr, in port_attr_store() argument
118 container_of(attr, struct port_attribute, attr); in port_attr_store()
132 struct attribute *attr, char *buf) in gid_attr_show() argument
[all …]
/Linux-v5.10/drivers/staging/iio/meter/
Dade7854.c25 struct device_attribute *attr, in ade7854_read_8bit() argument
32 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); in ade7854_read_8bit()
42 struct device_attribute *attr, in ade7854_read_16bit() argument
49 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); in ade7854_read_16bit()
59 struct device_attribute *attr, in ade7854_read_24bit() argument
66 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); in ade7854_read_24bit()
76 struct device_attribute *attr, in ade7854_read_32bit() argument
81 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); in ade7854_read_32bit()
93 struct device_attribute *attr, in ade7854_write_8bit() argument
97 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); in ade7854_write_8bit()
[all …]
/Linux-v5.10/drivers/infiniband/sw/rxe/
Drxe.c45 rxe->attr.vendor_id = RXE_VENDOR_ID; in rxe_init_device_param()
46 rxe->attr.max_mr_size = RXE_MAX_MR_SIZE; in rxe_init_device_param()
47 rxe->attr.page_size_cap = RXE_PAGE_SIZE_CAP; in rxe_init_device_param()
48 rxe->attr.max_qp = RXE_MAX_QP; in rxe_init_device_param()
49 rxe->attr.max_qp_wr = RXE_MAX_QP_WR; in rxe_init_device_param()
50 rxe->attr.device_cap_flags = RXE_DEVICE_CAP_FLAGS; in rxe_init_device_param()
51 rxe->attr.max_send_sge = RXE_MAX_SGE; in rxe_init_device_param()
52 rxe->attr.max_recv_sge = RXE_MAX_SGE; in rxe_init_device_param()
53 rxe->attr.max_sge_rd = RXE_MAX_SGE_RD; in rxe_init_device_param()
54 rxe->attr.max_cq = RXE_MAX_CQ; in rxe_init_device_param()
[all …]
/Linux-v5.10/drivers/hwmon/
Dnct7802.c66 struct device_attribute *attr, char *buf) in temp_type_show() argument
69 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in temp_type_show()
81 struct device_attribute *attr, const char *buf, in temp_type_store() argument
85 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in temp_type_store()
102 struct device_attribute *attr, char *buf) in pwm_mode_show() argument
104 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in pwm_mode_show()
122 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in pwm_show() local
127 if (!attr->index) in pwm_show()
130 ret = regmap_read(data->regmap, attr->index, &val); in pwm_show()
140 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in pwm_store() local
[all …]
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 …]
Demc1403.c35 static ssize_t temp_show(struct device *dev, struct device_attribute *attr, in temp_show() argument
38 struct sensor_device_attribute *sda = to_sensor_dev_attr(attr); in temp_show()
49 static ssize_t bit_show(struct device *dev, struct device_attribute *attr, in bit_show() argument
52 struct sensor_device_attribute_2 *sda = to_sensor_dev_attr_2(attr); in bit_show()
63 static ssize_t temp_store(struct device *dev, struct device_attribute *attr, in temp_store() argument
66 struct sensor_device_attribute *sda = to_sensor_dev_attr(attr); in temp_store()
80 static ssize_t bit_store(struct device *dev, struct device_attribute *attr, in bit_store() argument
83 struct sensor_device_attribute_2 *sda = to_sensor_dev_attr_2(attr); in bit_store()
99 struct device_attribute *attr, char *buf, in show_hyst_common() argument
102 struct sensor_device_attribute *sda = to_sensor_dev_attr(attr); in show_hyst_common()
[all …]
Dpowr1220.c175 struct sensor_device_attribute *attr = to_sensor_dev_attr(dev_attr); in powr1220_voltage_show() local
176 int adc_val = powr1220_read_adc(dev, attr->index); in powr1220_voltage_show()
188 struct sensor_device_attribute *attr = to_sensor_dev_attr(dev_attr); in powr1220_max_show() local
191 return sprintf(buf, "%d\n", data->adc_maxes[attr->index]); in powr1220_max_show()
199 struct sensor_device_attribute *attr = to_sensor_dev_attr(dev_attr); in powr1220_label_show() local
201 return sprintf(buf, "%s\n", input_names[attr->index]); in powr1220_label_show()
250 &sensor_dev_attr_in0_input.dev_attr.attr,
251 &sensor_dev_attr_in1_input.dev_attr.attr,
252 &sensor_dev_attr_in2_input.dev_attr.attr,
253 &sensor_dev_attr_in3_input.dev_attr.attr,
[all …]
/Linux-v5.10/drivers/hwmon/occ/
Dcommon.c224 struct device_attribute *attr, char *buf) in occ_show_temp_1() argument
231 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in occ_show_temp_1()
260 struct device_attribute *attr, char *buf) in occ_show_temp_2() argument
267 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in occ_show_temp_2()
311 struct device_attribute *attr, char *buf) in occ_show_freq_1() argument
318 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in occ_show_freq_1()
341 struct device_attribute *attr, char *buf) in occ_show_freq_2() argument
348 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in occ_show_freq_2()
371 struct device_attribute *attr, char *buf) in occ_show_power_1() argument
378 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in occ_show_power_1()
[all …]
/Linux-v5.10/arch/arm64/kvm/vgic/
Dvgic-kvm-device.c156 struct kvm_device_attr *attr) in vgic_set_common_attr() argument
160 switch (attr->group) { in vgic_set_common_attr()
162 u64 __user *uaddr = (u64 __user *)(long)attr->addr; in vgic_set_common_attr()
164 unsigned long type = (unsigned long)attr->attr; in vgic_set_common_attr()
173 u32 __user *uaddr = (u32 __user *)(long)attr->addr; in vgic_set_common_attr()
204 switch (attr->attr) { in vgic_set_common_attr()
219 struct kvm_device_attr *attr) in vgic_get_common_attr() argument
223 switch (attr->group) { in vgic_get_common_attr()
225 u64 __user *uaddr = (u64 __user *)(long)attr->addr; in vgic_get_common_attr()
227 unsigned long type = (unsigned long)attr->attr; in vgic_get_common_attr()
[all …]
/Linux-v5.10/net/bridge/
Dbr_sysfs_br.c56 struct device_attribute *attr, char *buf) in forward_delay_show() argument
63 struct device_attribute *attr, in forward_delay_store() argument
70 static ssize_t hello_time_show(struct device *d, struct device_attribute *attr, in hello_time_show() argument
78 struct device_attribute *attr, const char *buf, in hello_time_store() argument
85 static ssize_t max_age_show(struct device *d, struct device_attribute *attr, in max_age_show() argument
92 static ssize_t max_age_store(struct device *d, struct device_attribute *attr, in max_age_store() argument
100 struct device_attribute *attr, char *buf) in ageing_time_show() argument
112 struct device_attribute *attr, in ageing_time_store() argument
120 struct device_attribute *attr, char *buf) in stp_state_show() argument
133 struct device_attribute *attr, const char *buf, in stp_state_store() argument
[all …]
/Linux-v5.10/tools/testing/selftests/bpf/prog_tests/
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-v5.10/tools/testing/selftests/powerpc/ptrace/
Dperf-hwbreak.c37 static inline int sys_perf_event_open(struct perf_event_attr *attr, pid_t pid, in sys_perf_event_open() argument
41 attr->size = sizeof(*attr); in sys_perf_event_open()
42 return syscall(__NR_perf_event_open, attr, pid, cpu, group_fd, flags); in sys_perf_event_open()
47 struct perf_event_attr attr; in breakpoint_test() local
51 memset(&attr, 0, sizeof(attr)); in breakpoint_test()
52 attr.disabled = 1; in breakpoint_test()
53 attr.type = PERF_TYPE_BREAKPOINT; in breakpoint_test()
54 attr.bp_type = HW_BREAKPOINT_R; in breakpoint_test()
56 attr.bp_addr = (__u64)(&attr) & 0xfffffffffffff800; in breakpoint_test()
57 attr.bp_len = len; in breakpoint_test()
[all …]

12345678910>>...111