Re: [PATCH] powerpc: Drop lockdep_assert_cpus_held call from arch_update_cpu_topology

From: Thomas Gleixner
Date: Thu Oct 05 2017 - 08:39:05 EST

On Wed, 4 Oct 2017, Thiago Jung Bauermann wrote:

> It turns out that not all paths calling arch_update_cpu_topology hold
> cpu_hotplug_lock, but that's ok because those paths aren't supposed to race
> with any concurrent hotplug events.
> Callers of arch_update_cpu_topology are expected to know what they are
> doing when they call the function without holding the lock, so remove the
> lockdep warning.

"Expected to know what they are doing" is not really a good approach as
it's way too simple to screw things up.

You might consider to have two functions where one does the check and the
other does not, but I leave that to the PPC maintainers.