Lines Matching refs:kobj
18 static void blk_mq_sysfs_release(struct kobject *kobj) in blk_mq_sysfs_release() argument
20 struct blk_mq_ctxs *ctxs = container_of(kobj, struct blk_mq_ctxs, kobj); in blk_mq_sysfs_release()
26 static void blk_mq_ctx_sysfs_release(struct kobject *kobj) in blk_mq_ctx_sysfs_release() argument
28 struct blk_mq_ctx *ctx = container_of(kobj, struct blk_mq_ctx, kobj); in blk_mq_ctx_sysfs_release()
31 kobject_put(&ctx->ctxs->kobj); in blk_mq_ctx_sysfs_release()
34 static void blk_mq_hw_sysfs_release(struct kobject *kobj) in blk_mq_hw_sysfs_release() argument
36 struct blk_mq_hw_ctx *hctx = container_of(kobj, struct blk_mq_hw_ctx, in blk_mq_hw_sysfs_release()
37 kobj); in blk_mq_hw_sysfs_release()
60 static ssize_t blk_mq_sysfs_show(struct kobject *kobj, struct attribute *attr, in blk_mq_sysfs_show() argument
69 ctx = container_of(kobj, struct blk_mq_ctx, kobj); in blk_mq_sysfs_show()
81 static ssize_t blk_mq_sysfs_store(struct kobject *kobj, struct attribute *attr, in blk_mq_sysfs_store() argument
90 ctx = container_of(kobj, struct blk_mq_ctx, kobj); in blk_mq_sysfs_store()
102 static ssize_t blk_mq_hw_sysfs_show(struct kobject *kobj, in blk_mq_hw_sysfs_show() argument
111 hctx = container_of(kobj, struct blk_mq_hw_ctx, kobj); in blk_mq_hw_sysfs_show()
123 static ssize_t blk_mq_hw_sysfs_store(struct kobject *kobj, in blk_mq_hw_sysfs_store() argument
133 hctx = container_of(kobj, struct blk_mq_hw_ctx, kobj); in blk_mq_hw_sysfs_store()
236 kobject_del(&ctx->kobj); in blk_mq_unregister_hctx()
238 kobject_del(&hctx->kobj); in blk_mq_unregister_hctx()
250 ret = kobject_add(&hctx->kobj, q->mq_kobj, "%u", hctx->queue_num); in blk_mq_register_hctx()
255 ret = kobject_add(&ctx->kobj, &hctx->kobj, "cpu%u", ctx->cpu); in blk_mq_register_hctx()
264 kobject_del(&ctx->kobj); in blk_mq_register_hctx()
266 kobject_del(&hctx->kobj); in blk_mq_register_hctx()
282 kobject_put(&dev->kobj); in blk_mq_unregister_dev()
289 kobject_init(&hctx->kobj, &blk_mq_hw_ktype); in blk_mq_hctx_kobj_init()
299 kobject_put(&ctx->kobj); in blk_mq_sysfs_deinit()
315 kobject_init(&ctx->kobj, &blk_mq_ctx_ktype); in blk_mq_sysfs_init()
324 WARN_ON_ONCE(!q->kobj.parent); in __blk_mq_register_dev()
327 ret = kobject_add(q->mq_kobj, kobject_get(&dev->kobj), "%s", "mq"); in __blk_mq_register_dev()
350 kobject_put(&dev->kobj); in __blk_mq_register_dev()