<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - [BAT SKL] lockdep splat"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93294#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - [BAT SKL] lockdep splat"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93294">bug 93294</a>
              from <span class="vcard"><a class="email" href="mailto:joonas.lahtinen@linux.intel.com" title="Joonas Lahtinen <joonas.lahtinen@linux.intel.com>"> <span class="fn">Joonas Lahtinen</span></a>
</span></b>
        <pre>OK, found the real cause. P-state init ends up locking first the policy->rwsem
and then the cpu_hotplug.lock. I just wonder how this does not happen on all
platforms?

I attached a description of the call traces. I think our P-state driver should
not call get_online_cpus() during the policy init, if possible, as not many of
the other drivers call it either.

Or doing the init under cpu_hotplug_begin(). I'll see about this tomorrow.

$ fgrep get_online_cpus *
acpi-cpufreq.c:    get_online_cpus();
cpufreq.c:    get_online_cpus();
cpufreq.c:    get_online_cpus();
cpufreq.c:    get_online_cpus();
cpufreq_ondemand.c:    get_online_cpus();
intel_pstate.c:    get_online_cpus();
intel_pstate.c:    get_online_cpus();
powernow-k8.c:    get_online_cpus();</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>