diff options
Diffstat (limited to 'include/linux/numa.h')
| -rw-r--r-- | include/linux/numa.h | 30 | 
1 files changed, 29 insertions, 1 deletions
diff --git a/include/linux/numa.h b/include/linux/numa.h index 8cb33ccfb671..cb44cfe2b725 100644 --- a/include/linux/numa.h +++ b/include/linux/numa.h @@ -21,13 +21,41 @@  #endif  #ifdef CONFIG_NUMA +#include <linux/printk.h> +#include <asm/sparsemem.h> +  /* Generic implementation available */  int numa_map_to_online_node(int node); -#else + +#ifndef memory_add_physaddr_to_nid +static inline int memory_add_physaddr_to_nid(u64 start) +{ +	pr_info_once("Unknown online node for memory at 0x%llx, assuming node 0\n", +			start); +	return 0; +} +#endif +#ifndef phys_to_target_node +static inline int phys_to_target_node(u64 start) +{ +	pr_info_once("Unknown target node for memory at 0x%llx, assuming node 0\n", +			start); +	return 0; +} +#endif +#else /* !CONFIG_NUMA */  static inline int numa_map_to_online_node(int node)  {  	return NUMA_NO_NODE;  } +static inline int memory_add_physaddr_to_nid(u64 start) +{ +	return 0; +} +static inline int phys_to_target_node(u64 start) +{ +	return 0; +}  #endif  #endif /* _LINUX_NUMA_H */  |