Lines Matching defs:kobj

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