Why not just make all the exported kernel interfaces the same whether
the kernel is single processor or SMP? You shouldn't need to have
multiple modules for kernels with different configurations. The fact
that modules need to be recompiled based upon the kernel configuration
is a bug.
Basically, exported kernel interfaces should be independent of the
kernel configuration. The only thing that should affect exported
kernel interfaces is the kernel version and any patches that may have
been applied. Otherwise, a module compiled for version X.Y.Z of the
Linux kernel should work with any configuration of X.Y.Z, provided
that the required interfaces are there (for example, NFS as a module
requires filesystem and networking support to be there).
Modules should only need to determine if a kernel is SMP for locking
(or threading) issues. There shouldn't be any need to recompile a
module for SMP machines, if kernel interfaces are defined properly.
As someone who has to support a binary-only kernel module (AFS), this
requirement really strains my resources. So, not only do I need to
recompile the module for differences in the kernel version, but I also
have to recompile for various configurations as well! Uggh.
-derek