diff --git a/drivers/devfreq/arm-memlat-mon.c b/drivers/devfreq/arm-memlat-mon.c index 7cf6d701a496..1ab4a88e4fa0 100644 --- a/drivers/devfreq/arm-memlat-mon.c +++ b/drivers/devfreq/arm-memlat-mon.c @@ -519,11 +519,15 @@ static int memlat_event_hotplug_going_down(unsigned int cpu) return ret; } +/* + * Note: We must be holding cpus_read_lock() before calling this function + * since we are using cpuslocked version of function inside it + */ static int memlat_event_cpu_hp_init(void) { int ret = 0; - ret = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, + ret = cpuhp_setup_state_nocalls_cpuslocked(CPUHP_AP_ONLINE_DYN, "MEMLAT_EVENT", memlat_event_hotplug_coming_up, memlat_event_hotplug_going_down);