mm/lib: change count_numa() behavior

this patch fixes two problems.

1) avoid using functions from numactl package, so compilation would pass
w/ and w/o numactl development package installed.

2) count_numa() functions now has a parameter, which stores the array of
each nodes on the system. This is because some systems doesn't have
continuous nodes or the node sequence does not start from zero, when we
want to test specific node, we should make sure the node does exist.
Thus, an array for node numbers is necessary. Follow-up patches will
update count_numa() with new parameters accordingly.

Tested-by: Caspar Zhang <caspar@casparzhang.com>
Signed-off-by: Caspar Zhang <caspar@casparzhang.com>
Tested-by: Markos Chandras <markos.chandras@imgtec.com>
Acked-by: Zhouping Liu <zliu@redhat.com>
2 files changed