Home
last modified time | relevance | path

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

12345678910>>...108

/kernel/linux/linux-5.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 …]
/kernel/liteos_m/kal/posix/src/
Dpthread_attr.c39 int pthread_attr_init(pthread_attr_t *attr) in pthread_attr_init() argument
41 if (attr == NULL) { in pthread_attr_init()
45 attr->detachstate = PTHREAD_CREATE_JOINABLE; in pthread_attr_init()
46 attr->schedpolicy = SCHED_RR; in pthread_attr_init()
47 attr->schedparam.sched_priority = LOSCFG_BASE_CORE_TSK_DEFAULT_PRIO; in pthread_attr_init()
48 attr->inheritsched = PTHREAD_INHERIT_SCHED; in pthread_attr_init()
49 attr->scope = PTHREAD_SCOPE_SYSTEM; in pthread_attr_init()
50 attr->stackaddr_set = 0; in pthread_attr_init()
51 attr->stackaddr = NULL; in pthread_attr_init()
52 attr->stacksize_set = 1; in pthread_attr_init()
[all …]
/kernel/liteos_a/compat/posix/src/
Dpthread_attr.c36 int pthread_attr_init(pthread_attr_t *attr) in pthread_attr_init() argument
38 if (attr == NULL) { in pthread_attr_init()
42 attr->detachstate = PTHREAD_CREATE_JOINABLE; in pthread_attr_init()
43 attr->schedpolicy = SCHED_RR; in pthread_attr_init()
44 attr->schedparam.sched_priority = LOSCFG_BASE_CORE_TSK_DEFAULT_PRIO; in pthread_attr_init()
45 attr->inheritsched = PTHREAD_INHERIT_SCHED; in pthread_attr_init()
46 attr->scope = PTHREAD_SCOPE_PROCESS; in pthread_attr_init()
47 attr->stackaddr_set = 0; in pthread_attr_init()
48 attr->stackaddr = NULL; in pthread_attr_init()
49 attr->stacksize_set = 1; in pthread_attr_init()
[all …]
/kernel/linux/linux-5.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 …]
/kernel/linux/linux-5.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 …]
/kernel/linux/linux-5.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 …]
/kernel/linux/linux-5.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 …]
/kernel/linux/linux-5.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 …]
/kernel/linux/linux-5.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 …]
/kernel/linux/linux-5.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.c125 show_transport_handle(struct device *dev, struct device_attribute *attr, in show_transport_handle() argument
140 struct device_attribute *attr,char *buf) \
150 &dev_attr_handle.attr,
151 &dev_attr_caps.attr,
181 show_ep_handle(struct device *dev, struct device_attribute *attr, char *buf) in show_ep_handle() argument
189 &dev_attr_ep_handle.attr,
316 show_##type##_##name(struct device *dev, struct device_attribute *attr, \
437 struct attribute *attr, int i) in iscsi_iface_attr_is_visible() argument
444 if (attr == &dev_attr_iface_def_taskmgmt_tmo.attr) in iscsi_iface_attr_is_visible()
446 else if (attr == &dev_attr_iface_header_digest.attr) in iscsi_iface_attr_is_visible()
[all …]
/kernel/liteos_m/testsuites/unittest/xts/cmsis/
Dcmsis_task_pri_func_test.c62 osThreadAttr_t attr; in CmsisThreadGetPriorityFunc001() local
65 attr.priority = osThreadGetPriority(g_priTaskID01); in CmsisThreadGetPriorityFunc001()
66 ICUNIT_ASSERT_EQUAL(attr.priority, g_setPriority, attr.priority); in CmsisThreadGetPriorityFunc001()
74 osThreadAttr_t attr; in CmsisThreadSetPriorityFunc001() local
79 attr.priority = osThreadGetPriority(g_priTaskID01); in CmsisThreadSetPriorityFunc001()
80 ICUNIT_ASSERT_EQUAL(attr.priority, g_setPriority, attr.priority); in CmsisThreadSetPriorityFunc001()
105 osThreadAttr_t attr; variable
107 attr.name = "test";
108 attr.attr_bits = 0U;
109 attr.cb_mem = NULL;
[all …]
Dcmsis_task_func_test.c188 osThreadAttr_t attr; in CmsisThreadGetNameFunc001() local
190 attr.name = osThreadGetName(g_puwTaskID01); in CmsisThreadGetNameFunc001()
191 ICUNIT_ASSERT_STRING_EQUAL_VOID(attr.name, "testThreadGetName", attr.name); in CmsisThreadGetNameFunc001()
236 osThreadAttr_t attr; in CmsisThreadGetStackSizeFunc001() local
238 attr.stack_size = osThreadGetStackSize(g_puwTaskID01); in CmsisThreadGetStackSizeFunc001()
239 ICUNIT_ASSERT_EQUAL_VOID(attr.stack_size, TEST_TASK_STACK_SIZE, attr.stack_size); in CmsisThreadGetStackSizeFunc001()
748 osThreadAttr_t attr; variable
751 attr.name = "test";
752 attr.attr_bits = 0U;
753 attr.cb_mem = NULL;
[all …]
/kernel/linux/linux-5.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 …]
/kernel/linux/linux-5.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 …]
/kernel/linux/linux-5.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 …]
/kernel/linux/linux-5.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 …]
/kernel/linux/linux-5.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 …]
/kernel/liteos_a/testsuites/unittest/process/basic/process/full/
Dprocess_test_065.cpp37 posix_spawnattr_t attr; in TestGroupError() local
39 posix_spawnattr_init(&attr); in TestGroupError()
40 posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETPGROUP); in TestGroupError()
41 posix_spawnattr_setpgroup(&attr, 1); in TestGroupError()
42 ret = posix_spawn(NULL, "/bin/tftp", NULL, &attr, NULL, NULL); in TestGroupError()
45 posix_spawnattr_setpgroup(&attr, 65); // 65, set group num. in TestGroupError()
46 ret = posix_spawn(NULL, "/bin/tftp", NULL, &attr, NULL, NULL); in TestGroupError()
53 posix_spawnattr_t attr; in TestPolError() local
56 posix_spawnattr_init(&attr); in TestPolError()
57 posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSCHEDULER); in TestPolError()
[all …]
Dprocess_test_060.cpp37 posix_spawnattr_t attr; in TestGroupError() local
39 posix_spawnattr_init(&attr); in TestGroupError()
40 posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETPGROUP); in TestGroupError()
41 posix_spawnattr_setpgroup(&attr, 1); in TestGroupError()
42 ret = posix_spawnp(NULL, "/bin/tftp", NULL, &attr, NULL, NULL); in TestGroupError()
45 posix_spawnattr_setpgroup(&attr, 65); // 65, set group num. in TestGroupError()
46 ret = posix_spawnp(NULL, "/bin/tftp", NULL, &attr, NULL, NULL); in TestGroupError()
54 posix_spawnattr_t attr; in TestPolError() local
57 posix_spawnattr_init(&attr); in TestPolError()
58 posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSCHEDULER); in TestPolError()
[all …]
/kernel/linux/linux-5.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 …]
/kernel/linux/linux-5.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 …]
/kernel/linux/linux-5.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 …]

12345678910>>...108