Home
last modified time | relevance | path

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

12

/kernel/bpf/
Dsyscall.c25 static struct bpf_map *find_and_alloc_map(union bpf_attr *attr) in find_and_alloc_map() argument
31 if (tl->type == attr->map_type) { in find_and_alloc_map()
32 map = tl->ops->map_alloc(attr); in find_and_alloc_map()
36 map->map_type = attr->map_type; in find_and_alloc_map()
128 memchr_inv((void *) &attr->CMD##_LAST_FIELD + \
129 sizeof(attr->CMD##_LAST_FIELD), 0, \
130 sizeof(*attr) - \
132 sizeof(attr->CMD##_LAST_FIELD)) != NULL
136 static int map_create(union bpf_attr *attr) in map_create() argument
146 map = find_and_alloc_map(attr); in map_create()
[all …]
Darraymap.c21 static struct bpf_map *array_map_alloc(union bpf_attr *attr) in array_map_alloc() argument
29 if (attr->max_entries == 0 || attr->key_size != 4 || in array_map_alloc()
30 attr->value_size == 0) in array_map_alloc()
33 if (attr->value_size >= 1 << (KMALLOC_SHIFT_MAX - 1)) in array_map_alloc()
39 elem_size = round_up(attr->value_size, 8); in array_map_alloc()
41 max_entries = attr->max_entries; in array_map_alloc()
58 if (max_entries < attr->max_entries) in array_map_alloc()
80 array->map.key_size = attr->key_size; in array_map_alloc()
81 array->map.value_size = attr->value_size; in array_map_alloc()
82 array->map.max_entries = attr->max_entries; in array_map_alloc()
[all …]
Dhashtab.c35 static struct bpf_map *htab_map_alloc(union bpf_attr *attr) in htab_map_alloc() argument
45 htab->map.key_size = attr->key_size; in htab_map_alloc()
46 htab->map.value_size = attr->value_size; in htab_map_alloc()
47 htab->map.max_entries = attr->max_entries; in htab_map_alloc()
Dverifier.c2425 int bpf_check(struct bpf_prog **prog, union bpf_attr *attr) in bpf_check() argument
2451 if (attr->log_level || attr->log_buf || attr->log_size) { in bpf_check()
2455 log_level = attr->log_level; in bpf_check()
2456 log_ubuf = (char __user *) (unsigned long) attr->log_buf; in bpf_check()
2457 log_size = attr->log_size; in bpf_check()
/kernel/
Dksysfs.c34 struct kobj_attribute *attr, char *buf) in uevent_seqnum_show() argument
43 struct kobj_attribute *attr, char *buf) in uevent_helper_show() argument
48 struct kobj_attribute *attr, in uevent_helper_store() argument
64 struct kobj_attribute *attr, char *buf) in profiling_show() argument
69 struct kobj_attribute *attr, in profiling_store() argument
95 struct kobj_attribute *attr, char *buf) in kexec_loaded_show() argument
102 struct kobj_attribute *attr, char *buf) in kexec_crash_loaded_show() argument
109 struct kobj_attribute *attr, char *buf) in kexec_crash_size_show() argument
114 struct kobj_attribute *attr, in kexec_crash_size_store() argument
129 struct kobj_attribute *attr, char *buf) in vmcoreinfo_show() argument
[all …]
Dpadata.c865 container_of(_attr, struct padata_sysfs_entry, attr)
874 struct attribute attr; member
881 struct attribute *attr, char *buf) in show_cpumask() argument
887 if (!strcmp(attr->name, "serial_cpumask")) in show_cpumask()
899 struct attribute *attr, in store_cpumask() argument
914 mask_type = !strcmp(attr->name, "serial_cpumask") ? in store_cpumask()
941 &serial_cpumask_attr.attr,
942 &parallel_cpumask_attr.attr,
947 struct attribute *attr, char *buf) in padata_sysfs_show() argument
954 pentry = attr2pentry(attr); in padata_sysfs_show()
[all …]
Dparams.c573 #define to_module_attr(n) container_of(n, struct module_attribute, attr)
706 sysfs_attr_init(&mk->mp->attrs[mk->mp->num].mattr.attr); in add_sysfs_param()
714 mk->mp->attrs[mk->mp->num].mattr.attr.name = (char *)name; in add_sysfs_param()
715 mk->mp->attrs[mk->mp->num].mattr.attr.mode = kp->perm; in add_sysfs_param()
720 mk->mp->grp.attrs[i] = &mk->mp->attrs[i].mattr.attr; in add_sysfs_param()
817 err = sysfs_create_file(&mk->kobj, &module_uevent.attr); in locate_module_kobject()
915 err = sysfs_create_file(&mk->kobj, &vattr->mattr.attr); in version_sysfs_builtin()
926 struct attribute *attr, in module_attr_show() argument
933 attribute = to_module_attr(attr); in module_attr_show()
945 struct attribute *attr, in module_attr_store() argument
[all …]
Dmodule.c774 .attr = { .name = __stringify(field), .mode = 0444 }, \
1527 sysfs_attr_init(&sattr->mattr.attr); in add_sect_attrs()
1530 sattr->mattr.attr.name = sattr->name; in add_sect_attrs()
1531 sattr->mattr.attr.mode = S_IRUGO; in add_sect_attrs()
1532 *(gattr++) = &(sattr++)->mattr.attr; in add_sect_attrs()
1623 nattr->attr.name = mod->sect_attrs->attrs[loaded].name; in add_notes_attrs()
1624 nattr->attr.mode = S_IRUGO; in add_notes_attrs()
1705 struct module_attribute *attr; in module_add_modinfo_attrs() local
1717 for (i = 0; (attr = modinfo_attrs[i]) && !error; i++) { in module_add_modinfo_attrs()
1718 if (!attr->test || in module_add_modinfo_attrs()
[all …]
Dworkqueue.c4938 static ssize_t per_cpu_show(struct device *dev, struct device_attribute *attr, in per_cpu_show() argument
4948 struct device_attribute *attr, char *buf) in max_active_show() argument
4956 struct device_attribute *attr, const char *buf, in max_active_store() argument
4971 &dev_attr_per_cpu.attr,
4972 &dev_attr_max_active.attr,
4978 struct device_attribute *attr, char *buf) in wq_pool_ids_show() argument
4997 static ssize_t wq_nice_show(struct device *dev, struct device_attribute *attr, in wq_nice_show() argument
5025 static ssize_t wq_nice_store(struct device *dev, struct device_attribute *attr, in wq_nice_store() argument
5051 struct device_attribute *attr, char *buf) in wq_cpumask_show() argument
5064 struct device_attribute *attr, in wq_cpumask_store() argument
[all …]
Dauditsc.c1223 context->mq_open.attr.mq_flags, in show_special()
1224 context->mq_open.attr.mq_maxmsg, in show_special()
1225 context->mq_open.attr.mq_msgsize, in show_special()
1226 context->mq_open.attr.mq_curmsgs); in show_special()
1244 struct mq_attr *attr = &context->mq_getsetattr.mqstat; in show_special() local
1249 attr->mq_flags, attr->mq_maxmsg, in show_special()
1250 attr->mq_msgsize, attr->mq_curmsgs); in show_special()
2044 void __audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr) in __audit_mq_open() argument
2048 if (attr) in __audit_mq_open()
2049 memcpy(&context->mq_open.attr, attr, sizeof(struct mq_attr)); in __audit_mq_open()
[all …]
/kernel/power/
Dmain.c58 static ssize_t pm_async_show(struct kobject *kobj, struct kobj_attribute *attr, in pm_async_show() argument
64 static ssize_t pm_async_store(struct kobject *kobj, struct kobj_attribute *attr, in pm_async_store() argument
93 static ssize_t pm_test_show(struct kobject *kobj, struct kobj_attribute *attr, in pm_test_show() argument
114 static ssize_t pm_test_store(struct kobject *kobj, struct kobj_attribute *attr, in pm_test_store() argument
255 struct kobj_attribute *attr, char *buf) in pm_print_times_show() argument
261 struct kobj_attribute *attr, in pm_print_times_store() argument
284 struct kobj_attribute *attr, in pm_wakeup_irq_show() argument
291 struct kobj_attribute *attr, in pm_wakeup_irq_store() argument
314 static ssize_t state_show(struct kobject *kobj, struct kobj_attribute *attr, in state_show() argument
361 static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr, in state_store() argument
[all …]
Dhibernate.c902 static ssize_t disk_show(struct kobject *kobj, struct kobj_attribute *attr, in disk_show() argument
936 static ssize_t disk_store(struct kobject *kobj, struct kobj_attribute *attr, in disk_store() argument
986 static ssize_t resume_show(struct kobject *kobj, struct kobj_attribute *attr, in resume_show() argument
993 static ssize_t resume_store(struct kobject *kobj, struct kobj_attribute *attr, in resume_store() argument
1022 static ssize_t image_size_show(struct kobject *kobj, struct kobj_attribute *attr, in image_size_show() argument
1028 static ssize_t image_size_store(struct kobject *kobj, struct kobj_attribute *attr, in image_size_store() argument
1044 struct kobj_attribute *attr, char *buf) in reserved_size_show() argument
1050 struct kobj_attribute *attr, in reserved_size_store() argument
1066 &disk_attr.attr,
1067 &resume_attr.attr,
[all …]
Dwakeup_reason.c44 static ssize_t last_resume_reason_show(struct kobject *kobj, struct kobj_attribute *attr, in last_resume_reason_show() argument
68 struct kobj_attribute *attr, char *buf) in last_suspend_time_show() argument
99 &resume_reason.attr,
100 &suspend_time.attr,
Dpower.h72 .attr = { \
/kernel/events/
Dhw_breakpoint.c90 if (bp->attr.bp_type & HW_BREAKPOINT_RW) in find_slot_idx()
291 if (bp->attr.bp_type == HW_BREAKPOINT_EMPTY || in __reserve_bp_slot()
292 bp->attr.bp_type == HW_BREAKPOINT_INVALID) in __reserve_bp_slot()
379 if (bp->attr.exclude_kernel) in validate_hw_breakpoint()
416 register_user_hw_breakpoint(struct perf_event_attr *attr, in register_user_hw_breakpoint() argument
421 return perf_event_create_kernel_counter(attr, -1, tsk, triggered, in register_user_hw_breakpoint()
431 int modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr) in modify_user_hw_breakpoint() argument
444 bp->attr.bp_addr = attr->bp_addr; in modify_user_hw_breakpoint()
445 bp->attr.bp_type = attr->bp_type; in modify_user_hw_breakpoint()
446 bp->attr.bp_len = attr->bp_len; in modify_user_hw_breakpoint()
[all …]
Dcore.c615 struct perf_event_attr *attr, in perf_cgroup_connect() argument
731 struct perf_event_attr *attr, in perf_cgroup_connect() argument
1222 if (event->attr.pinned) in ctx_group_list()
1258 if (event->attr.inherit_stat) in list_add_event()
1269 event->state = event->attr.disabled ? PERF_EVENT_STATE_OFF : in perf_event__state_init()
1279 if (event->attr.read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) in __perf_event_read_size()
1282 if (event->attr.read_format & PERF_FORMAT_TOTAL_TIME_RUNNING) in __perf_event_read_size()
1285 if (event->attr.read_format & PERF_FORMAT_ID) in __perf_event_read_size()
1288 if (event->attr.read_format & PERF_FORMAT_GROUP) { in __perf_event_read_size()
1334 __perf_event_header_size(event, event->attr.sample_type); in perf_event__header_size()
[all …]
Dcallchain.c159 int kernel = !event->attr.exclude_callchain_kernel; in perf_callchain()
160 int user = !event->attr.exclude_callchain_user; in perf_callchain()
/kernel/sched/
Dcore.c2420 const struct sched_attr *attr) in dl_overflow() argument
2424 u64 period = attr->sched_period ?: attr->sched_deadline; in dl_overflow()
2425 u64 runtime = attr->sched_runtime; in dl_overflow()
3769 __setparam_dl(struct task_struct *p, const struct sched_attr *attr) in __setparam_dl() argument
3773 dl_se->dl_runtime = attr->sched_runtime; in __setparam_dl()
3774 dl_se->dl_deadline = attr->sched_deadline; in __setparam_dl()
3775 dl_se->dl_period = attr->sched_period ?: dl_se->dl_deadline; in __setparam_dl()
3776 dl_se->flags = attr->sched_flags; in __setparam_dl()
3808 const struct sched_attr *attr) in __setscheduler_params() argument
3810 int policy = attr->sched_policy; in __setscheduler_params()
[all …]
/kernel/trace/
Dblktrace.c1637 struct device_attribute *attr,
1640 struct device_attribute *attr,
1654 &dev_attr_enable.attr,
1655 &dev_attr_act_mask.attr,
1656 &dev_attr_pid.attr,
1657 &dev_attr_start_lba.attr,
1658 &dev_attr_end_lba.attr,
1748 struct device_attribute *attr, in sysfs_blk_trace_attr_show() argument
1769 if (attr == &dev_attr_enable) { in sysfs_blk_trace_attr_show()
1776 else if (attr == &dev_attr_act_mask) in sysfs_blk_trace_attr_show()
[all …]
Dbpf_trace.c209 if (unlikely(event->attr.type != PERF_TYPE_HARDWARE && in bpf_perf_event_read()
210 event->attr.type != PERF_TYPE_RAW)) in bpf_perf_event_read()
249 if (unlikely(event->attr.type != PERF_TYPE_SOFTWARE || in bpf_perf_event_output()
250 event->attr.config != PERF_COUNT_SW_BPF_OUTPUT)) in bpf_perf_event_output()
Dtrace_event_perf.c55 if (!p_event->attr.exclude_callchain_user) in perf_trace_event_perm()
62 if (p_event->attr.sample_type & PERF_SAMPLE_STACK_USER) in perf_trace_event_perm()
67 if (!(p_event->attr.sample_type & PERF_SAMPLE_RAW)) in perf_trace_event_perm()
210 u64 event_id = p_event->attr.config; in perf_trace_init()
Dtrace_selftest.c1046 static const struct sched_attr attr = { in trace_wakeup_test_thread() local
1054 sched_setattr(current, &attr); in trace_wakeup_test_thread()
/kernel/time/
Dclocksource.c854 struct device_attribute *attr, char *buf) in sysfs_show_current_clocksources() argument
893 struct device_attribute *attr, in sysfs_override_clocksource() argument
919 struct device_attribute *attr, in sysfs_unbind_clocksource() argument
953 struct device_attribute *attr, in sysfs_show_available_clocksources() argument
Dclockevents.c657 struct device_attribute *attr, in sysfs_show_current_tick_dev() argument
674 struct device_attribute *attr, in sysfs_unbind_tick_dev() argument
/kernel/livepatch/
Dcore.c599 static ssize_t enabled_store(struct kobject *kobj, struct kobj_attribute *attr, in enabled_store() argument
643 struct kobj_attribute *attr, char *buf) in enabled_show() argument
653 &enabled_kobj_attr.attr,

12