Lines Matching refs:kobj
19 static struct intel_engine_cs *kobj_to_engine(struct kobject *kobj) in kobj_to_engine() argument
21 return container_of(kobj, struct kobj_engine, base)->engine; in kobj_to_engine()
25 name_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in name_show() argument
27 return sysfs_emit(buf, "%s\n", kobj_to_engine(kobj)->name); in name_show()
34 class_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in class_show() argument
36 return sysfs_emit(buf, "%d\n", kobj_to_engine(kobj)->uabi_class); in class_show()
43 inst_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in inst_show() argument
45 return sysfs_emit(buf, "%d\n", kobj_to_engine(kobj)->uabi_instance); in inst_show()
52 mmio_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in mmio_show() argument
54 return sysfs_emit(buf, "0x%x\n", kobj_to_engine(kobj)->mmio_base); in mmio_show()
121 caps_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in caps_show() argument
123 struct intel_engine_cs *engine = kobj_to_engine(kobj); in caps_show()
132 all_caps_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in all_caps_show() argument
134 return __caps_show(kobj_to_engine(kobj), -1, buf, false); in all_caps_show()
141 max_spin_store(struct kobject *kobj, struct kobj_attribute *attr, in max_spin_store() argument
144 struct intel_engine_cs *engine = kobj_to_engine(kobj); in max_spin_store()
179 max_spin_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in max_spin_show() argument
181 struct intel_engine_cs *engine = kobj_to_engine(kobj); in max_spin_show()
190 max_spin_default(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in max_spin_default() argument
192 struct intel_engine_cs *engine = kobj_to_engine(kobj); in max_spin_default()
201 timeslice_store(struct kobject *kobj, struct kobj_attribute *attr, in timeslice_store() argument
204 struct intel_engine_cs *engine = kobj_to_engine(kobj); in timeslice_store()
233 timeslice_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in timeslice_show() argument
235 struct intel_engine_cs *engine = kobj_to_engine(kobj); in timeslice_show()
244 timeslice_default(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in timeslice_default() argument
246 struct intel_engine_cs *engine = kobj_to_engine(kobj); in timeslice_default()
255 stop_store(struct kobject *kobj, struct kobj_attribute *attr, in stop_store() argument
258 struct intel_engine_cs *engine = kobj_to_engine(kobj); in stop_store()
284 stop_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in stop_show() argument
286 struct intel_engine_cs *engine = kobj_to_engine(kobj); in stop_show()
295 stop_default(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in stop_default() argument
297 struct intel_engine_cs *engine = kobj_to_engine(kobj); in stop_default()
306 preempt_timeout_store(struct kobject *kobj, struct kobj_attribute *attr, in preempt_timeout_store() argument
309 struct intel_engine_cs *engine = kobj_to_engine(kobj); in preempt_timeout_store()
339 preempt_timeout_show(struct kobject *kobj, struct kobj_attribute *attr, in preempt_timeout_show() argument
342 struct intel_engine_cs *engine = kobj_to_engine(kobj); in preempt_timeout_show()
351 preempt_timeout_default(struct kobject *kobj, struct kobj_attribute *attr, in preempt_timeout_default() argument
354 struct intel_engine_cs *engine = kobj_to_engine(kobj); in preempt_timeout_default()
363 heartbeat_store(struct kobject *kobj, struct kobj_attribute *attr, in heartbeat_store() argument
366 struct intel_engine_cs *engine = kobj_to_engine(kobj); in heartbeat_store()
396 heartbeat_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in heartbeat_show() argument
398 struct intel_engine_cs *engine = kobj_to_engine(kobj); in heartbeat_show()
407 heartbeat_default(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in heartbeat_default() argument
409 struct intel_engine_cs *engine = kobj_to_engine(kobj); in heartbeat_default()
417 static void kobj_engine_release(struct kobject *kobj) in kobj_engine_release() argument
419 kfree(kobj); in kobj_engine_release()
505 dir = kobject_create_and_add("engine", &kdev->kobj); in intel_engines_add_sysfs()
510 struct kobject *kobj; in intel_engines_add_sysfs() local
512 kobj = kobj_engine(dir, engine); in intel_engines_add_sysfs()
513 if (!kobj) in intel_engines_add_sysfs()
516 if (sysfs_create_files(kobj, files)) in intel_engines_add_sysfs()
520 sysfs_create_file(kobj, ×lice_duration_attr.attr)) in intel_engines_add_sysfs()
524 sysfs_create_file(kobj, &preempt_timeout_attr.attr)) in intel_engines_add_sysfs()
527 add_defaults(container_of(kobj, struct kobj_engine, base)); in intel_engines_add_sysfs()
531 kobject_put(kobj); in intel_engines_add_sysfs()