| .. | .. |
|---|
| 1 | 1 | // SPDX-License-Identifier: GPL-2.0 |
|---|
| 2 | 2 | #include <linux/init.h> |
|---|
| 3 | +#include <linux/thread_info.h> |
|---|
| 3 | 4 | |
|---|
| 4 | 5 | #include <asm/x86_init.h> |
|---|
| 5 | 6 | #include <asm/apic.h> |
|---|
| 7 | +#include <asm/io_apic.h> |
|---|
| 6 | 8 | #include <asm/xen/hypercall.h> |
|---|
| 7 | 9 | |
|---|
| 8 | 10 | #include <xen/xen.h> |
|---|
| .. | .. |
|---|
| 58 | 60 | |
|---|
| 59 | 61 | if (reg == APIC_LVR) |
|---|
| 60 | 62 | return 0x14; |
|---|
| 61 | | -#ifdef CONFIG_X86_32 |
|---|
| 62 | | - if (reg == APIC_LDR) |
|---|
| 63 | | - return SET_APIC_LOGICAL_ID(1UL << smp_processor_id()); |
|---|
| 64 | | -#endif |
|---|
| 65 | 63 | if (reg != APIC_ID) |
|---|
| 66 | 64 | return 0; |
|---|
| 67 | 65 | |
|---|
| .. | .. |
|---|
| 127 | 125 | return initial_apic_id >> index_msb; |
|---|
| 128 | 126 | } |
|---|
| 129 | 127 | |
|---|
| 130 | | -#ifdef CONFIG_X86_32 |
|---|
| 131 | | -static int xen_x86_32_early_logical_apicid(int cpu) |
|---|
| 132 | | -{ |
|---|
| 133 | | - /* Match with APIC_LDR read. Otherwise setup_local_APIC complains. */ |
|---|
| 134 | | - return 1 << cpu; |
|---|
| 135 | | -} |
|---|
| 136 | | -#endif |
|---|
| 137 | | - |
|---|
| 138 | 128 | static void xen_noop(void) |
|---|
| 139 | 129 | { |
|---|
| 140 | 130 | } |
|---|
| .. | .. |
|---|
| 197 | 187 | .icr_write = xen_apic_icr_write, |
|---|
| 198 | 188 | .wait_icr_idle = xen_noop, |
|---|
| 199 | 189 | .safe_wait_icr_idle = xen_safe_apic_wait_icr_idle, |
|---|
| 200 | | - |
|---|
| 201 | | -#ifdef CONFIG_X86_32 |
|---|
| 202 | | - /* generic_processor_info and setup_local_APIC. */ |
|---|
| 203 | | - .x86_32_early_logical_apicid = xen_x86_32_early_logical_apicid, |
|---|
| 204 | | -#endif |
|---|
| 205 | 190 | }; |
|---|
| 206 | 191 | |
|---|
| 207 | 192 | static void __init xen_apic_check(void) |
|---|