This source file includes following definitions.
- pfn_to_nid
- pfn_valid
1
2
3
4
5
6 #ifndef _ASM_ARC_MMZONE_H
7 #define _ASM_ARC_MMZONE_H
8
9 #ifdef CONFIG_DISCONTIGMEM
10
11 extern struct pglist_data node_data[];
12 #define NODE_DATA(nid) (&node_data[nid])
13
14 static inline int pfn_to_nid(unsigned long pfn)
15 {
16 int is_end_low = 1;
17
18 if (IS_ENABLED(CONFIG_ARC_HAS_PAE40))
19 is_end_low = pfn <= virt_to_pfn(0xFFFFFFFFUL);
20
21
22
23
24
25
26 if (pfn >= ARCH_PFN_OFFSET && is_end_low)
27 return 0;
28
29 return 1;
30 }
31
32 static inline int pfn_valid(unsigned long pfn)
33 {
34 int nid = pfn_to_nid(pfn);
35
36 return (pfn <= node_end_pfn(nid));
37 }
38 #endif
39
40 #endif