1 /* 2 * Common functions shared between the various APIC flavours 3 * 4 * SPDX-License-Identifier: GPL-2.0 5 */ 6 #include <linux/irq.h> 7 #include <asm/apic.h> 8 9 int default_cpu_present_to_apicid(int mps_cpu) 10 { 11 if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu)) 12 return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu); 13 else 14 return BAD_APICID; 15 } 16 17 int default_check_phys_apicid_present(int phys_apicid) 18 { 19 return physid_isset(phys_apicid, phys_cpu_present_map); 20 } 21