diff options
author | Tejun Heo <tj@kernel.org> | 2016-05-09 19:34:39 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-05-09 19:34:39 +0300 |
commit | 698f6700a6f19ba4550a722eaacf9f9d212b3fd9 (patch) | |
tree | ff63c9a23fe47870df8788ff5e7d9a552f6d4ed1 /arch/x86/xen/apic.c | |
parent | 7780081c1f04a4ea31331b5579ca010cc1f26c74 (diff) | |
parent | 13f307711b127d30fcf333a04365a217baf9ca2b (diff) | |
download | linux-698f6700a6f19ba4550a722eaacf9f9d212b3fd9.tar.xz |
Merge branch '4.7/scsi-queue' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi into for-4.7-zac
Pulling in the dependencies for further ZAC changes.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/xen/apic.c')
-rw-r--r-- | arch/x86/xen/apic.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/x86/xen/apic.c b/arch/x86/xen/apic.c index abf4901c917b..db52a7fafcc2 100644 --- a/arch/x86/xen/apic.c +++ b/arch/x86/xen/apic.c @@ -66,7 +66,7 @@ static u32 xen_apic_read(u32 reg) ret = HYPERVISOR_platform_op(&op); if (ret) - return 0; + op.u.pcpu_info.apic_id = BAD_APICID; return op.u.pcpu_info.apic_id << 24; } @@ -142,6 +142,14 @@ static void xen_silent_inquire(int apicid) { } +static int xen_cpu_present_to_apicid(int cpu) +{ + if (cpu_present(cpu)) + return xen_get_apic_id(xen_apic_read(APIC_ID)); + else + return BAD_APICID; +} + static struct apic xen_pv_apic = { .name = "Xen PV", .probe = xen_apic_probe_pv, @@ -162,7 +170,7 @@ static struct apic xen_pv_apic = { .ioapic_phys_id_map = default_ioapic_phys_id_map, /* Used on 32-bit */ .setup_apic_routing = NULL, - .cpu_present_to_apicid = default_cpu_present_to_apicid, + .cpu_present_to_apicid = xen_cpu_present_to_apicid, .apicid_to_cpu_present = physid_set_mask_of_physid, /* Used on 32-bit */ .check_phys_apicid_present = default_check_phys_apicid_present, /* smp_sanity_check needs it */ .phys_pkg_id = xen_phys_pkg_id, /* detect_ht */ |