Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d085a5ea authored by Shiraz Hashim's avatar Shiraz Hashim
Browse files

arm: mm: Fix build error due to variable input to BUILD_BUG_ON



BUILD_BUG_ON() expands to a build error based on value of
constant bool parameter passed to it. Presently,
early_fixmap_shutdown while iterating through
permanent_fixed_address and calling fix_to_virt on each of
them, ends up passing non-constant value to the same.

It is observed that with '-Oz' build option LLVM compiler
fails to guess the right value to expand BUILD_BUG_ON and
incorrectly raises following error.

  arch/arm/mm/mmu.o: In function `fix_to_virt':
  include/asm-generic/fixmap.h:31:
  undefined reference to `__compiletime_assert_31'
  make[2]: *** [vmlinux] Error 1
  make[2]: Leaving directory
  `build/kobj'
  make[1]: *** [sub-make] Error 2

Modify early_fixmap_shutdown to bypass fix_to_virt and
directly use __fixt_to_virt and validate boundaries,
passing constant values to BUILD_BUG_ON.

Change-Id: Ib0bd771ec0bdae0fbc00ed0c0df8f716cc0386b5
Signed-off-by: default avatarShiraz Hashim <shashim@codeaurora.org>
parent b7bafeea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment