First of all we need to deal with fallout from converting the function's previously dead checks to ASSERT(). An approach with a weakness is proposed on patch 1; see the RFC remark there. Plus phys_to_nid() has been somewhat inefficient with respect to all of its present callers.
1: x86/mm: avoid phys_to_nid() calls for invalid addresses 2: NUMA: replace phys_to_nid() Jan
