linux/kernel/numa.c
Kent Overstreet e39d630be9 kernel/numa.c: Move logging out of numa.h
[ Upstream commit d7a73e3f08 ]

Moving these stub functions to a .c file means we can kill a sched.h
dependency on printk.h.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Stable-dep-of: f9f67e5adc ("x86/numa: Fix SRAT lookup of CFMWS ranges with numa_fill_memblks()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-12 11:03:16 +02:00

27 lines
568 B
C

// SPDX-License-Identifier: GPL-2.0-or-later
#include <linux/printk.h>
#include <linux/numa.h>
/* Stub functions: */
#ifndef memory_add_physaddr_to_nid
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;
}
EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
#endif
#ifndef phys_to_target_node
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;
}
EXPORT_SYMBOL_GPL(phys_to_target_node);
#endif