Skip to content

Commit 985a677

Browse files
lukaszluba-armrafaeljw
authored andcommitted
powercap: DTPM: Check for Energy Model type
The Energy Model power values might be artificial. In such case it's safe to bail out during the registration, since the PowerCap framework supports only micro-Watts. Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Reviewed-by: Ionela Voinescu <ionela.voinescu@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 9926bbe commit 985a677

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/powercap/dtpm_cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ static int __dtpm_cpu_setup(int cpu, struct dtpm *parent)
211211
return 0;
212212

213213
pd = em_cpu_get(cpu);
214-
if (!pd)
214+
if (!pd || em_is_artificial(pd))
215215
return -EINVAL;
216216

217217
dtpm_cpu = kzalloc(sizeof(*dtpm_cpu), GFP_KERNEL);

0 commit comments

Comments
 (0)