Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/sparsemem: Provide phys_to_target_node() with CONFIG_NUMA

Add a trival phys_to_target_node() implementation which always returns 0 if
CONFIG_NUMA is enabled, since the s390 NUMA implementation only supports
node 0.
This is similar to memory_add_physaddr_to_nid() in order to avoid runtime
warnings.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

+8
+8
arch/s390/include/asm/sparsemem.h
··· 6 6 #define MAX_PHYSMEM_BITS CONFIG_MAX_PHYSMEM_BITS 7 7 8 8 #ifdef CONFIG_NUMA 9 + 9 10 static inline int memory_add_physaddr_to_nid(u64 addr) 10 11 { 11 12 return 0; 12 13 } 13 14 #define memory_add_physaddr_to_nid memory_add_physaddr_to_nid 15 + 16 + static inline int phys_to_target_node(u64 start) 17 + { 18 + return 0; 19 + } 20 + #define phys_to_target_node phys_to_target_node 21 + 14 22 #endif /* CONFIG_NUMA */ 15 23 16 24 #endif /* _ASM_S390_SPARSEMEM_H */