Skip to content

Commit f186b2d

Browse files
committed
cpufreq: intel_pstate: Drop redundant locking from intel_pstate_driver_cleanup()
Remove the spinlock locking from intel_pstate_driver_cleanup() as it is not necessary because no other code accessing all_cpu_data[] can run in parallel with that function. Had the locking been necessary, though, it would have been incorrect because the lock in question is acquired from a hardirq handler and it cannot be acquired from thread context without disabling interrupts. Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 39cd87c commit f186b2d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3135,10 +3135,8 @@ static void intel_pstate_driver_cleanup(void)
31353135
if (intel_pstate_driver == &intel_pstate)
31363136
intel_pstate_clear_update_util_hook(cpu);
31373137

3138-
spin_lock(&hwp_notify_lock);
31393138
kfree(all_cpu_data[cpu]);
31403139
WRITE_ONCE(all_cpu_data[cpu], NULL);
3141-
spin_unlock(&hwp_notify_lock);
31423140
}
31433141
}
31443142
cpus_read_unlock();

0 commit comments

Comments
 (0)