commit | e6257ccf82e571f6fb995cbcb19abc6eee7423de | [log] [tgz] |
---|---|---|
author | Jani Nikula <[email protected]> | Tue Oct 16 12:29:38 2018 |
committer | chrome-bot <[email protected]> | Fri Oct 19 02:01:20 2018 |
tree | 825125dc54edeb4881ae8bc9051a9798bbf6eb17 | |
parent | ac8f7a72c14c28728a8979e9fd5dd2fb2d078a0c [diff] |
FROMGIT: drm/i915: Ensure intel_engine_init_execlist() builds with Clang Clang build with UBSAN enabled leads to the following build error: 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. 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/[email protected] Reported-by: Stephen Boyd <[email protected]> Cc: Stephen Boyd <[email protected]> Cc: Chris Wilson <[email protected]> Tested-by: Nathan Chancellor <[email protected]> Tested-by: Stephen Boyd <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 410ed5731a6566498a3aa904420aa2e49ba0ba90 git://anongit.freedesktop.org/git/drm-intel drm-intel-next-queued) BUG=chromium:894237 TEST=Build amd64-generic with ubsan use flag Change-Id: I0a1973f817cb5e5e0fe55a1d1231cb40a34054ad Signed-off-by: Stephen Boyd <[email protected]> Reviewed-on: https://chromium-review.googlesource.com/1286074 Commit-Ready: Douglas Anderson <[email protected]> Reviewed-by: Manoj Gupta <[email protected]> Reviewed-by: Douglas Anderson <[email protected]>