Lines Matching refs:rft
205 static int rdtgroup_add_file(struct kernfs_node *parent_kn, struct rftype *rft) in rdtgroup_add_file() argument
210 kn = __kernfs_create_file(parent_kn, rft->name, rft->mode, in rdtgroup_add_file()
212 0, rft->kf_ops, rft, NULL, NULL); in rdtgroup_add_file()
228 struct rftype *rft = of->kn->priv; in rdtgroup_seqfile_show() local
230 if (rft->seq_show) in rdtgroup_seqfile_show()
231 return rft->seq_show(of, m, arg); in rdtgroup_seqfile_show()
238 struct rftype *rft = of->kn->priv; in rdtgroup_file_write() local
240 if (rft->write) in rdtgroup_file_write()
241 return rft->write(of, buf, nbytes, off); in rdtgroup_file_write()
259 struct rftype *rft = of->kn->priv; in is_cpu_list() local
261 return rft->flags & RFTYPE_FLAGS_CPUS_LIST; in is_cpu_list()
1573 struct rftype *rfts, *rft; in rdtgroup_add_files() local
1581 for (rft = rfts; rft < rfts + len; rft++) { in rdtgroup_add_files()
1582 if (rft->fflags && ((fflags & rft->fflags) == rft->fflags)) { in rdtgroup_add_files()
1583 ret = rdtgroup_add_file(kn, rft); in rdtgroup_add_files()
1591 pr_warn("Failed to add %s, err=%d\n", rft->name, ret); in rdtgroup_add_files()
1592 while (--rft >= rfts) { in rdtgroup_add_files()
1593 if ((fflags & rft->fflags) == rft->fflags) in rdtgroup_add_files()
1594 kernfs_remove_by_name(kn, rft->name); in rdtgroup_add_files()
1601 struct rftype *rfts, *rft; in rdtgroup_get_rftype_by_name() local
1607 for (rft = rfts; rft < rfts + len; rft++) { in rdtgroup_get_rftype_by_name()
1608 if (!strcmp(rft->name, name)) in rdtgroup_get_rftype_by_name()
1609 return rft; in rdtgroup_get_rftype_by_name()
1617 struct rftype *rft; in thread_throttle_mode_init() local
1619 rft = rdtgroup_get_rftype_by_name("thread_throttle_mode"); in thread_throttle_mode_init()
1620 if (!rft) in thread_throttle_mode_init()
1623 rft->fflags = RF_CTRL_INFO | RFTYPE_RES_MB; in thread_throttle_mode_init()
1686 struct rftype *rfts, *rft; in rdtgroup_kn_mode_restore() local
1692 for (rft = rfts; rft < rfts + len; rft++) { in rdtgroup_kn_mode_restore()
1693 if (!strcmp(rft->name, name)) in rdtgroup_kn_mode_restore()
1694 iattr.ia_mode = rft->mode & mask; in rdtgroup_kn_mode_restore()