[PATCH] powerpc: Drop lockdep_assert_cpus_held call from arch_update_cpu_topology

Michael Ellerman mpe at ellerman.id.au
Tue Oct 10 20:48:36 AEDT 2017


Thomas Gleixner <tglx at linutronix.de> writes:
...
>
> So no, the lockdep assertion triggers in #1 and #2 because
>
>    #1 does definitely not hold it
>
>    #2 is indirectily protected, but we have no way to express that to lockdep
>
> So yes, it's safe for both cases to remove that assertion.

Thanks for clarifying that.

> If there are other call sites, then they need to be checked. If not, you're
> good.

I also see a call in partition_sched_domains(). The comment there says
"call with hotplug lock held" and I'm sure all callers do so ...

But seriously I think the patch is good because we know there are at
least two callers who are safe but can't hold the lock, so doing an
assert there is definitely wrong.

So I'll apply the patch with a slightly reworked commit message.

cheers


More information about the Linuxppc-dev mailing list