Commit fea30ad1bd ("ANDROID: preserve CRC for some DRM functions")
caused the BIT() macro to be redefined because vdso/bits.h is included
through vdso/datapage.h in some other files.
Move the __GENKSYMS__ BIT() check to vdso/bits.h in order to fix this.
Fixes: fea30ad1bd ("ANDROID: preserve CRC for some DRM functions")
Change-Id: I767d75e7e40b5acfa9b66754c7b2b74879a28de5
Signed-off-by: Michael Bestas <mkbestas@lineageos.org>
Commit 4523b6cac7 ("linux/bits.h: make BIT(), GENMASK(), and friends
available in assembly") caused the BIT_UUL() and BIT_MASK() macros to be
redefined a bit to resolve some build problems when using those macros
in assembly files. Unfortunatly changing these caused the CRC values of
a bunch of DRM functions to change as a new set of () were used in the
macros now.
Fix this all up by going back to the old versions if we are building the
CRCs, otherwise use the real versions of these macros.
Bug: 161946584
Fixes: 4523b6cac7 ("linux/bits.h: make BIT(), GENMASK(), and friends available in assembly")
Change-Id: I15d7b91ec349fe557a8458d9f1a851bb07a8b116
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
commit 95b980d62d52c4c1768ee719e8db3efe27ef52b2 upstream.
BIT(), GENMASK(), etc. are useful to define register bits of hardware.
However, low-level code is often written in assembly, where they are
not available due to the hard-coded 1UL, 0UL.
In fact, in-kernel headers such as arch/arm64/include/asm/sysreg.h
use _BITUL() instead of BIT() so that the register bit macros are
available in assembly.
Using macros in include/uapi/linux/const.h have two reasons:
[1] For use in uapi headers
We should use underscore-prefixed variants for user-space.
[2] For use in assembly code
Since _BITUL() uses UL(1) instead of 1UL, it can be used as an
alternative of BIT().
For [2], it is pretty easy to change BIT() etc. for use in assembly.
This allows to replace _BUTUL() in kernel-space headers with BIT().
Link: http://lkml.kernel.org/r/20190609153941.17249-1-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>