]> git.baikalelectronics.ru Git - kernel.git/commit
[CPUFREQ] Fix PCC driver error path
authorMatthew Garrett <mjg@redhat.com>
Thu, 15 Jul 2010 15:44:00 +0000 (11:44 -0400)
committerDave Jones <davej@redhat.com>
Tue, 3 Aug 2010 17:47:02 +0000 (13:47 -0400)
commitdc59e7629175d052972f9c9c3fb17de6c73f3f30
tree7e8f56588cbb44657a801a23e1589308f0cc553e
parent0d94765c41c9890e9fbe7e3246eeb2535e2fb8d7
[CPUFREQ] Fix PCC driver error path

The PCC cpufreq driver unmaps the mailbox address range if any CPUs fail to
initialise, but doesn't do anything to remove the registered CPUs from the
cpufreq core resulting in failures further down the line. We're better off
simply returning a failure - the cpufreq core will unregister us cleanly if
we end up with no successfully registered CPUs. Tidy up the failure path
and also add a sanity check to ensure that the firmware gives us a realistic
frequency - the core deals badly with that being set to 0.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
Signed-off-by: Dave Jones <davej@redhat.com>
arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c