LU-9859 libcfs: remove conditional compilation from libcfs_cpu.c
libcfs_cpu.c manages CPU partitions. In the !CONFIG_SMP case, most
of this disappears and 'static inline's from libcfs_cpu.h are used.
However we still allocate a 'struct cfs_cpt_table' which is used
to keep the NUMA node mask. Event with SMP disabled Lustre wants
to handle any NUMA nodes available.
This patch removes all the !CONFIG_SMP code from libcfs_cpu.c and
conditionally compiles the whole file only when CONFIG_SMP.
We no longer allocate a 'struct cfs_cpt_table' on !CONFIG_SMP,
and don't even declare a structure. The name "cfs_cpt_tab"
becomes always "NULL", which allows some code to be optimized away.
This means that cfs_cpt_tab can sometimes be NULL, so we need to
discard the assertion that it isn't.
Linux-commit:
7b8e2026fb185e5178f9137c463ff07fc895be5d
Test-Parameters: trivial
Change-Id: Icb84f23249d086c662de76df6ce9686de0b692aa
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/37881
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>