Re: [PATCH 2/2] drm/i915: Ensure intel_engine_init_execlist() builds with Clang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 16, 2018 at 8:35 AM Stephen Boyd <swboyd@xxxxxxxxxxxx> wrote:
>
> Quoting Jani Nikula (2018-10-16 05:29:38)
> > Clang build with UBSAN enabled leads to the following build error:

I'm overjoyed that you're testing this configuration! If you find more
bugs, we're happy to help triage if you let us know about them here:
https://github.com/ClangBuiltLinux/linux/issues.

> >
> > drivers/gpu/drm/i915/intel_engine_cs.o: In function `intel_engine_init_execlist':
> > drivers/gpu/drm/i915/intel_engine_cs.c:411: undefined reference to `__compiletime_assert_411'
> >
> > Again, for this to work the code would first need to be inlined and then
> > constant folded, which doesn't work for Clang because semantic analysis
> > happens before optimization/inlining.

Yep.

> >
> > Use GEM_BUG_ON() instead of BUILD_BUG_ON().
> >
> > v2: Use is_power_of_2() from log2.h (Chris)
> >
> > References: http://mid.mail-archive.com/20181015203410.155997-1-swboyd@xxxxxxxxxxxx
> > Reported-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>
>
> Tested-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>

Reviewed-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>

-- 
Thanks,
~Nick Desaulniers
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux