When I compile my kernel module, as I did for suse 12.2, i get the following: #error ZONES_SHIFT – too many zones configured adjust calculation
from looking at the sources, it seems that MAX_NR_ZONES is undefined.
Where is it suppose to be ? and what does ZONES_SHIFT means ? and what the value suppose to be ?[/QUOTE]
Hi and welcome to the Forum
So what is the kernel module your trying to compile?
You would need to check the module Makefile/Kconfig for this setting. I imagine a header file with;
It’s something in the module code, not the kernel… it could be a yes
or no and not a number… that’s why I asked for information on the
module. Or post the whole output of the gcc command and error…
Cheers Malcolm Â°Â¿Â° SUSE Knowledge Partner (Linux Counter #276890)
SLES 15 | GNOME Shell 3.26.2 | 4.12.14-25.16-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
[QUOTE]When compiling I get the following exception:
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[/QUOTE]
[QUOTE]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 →
Maybe the answer is in the other files, some patch that’s included with the distro source RPM. Or maybe that failing code branch hasn’t been ported and is only used in an isolated way? I haven’t had a closer look so far.
Have you checked the upstream kernel sources, to see if it compiles cleanly and then checking if your module compiles against it cleanly? Once you did, you can take it from there to the distro-specific things. If it already fails with the upstream code, the Linux kernel ML may be helpful to find out what needs to be adjusted.