xref: /linux/arch/x86/mm/physaddr.h (revision b24413180f5600bcb3bb70fbed5cf186b60864bd)
1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
278c86e5eSJeremy Fitzhardinge #include <asm/processor.h>
378c86e5eSJeremy Fitzhardinge 
478c86e5eSJeremy Fitzhardinge static inline int phys_addr_valid(resource_size_t addr)
578c86e5eSJeremy Fitzhardinge {
678c86e5eSJeremy Fitzhardinge #ifdef CONFIG_PHYS_ADDR_T_64BIT
778c86e5eSJeremy Fitzhardinge 	return !(addr >> boot_cpu_data.x86_phys_bits);
878c86e5eSJeremy Fitzhardinge #else
978c86e5eSJeremy Fitzhardinge 	return 1;
1078c86e5eSJeremy Fitzhardinge #endif
1178c86e5eSJeremy Fitzhardinge }
12