]> xenbits.xensource.com Git - xen.git/commit
NUMA: replace phys_to_nid()
authorJan Beulich <jbeulich@suse.com>
Mon, 19 Dec 2022 10:35:25 +0000 (11:35 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 19 Dec 2022 10:35:25 +0000 (11:35 +0100)
commitda5092e7d6ed4714b5dc63ed2cd7f6c93dd6efd4
tree79f539dad38250935f6d405a4c9f87ece33b7ca6
parentad15a0a8ca2515d8ac58edfc0bc1d3719219cb77
NUMA: replace phys_to_nid()

All callers convert frame numbers (perhaps in turn derived from struct
page_info pointers) to an address, just for the function to convert it
back to a frame number (as the first step of paddr_to_pdx()). Replace
the function by mfn_to_nid() plus a page_to_nid() wrapper macro. Replace
call sites by the respectively most suitable one.

While there also
- introduce a !NUMA stub, eliminating the need for Arm (and potentially
  other ports) to carry one individually,
- drop the (strictly speaking wrong) "pure" attribute from the function,
- extend a condition in dump_numa() to make sure that none of the
  assertions would trigger for empty or (unlikely) single-page nodes (at
  the same time this also prevents the warning printk() to be issued for
  every empty [e.g. CPU-only] node).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/include/asm/numa.h
xen/arch/x86/mm/p2m-pod.c
xen/arch/x86/x86_64/mm.c
xen/common/numa.c
xen/common/page_alloc.c
xen/include/xen/numa.h