mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
cpufreq: qcom-cpufreq-hw: Initialize the spinlock before usage
Initialization of the spinlock is required to avoid the below trace. cpufreq: driver qcom-cpufreq-hw up and running BUG: spinlock bad magic on CPU#7, swapper/0/1 lock: qcom_cpufreq_counter+0x128/0x140, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0. Change-Id: I079ebd7c0009c3b634d2d5d41ac880da06cf8f6d Signed-off-by: Taniya Das <tdas@codeaurora.org>
This commit is contained in:
parent
ffd89c1cb1
commit
b478324c7f
1 changed files with 4 additions and 1 deletions
|
|
@ -438,10 +438,10 @@ static int qcom_resources_init(struct platform_device *pdev)
|
|||
|
||||
static int qcom_cpufreq_hw_driver_probe(struct platform_device *pdev)
|
||||
{
|
||||
int rc;
|
||||
struct cpu_cycle_counter_cb cycle_counter_cb = {
|
||||
.get_cpu_cycle_counter = qcom_cpufreq_get_cpu_cycle_counter,
|
||||
};
|
||||
int rc, cpu;
|
||||
|
||||
/* Get the bases of cpufreq for domains */
|
||||
rc = qcom_resources_init(pdev);
|
||||
|
|
@ -456,6 +456,9 @@ static int qcom_cpufreq_hw_driver_probe(struct platform_device *pdev)
|
|||
return rc;
|
||||
}
|
||||
|
||||
for_each_possible_cpu(cpu)
|
||||
spin_lock_init(&qcom_cpufreq_counter[cpu].lock);
|
||||
|
||||
rc = register_cpu_cycle_counter_cb(&cycle_counter_cb);
|
||||
if (rc) {
|
||||
dev_err(&pdev->dev, "cycle counter cb failed to register\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue