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()
1570 struct rftype *rfts, *rft; in rdtgroup_add_files() local
1578 for (rft = rfts; rft < rfts + len; rft++) { in rdtgroup_add_files()
1579 if (rft->fflags && ((fflags & rft->fflags) == rft->fflags)) { in rdtgroup_add_files()
1580 ret = rdtgroup_add_file(kn, rft); in rdtgroup_add_files()
1588 pr_warn("Failed to add %s, err=%d\n", rft->name, ret); in rdtgroup_add_files()
1589 while (--rft >= rfts) { in rdtgroup_add_files()
1590 if ((fflags & rft->fflags) == rft->fflags) in rdtgroup_add_files()
1591 kernfs_remove_by_name(kn, rft->name); in rdtgroup_add_files()
1598 struct rftype *rfts, *rft; in rdtgroup_get_rftype_by_name() local
1604 for (rft = rfts; rft < rfts + len; rft++) { in rdtgroup_get_rftype_by_name()
1605 if (!strcmp(rft->name, name)) in rdtgroup_get_rftype_by_name()
1606 return rft; in rdtgroup_get_rftype_by_name()
1614 struct rftype *rft; in thread_throttle_mode_init() local
1616 rft = rdtgroup_get_rftype_by_name("thread_throttle_mode"); in thread_throttle_mode_init()
1617 if (!rft) in thread_throttle_mode_init()
1620 rft->fflags = RF_CTRL_INFO | RFTYPE_RES_MB; in thread_throttle_mode_init()
1683 struct rftype *rfts, *rft; in rdtgroup_kn_mode_restore() local
1689 for (rft = rfts; rft < rfts + len; rft++) { in rdtgroup_kn_mode_restore()
1690 if (!strcmp(rft->name, name)) in rdtgroup_kn_mode_restore()
1691 iattr.ia_mode = rft->mode & mask; in rdtgroup_kn_mode_restore()