[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d689e382-e4f2-0b03-03a5-2ff4a6bb88bb@linaro.org>
Date: Tue, 30 Oct 2018 08:55:20 +0100
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Vincent Guittot <vincent.guittot@...aro.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH 1/4] base/drivers/arch_topology: Remove useless check
On 30/10/2018 06:50, Viresh Kumar wrote:
> On Mon, Oct 29, 2018 at 9:56 PM Daniel Lezcano
> <daniel.lezcano@...aro.org> wrote:
>
> Would have been better if I was cc'd on all the patches since I was
> looking at this
> stuff actively this week :)
ah, yes. Sorry for that.
>> The function 'register_cpufreq_notifier' registers the
>> init_cpu_capacity_notifier() only if raw_capacity is not NULL.
>>
>> Hence init_cpu_capacity_notifier() can not be called with raw_capacity
>> set to NULL, it is pointless to check it.
>
> It isn't entirely pointless though.
>
> It is possible for init_cpu_capacity_notifier() to get called after
> free_raw_capacity()
> is called from it as the notifier unregistration happens from a workqueue.
The workqueue is called from init_cpu_capacity_callback(). This one is
called in the notifier callback. IOW the notification callback
unregisters itself. But if it is not registered, it won't unregister,
hence it won't call the workqueue and init_cpu_capacity_notifier() is
not called.
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Powered by blists - more mailing lists