Home
last modified time | relevance | path

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

/samples/kobject/
Dkobject-example.c28 static ssize_t foo_show(struct kobject *kobj, struct kobj_attribute *attr, in foo_show() argument
34 static ssize_t foo_store(struct kobject *kobj, struct kobj_attribute *attr, in foo_store() argument
54 static ssize_t b_show(struct kobject *kobj, struct kobj_attribute *attr, in b_show() argument
59 if (strcmp(attr->attr.name, "baz") == 0) in b_show()
66 static ssize_t b_store(struct kobject *kobj, struct kobj_attribute *attr, in b_store() argument
75 if (strcmp(attr->attr.name, "baz") == 0) in b_store()
93 &foo_attribute.attr,
94 &baz_attribute.attr,
95 &bar_attribute.attr,
Dkset-example.c39 struct attribute attr; member
40 ssize_t (*show)(struct foo_obj *foo, struct foo_attribute *attr, char *buf);
41 ssize_t (*store)(struct foo_obj *foo, struct foo_attribute *attr, const char *buf, size_t count);
43 #define to_foo_attr(x) container_of(x, struct foo_attribute, attr)
53 struct attribute *attr, in foo_attr_show() argument
59 attribute = to_foo_attr(attr); in foo_attr_show()
73 struct attribute *attr, in foo_attr_store() argument
79 attribute = to_foo_attr(attr); in foo_attr_store()
112 static ssize_t foo_show(struct foo_obj *foo_obj, struct foo_attribute *attr, in foo_show() argument
118 static ssize_t foo_store(struct foo_obj *foo_obj, struct foo_attribute *attr, in foo_store() argument
[all …]
/samples/hw_breakpoint/
Ddata_breakpoint.c43 struct perf_event_attr attr; in hw_break_module_init() local
49 hw_breakpoint_init(&attr); in hw_break_module_init()
50 attr.bp_addr = (unsigned long)addr; in hw_break_module_init()
51 attr.bp_len = HW_BREAKPOINT_LEN_4; in hw_break_module_init()
52 attr.bp_type = HW_BREAKPOINT_W; in hw_break_module_init()
54 sample_hbp = register_wide_hw_breakpoint(&attr, sample_hbp_handler, NULL); in hw_break_module_init()
/samples/bpf/
Dtask_fd_query_user.c130 struct perf_event_attr attr = {}; in test_nondebug_fs_kuprobe_common() local
140 attr.sample_period = 1; in test_nondebug_fs_kuprobe_common()
141 attr.wakeup_events = 1; in test_nondebug_fs_kuprobe_common()
143 attr.config |= 1 << is_return_bit; in test_nondebug_fs_kuprobe_common()
146 attr.config1 = ptr_to_u64((void *)name); in test_nondebug_fs_kuprobe_common()
147 attr.config2 = offset; in test_nondebug_fs_kuprobe_common()
149 attr.config1 = 0; in test_nondebug_fs_kuprobe_common()
150 attr.config2 = addr; in test_nondebug_fs_kuprobe_common()
152 attr.size = sizeof(attr); in test_nondebug_fs_kuprobe_common()
153 attr.type = type; in test_nondebug_fs_kuprobe_common()
[all …]
Dtrace_event_user.c137 static void test_perf_event_all_cpu(struct perf_event_attr *attr) in test_perf_event_all_cpu() argument
149 attr->inherit = 0; in test_perf_event_all_cpu()
153 pmu_fd = sys_perf_event_open(attr, -1, i, -1, 0); in test_perf_event_all_cpu()
181 static void test_perf_event_task(struct perf_event_attr *attr) in test_perf_event_task() argument
189 attr->inherit = 1; in test_perf_event_task()
192 pmu_fd = sys_perf_event_open(attr, 0, -1, -1, 0); in test_perf_event_task()
Dtracex6_user.c25 static void check_on_cpu(int cpu, struct perf_event_attr *attr) in check_on_cpu() argument
37 pmu_fd = sys_perf_event_open(attr, -1/*pid*/, cpu/*cpu*/, -1/*group_fd*/, 0); in check_on_cpu()
73 static void test_perf_event_array(struct perf_event_attr *attr, in test_perf_event_array() argument
86 check_on_cpu(i, attr); in test_perf_event_array()
/samples/acrn/
Dvm-sample.c74 ram_map.attr = ACRN_MEM_ACCESS_RWX; in main()
/samples/landlock/
Dsandboxer.c30 landlock_create_ruleset(const struct landlock_ruleset_attr *const attr, in landlock_create_ruleset() argument
33 return syscall(__NR_landlock_create_ruleset, attr, size, flags); in landlock_create_ruleset()
/samples/vfio-mdev/
Dmdpy.c628 resolution_show(struct device *dev, struct device_attribute *attr, in resolution_show() argument
640 &dev_attr_resolution.attr,
Dmbochs.c1331 memory_show(struct device *dev, struct device_attribute *attr, in memory_show() argument
1341 &dev_attr_memory.attr,
Dmtty.c1905 sample_mdev_dev_show(struct device *dev, struct device_attribute *attr, in sample_mdev_dev_show() argument
1914 &dev_attr_sample_mdev_dev.attr,