xref: /linux/arch/x86/mm/physaddr.h (revision 78c86e5e5691fc84d5fbea0cd4ac7147e87b7490)
1*78c86e5eSJeremy Fitzhardinge #include <asm/processor.h>
2*78c86e5eSJeremy Fitzhardinge 
3*78c86e5eSJeremy Fitzhardinge static inline int phys_addr_valid(resource_size_t addr)
4*78c86e5eSJeremy Fitzhardinge {
5*78c86e5eSJeremy Fitzhardinge #ifdef CONFIG_PHYS_ADDR_T_64BIT
6*78c86e5eSJeremy Fitzhardinge 	return !(addr >> boot_cpu_data.x86_phys_bits);
7*78c86e5eSJeremy Fitzhardinge #else
8*78c86e5eSJeremy Fitzhardinge 	return 1;
9*78c86e5eSJeremy Fitzhardinge #endif
10*78c86e5eSJeremy Fitzhardinge }
11