| .. | .. |
|---|
| 1 | 1 | // SPDX-License-Identifier: GPL-2.0 |
|---|
| 2 | | -#include <linux/threads.h> |
|---|
| 3 | | -#include <linux/cpumask.h> |
|---|
| 4 | | -#include <linux/string.h> |
|---|
| 5 | | -#include <linux/kernel.h> |
|---|
| 6 | | -#include <linux/ctype.h> |
|---|
| 7 | | -#include <linux/dmar.h> |
|---|
| 8 | 2 | |
|---|
| 9 | | -#include <asm/smp.h> |
|---|
| 10 | | -#include <asm/ipi.h> |
|---|
| 11 | | -#include "x2apic.h" |
|---|
| 3 | +#include <linux/cpumask.h> |
|---|
| 4 | +#include <linux/acpi.h> |
|---|
| 5 | + |
|---|
| 6 | +#include "local.h" |
|---|
| 12 | 7 | |
|---|
| 13 | 8 | int x2apic_phys; |
|---|
| 14 | 9 | |
|---|
| .. | .. |
|---|
| 88 | 83 | |
|---|
| 89 | 84 | static void x2apic_send_IPI_allbutself(int vector) |
|---|
| 90 | 85 | { |
|---|
| 91 | | - __x2apic_send_IPI_mask(cpu_online_mask, vector, APIC_DEST_ALLBUT); |
|---|
| 86 | + __x2apic_send_IPI_shorthand(vector, APIC_DEST_ALLBUT); |
|---|
| 92 | 87 | } |
|---|
| 93 | 88 | |
|---|
| 94 | 89 | static void x2apic_send_IPI_all(int vector) |
|---|
| 95 | 90 | { |
|---|
| 96 | | - __x2apic_send_IPI_mask(cpu_online_mask, vector, APIC_DEST_ALLINC); |
|---|
| 91 | + __x2apic_send_IPI_shorthand(vector, APIC_DEST_ALLINC); |
|---|
| 97 | 92 | } |
|---|
| 98 | 93 | |
|---|
| 99 | 94 | static void init_x2apic_ldr(void) |
|---|
| .. | .. |
|---|
| 128 | 123 | native_x2apic_icr_write(cfg, apicid); |
|---|
| 129 | 124 | } |
|---|
| 130 | 125 | |
|---|
| 126 | +void __x2apic_send_IPI_shorthand(int vector, u32 which) |
|---|
| 127 | +{ |
|---|
| 128 | + unsigned long cfg = __prepare_ICR(which, vector, 0); |
|---|
| 129 | + |
|---|
| 130 | + /* x2apic MSRs are special and need a special fence: */ |
|---|
| 131 | + weak_wrmsr_fence(); |
|---|
| 132 | + native_x2apic_icr_write(cfg, 0); |
|---|
| 133 | +} |
|---|
| 134 | + |
|---|
| 131 | 135 | unsigned int x2apic_get_apic_id(unsigned long id) |
|---|
| 132 | 136 | { |
|---|
| 133 | 137 | return id; |
|---|