File tree Expand file tree Collapse file tree 3 files changed +33
-13
lines changed Expand file tree Collapse file tree 3 files changed +33
-13
lines changed Original file line number Diff line number Diff line change 1
1
/* SPDX-License-Identifier: GPL-2.0 */
2
2
#ifndef _LINUX_NUMA_H
3
3
#define _LINUX_NUMA_H
4
+ #include <linux/init.h>
4
5
#include <linux/types.h>
5
6
6
7
#ifdef CONFIG_NODES_SHIFT
22
23
#endif
23
24
24
25
#ifdef CONFIG_NUMA
25
- #include <linux/printk.h>
26
26
#include <asm/sparsemem.h>
27
27
28
28
/* Generic implementation available */
29
29
int numa_nearest_node (int node , unsigned int state );
30
30
31
31
#ifndef memory_add_physaddr_to_nid
32
- static inline int memory_add_physaddr_to_nid (u64 start )
33
- {
34
- pr_info_once ("Unknown online node for memory at 0x%llx, assuming node 0\n" ,
35
- start );
36
- return 0 ;
37
- }
32
+ int memory_add_physaddr_to_nid (u64 start );
38
33
#endif
34
+
39
35
#ifndef phys_to_target_node
40
- static inline int phys_to_target_node (u64 start )
41
- {
42
- pr_info_once ("Unknown target node for memory at 0x%llx, assuming node 0\n" ,
43
- start );
44
- return 0 ;
45
- }
36
+ int phys_to_target_node (u64 start );
46
37
#endif
38
+
47
39
#ifndef numa_fill_memblks
48
40
static inline int __init numa_fill_memblks (u64 start , u64 end )
49
41
{
50
42
return NUMA_NO_MEMBLK ;
51
43
}
52
44
#endif
45
+
53
46
#else /* !CONFIG_NUMA */
54
47
static inline int numa_nearest_node (int node , unsigned int state )
55
48
{
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ obj-$(CONFIG_SHADOW_CALL_STACK) += scs.o
114
114
obj-$(CONFIG_HAVE_STATIC_CALL) += static_call.o
115
115
obj-$(CONFIG_HAVE_STATIC_CALL_INLINE) += static_call_inline.o
116
116
obj-$(CONFIG_CFI_CLANG) += cfi.o
117
+ obj-$(CONFIG_NUMA) += numa.o
117
118
118
119
obj-$(CONFIG_PERF_EVENTS) += events/
119
120
Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: GPL-2.0-or-later
2
+
3
+ #include <linux/printk.h>
4
+ #include <linux/numa.h>
5
+
6
+ /* Stub functions: */
7
+
8
+ #ifndef memory_add_physaddr_to_nid
9
+ int memory_add_physaddr_to_nid (u64 start )
10
+ {
11
+ pr_info_once ("Unknown online node for memory at 0x%llx, assuming node 0\n" ,
12
+ start );
13
+ return 0 ;
14
+ }
15
+ EXPORT_SYMBOL_GPL (memory_add_physaddr_to_nid );
16
+ #endif
17
+
18
+ #ifndef phys_to_target_node
19
+ int phys_to_target_node (u64 start )
20
+ {
21
+ pr_info_once ("Unknown target node for memory at 0x%llx, assuming node 0\n" ,
22
+ start );
23
+ return 0 ;
24
+ }
25
+ EXPORT_SYMBOL_GPL (phys_to_target_node );
26
+ #endif
You can’t perform that action at this time.
0 commit comments