1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 278c86e5eSJeremy Fitzhardinge #include <asm/processor.h> 378c86e5eSJeremy Fitzhardinge phys_addr_valid(resource_size_t addr)478c86e5eSJeremy Fitzhardingestatic 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