drivers/gpu/drm/imagination/pvr_vm.c:4041:20: error: initializer element is not a compile-time constant
Hi, @frankbinns I try to build this kernel today and found this error:
/home/firstlove/projects/kernel/powervr/drivers/gpu/drm/imagination/pvr_vm.c:4041:20: error: initializer element is not a compile-time constant
.reserved_size = GET_RESERVED_SIZE(general_static_data_areas),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/firstlove/projects/kernel/powervr/drivers/gpu/drm/imagination/pvr_vm.c:4031:34: note: expanded from macro 'GET_RESERVED_SIZE'
#define GET_RESERVED_SIZE(areas) round_up((LAST_AREA(areas).offset + LAST_AREA(areas).size), \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/firstlove/projects/kernel/powervr/include/linux/math.h:24:55: note: expanded from macro 'round_up'
#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
1 error generated.
AR drivers/usb/dwc3/built-in.a
CC drivers/input/serio/libps2.o
make[5]: *** [/home/firstlove/projects/kernel/powervr/scripts/Makefile.build:287: drivers/gpu/drm/imagination/pvr_vm.o] Error 1
Compiler version:
firstlove@chenli ~/p/k/powervr (powervr-next) [2]> aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/11.2.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /build/aarch64-linux-gnu-gcc/src/gcc-11.2.0/configure --prefix=/usr --program-prefix=aarch64-linux-gnu- --with-local-prefix=/usr/aarch64-linux-gnu --with-sysroot=/usr/aarch64-linux-gnu --with-build-sysroot=/usr/aarch64-linux-gnu --with-native-system-header-dir=/include --libdir=/usr/lib --libexecdir=/usr/lib --target=aarch64-linux-gnu --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-nls --enable-default-pie --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.0 (GCC)
Edited by Chen Li