On Thu, Aug 29, 2019 at 03:24:31PM +0100, Joao Martins wrote: > On 8/29/19 2:50 PM, Joao Martins wrote: > > On 8/29/19 12:56 PM, Marcelo Tosatti wrote: > >> Hi Joao, > >> > >> On Wed, Aug 28, 2019 at 07:56:50PM +0100, Joao Martins wrote: > >>> +static void haltpoll_uninit(void) > >>> +{ > >>> + unsigned int cpu; > >>> + > >>> + cpus_read_lock(); > >>> + > >>> + for_each_online_cpu(cpu) { > >>> + struct cpuidle_device *dev = > >>> + per_cpu_ptr(haltpoll_cpuidle_devices, cpu); > >>> + > >>> + if (!dev->registered) > >>> + continue; > >>> + > >>> + arch_haltpoll_disable(cpu); > >>> + cpuidle_unregister_device(dev); > >>> + } > >> > >> 1) > >> > >>> + > >>> + cpuidle_unregister(&haltpoll_driver); > >> > >> cpuidle_unregister_driver. > > > > Will fix -- this was an oversight. > > > >> > >>> + free_percpu(haltpoll_cpuidle_devices); > >>> + haltpoll_cpuidle_devices = NULL; > >>> + > >>> + cpus_read_unlock(); > >> > >> Any reason you can't cpus_read_unlock() at 1) ? > >> > > No, let me adjust that too. > > > >> Looks good otherwise. > >> > > BTW, should I take this as a Acked-by, Reviewed-by, or neither? :) > > Joao I'll ACK -v2 once you send it.