x86/mm/pat: Don't report PAT on CPUs that don't support it
[linux/fpc-iii.git] / arch / arm64 / mm / physaddr.c
blob91371daf397c558232b80f2e14afda9827a2d006
1 #include <linux/bug.h>
2 #include <linux/export.h>
3 #include <linux/types.h>
4 #include <linux/mmdebug.h>
5 #include <linux/mm.h>
7 #include <asm/memory.h>
9 phys_addr_t __virt_to_phys(unsigned long x)
11 WARN(!__is_lm_address(x),
12 "virt_to_phys used for non-linear address: %pK (%pS)\n",
13 (void *)x,
14 (void *)x);
16 return __virt_to_phys_nodebug(x);
18 EXPORT_SYMBOL(__virt_to_phys);
20 phys_addr_t __phys_addr_symbol(unsigned long x)
23 * This is bounds checking against the kernel image only.
24 * __pa_symbol should only be used on kernel symbol addresses.
26 VIRTUAL_BUG_ON(x < (unsigned long) KERNEL_START ||
27 x > (unsigned long) KERNEL_END);
28 return __pa_symbol_nodebug(x);
30 EXPORT_SYMBOL(__phys_addr_symbol);