Fwd: Where MAX_NR_ZONES defined in Suse 12.3 4.4.131-94.
From: Ilan Schwarts
Date: Tue Sep 25 2018 - 09:18:46 EST
Hi,
I maintain kernel module, till today, when compiling the kernel
module, I use to download kernel sources (headers are not enough since
i had to include btrfs code), and compile it.
In suse 12.3 (4.4.131-94.29-default), I downloaded the source package
(kernel-source-4.4.131-94.29.1.src.rpm), extract linux-4.4.tar.xz out
of it, copy to /usr/src/4.4.131-94.29 and update symbolic link from
/lib/modules/4.4.131-94.29-default/source to source ->
/usr/src/linux-4.4.131-94.29
When compiling I get the following exception:
/usr/src/linux-4.4.131-94.29/include/linux/page-flags-layout.h:21:2:
error: #error ZONES_SHIFT -- too many zones configured adjust
calculation
#error ZONES_SHIFT -- too many zones configured adjust calculation
I assume MAX_NR_ZONES is not defined.
How could that be ?
The code for page-flags-layout.h line 21 is:
#if MAX_NR_ZONES < 2
#define ZONES_SHIFT 0
#elif MAX_NR_ZONES <= 2
#define ZONES_SHIFT 1
#elif MAX_NR_ZONES <= 4
#define ZONES_SHIFT 2
#else
#error ZONES_SHIFT -- too many zones configured adjust calculation
#endif