This source file includes following definitions.
- __virt_to_phys
- __phys_addr_symbol
1
2 #include <linux/bug.h>
3 #include <linux/export.h>
4 #include <linux/types.h>
5 #include <linux/mmdebug.h>
6 #include <linux/mm.h>
7
8 #include <asm/memory.h>
9
10 phys_addr_t __virt_to_phys(unsigned long x)
11 {
12 WARN(!__is_lm_address(x),
13 "virt_to_phys used for non-linear address: %pK (%pS)\n",
14 (void *)x,
15 (void *)x);
16
17 return __virt_to_phys_nodebug(x);
18 }
19 EXPORT_SYMBOL(__virt_to_phys);
20
21 phys_addr_t __phys_addr_symbol(unsigned long x)
22 {
23
24
25
26
27 VIRTUAL_BUG_ON(x < (unsigned long) KERNEL_START ||
28 x > (unsigned long) KERNEL_END);
29 return __pa_symbol_nodebug(x);
30 }
31 EXPORT_SYMBOL(__phys_addr_symbol);