On Fri, Feb 9, 2018 at 2:01 PM, Randy Dunlap <rdun...@infradead.org> wrote:
> This is a rather literal interpretation of Linus's suggestion.
I think it can be simplified a bit more.
If you move the definition of RANGE_END_CPUS up to before
RANGE_BEGIN_CPUS, you can then make the RANGE_BEGIN_CPUS just be
default 1 if !SMP
default RANGE_END_CPUS if MAXSMP
which makes a whole lot more sense.
and if you split that RANGE_END_CPUS so that the x86-32 and x86-64
cases are separate, that makes *those* more understandable. It also
makes sense to separate since X86_BIGSMP is 32-bit only.
But yes, this looks like it's in the right direction, where we can
make each step be fairly obvious, instead of the current NR_CPUS mess
that is entirely impossible to parse for mere humans.