Cannot compile using Linux kernel 7.0.0
root@hongyu-virtual-machine:~/FreeZone# make
make -C /lib/modules/7.0.0-rc1+/build M=/root/FreeZone modules EXTRA_CFLAGS="-std=gnu11"
make[1]: Entering directory '/usr/src/linux'
make[2]: Entering directory '/root/FreeZone'
CC [M] main.o
main.c: In function ‘__validate_configs_arch’:
main.c:220:68: error: ‘E820_TYPE_RESERVED_KERN’ undeclared (first use in this function); did you mean ‘E820_TYPE_RESERVED’?
220 | e820__mapped_any(resv_start_bytes, resv_end_bytes, E820_TYPE_RESERVED_KERN)) {
| ^~~~~~~~~~~~~~~~~~~~~~~
| E820_TYPE_RESERVED
main.c:220:68: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [/usr/src/linux/scripts/Makefile.build:289: main.o] Error 1
make[3]: *** [/usr/src/linux/Makefile:2101: .] Error 2
make[2]: *** [/usr/src/linux/Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/root/FreeZone'
make[1]: *** [Makefile:248: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux'
make: *** [Makefile:8: default] Error 2
NVMeVirt maintainer tried to fix this by bypassing the check, but cancelled it at last:
https://github.com/snu-csl/nvmevirt/pull/70
The Linux kernel community removed the E820_TYPE_RESERVED_KERN macro in this PR:
https://github.com/torvalds/linux/commit/efe659ac014647eb048d62475e55cce42d8951d7
Cannot compile using Linux kernel 7.0.0
NVMeVirt maintainer tried to fix this by bypassing the check, but cancelled it at last:
https://github.com/snu-csl/nvmevirt/pull/70
The Linux kernel community removed the E820_TYPE_RESERVED_KERN macro in this PR:
https://github.com/torvalds/linux/commit/efe659ac014647eb048d62475e55cce42d8951d7