[Intel-gfx] [PATCH 05/12] drm/i915: Protect lockdep functions with #ifdef
jani.nikula at linux.intel.com
Wed Feb 9 13:49:01 UTC 2022
On Tue, 08 Feb 2022, Namhyung Kim <namhyung at kernel.org> wrote:
> On Tue, Feb 8, 2022 at 10:51 AM Jani Nikula <jani.nikula at linux.intel.com> wrote:
>> On Tue, 08 Feb 2022, Namhyung Kim <namhyung at kernel.org> wrote:
>> > With upcoming lock tracepoints config, it'd define some of lockdep
>> > functions without enabling CONFIG_LOCKDEP actually. The existing code
>> > assumes those functions will be removed by the preprocessor but it's
>> > not the case anymore. Let's protect the code with #ifdef's explicitly.
>> I don't understand why you can't keep the no-op stubs for
> Because I want to use the lockdep annotation for other purposes.
> But the workqueue lockdep_map was defined under LOCKDEP
> only. Please see the description in the cover letter.
So lockdep_init_map() might still be there and build just fine for
CONFIG_LOCKDEP=n, but now we're actually required to wrap all call sites
in #ifdefs depending on the purpose? I'm not convinced yet.
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx