Lines Matching refs:pl
123 static bool is_pl_valid(struct rapl_domain *rd, int pl)
125 if (pl < POWER_LIMIT1 || pl > POWER_LIMIT4)
127 return rd->rpl[pl].name ? true : false;
130 static int get_pl_lock_prim(struct rapl_domain *rd, int pl)
133 if (pl == POWER_LIMIT1)
135 if (pl == POWER_LIMIT2)
137 if (pl == POWER_LIMIT4)
142 if (pl == POWER_LIMIT4)
154 static int get_pl_prim(struct rapl_domain *rd, int pl, enum pl_prims prim)
156 switch (pl) {
169 return get_pl_lock_prim(rd, pl);
183 return get_pl_lock_prim(rd, pl);
194 return get_pl_lock_prim(rd, pl);
257 static int rapl_read_pl_data(struct rapl_domain *rd, int pl,
260 static int rapl_write_pl_data(struct rapl_domain *rd, int pl,
880 static int rapl_read_pl_data(struct rapl_domain *rd, int pl,
883 enum rapl_primitives prim = get_pl_prim(rd, pl, pl_prim);
885 if (!is_pl_valid(rd, pl))
891 static int rapl_write_pl_data(struct rapl_domain *rd, int pl,
895 enum rapl_primitives prim = get_pl_prim(rd, pl, pl_prim);
897 if (!is_pl_valid(rd, pl))
900 if (rd->rpl[pl].locked) {
901 pr_debug("%s:%s:%s locked by BIOS\n", rd->rp->name, rd->name, pl_names[pl]);