| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Default generic APIC driver. This handles up to 8 CPUs. |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright 2003 Andi Kleen, SuSE Labs. |
|---|
| 5 | | - * Subject to the GNU Public License, v.2 |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Generic x86 APIC driver probe layer. |
|---|
| 8 | 8 | */ |
|---|
| 9 | | -#include <linux/threads.h> |
|---|
| 10 | | -#include <linux/cpumask.h> |
|---|
| 11 | 9 | #include <linux/export.h> |
|---|
| 12 | | -#include <linux/string.h> |
|---|
| 13 | | -#include <linux/kernel.h> |
|---|
| 14 | | -#include <linux/ctype.h> |
|---|
| 15 | | -#include <linux/init.h> |
|---|
| 16 | 10 | #include <linux/errno.h> |
|---|
| 17 | | -#include <asm/fixmap.h> |
|---|
| 18 | | -#include <asm/mpspec.h> |
|---|
| 19 | | -#include <asm/apicdef.h> |
|---|
| 20 | | -#include <asm/apic.h> |
|---|
| 21 | | -#include <asm/setup.h> |
|---|
| 22 | | - |
|---|
| 23 | 11 | #include <linux/smp.h> |
|---|
| 24 | | -#include <asm/ipi.h> |
|---|
| 25 | 12 | |
|---|
| 26 | | -#include <linux/interrupt.h> |
|---|
| 13 | +#include <asm/io_apic.h> |
|---|
| 14 | +#include <asm/apic.h> |
|---|
| 27 | 15 | #include <asm/acpi.h> |
|---|
| 28 | | -#include <asm/e820/api.h> |
|---|
| 29 | 16 | |
|---|
| 30 | | -#ifdef CONFIG_HOTPLUG_CPU |
|---|
| 31 | | -#define DEFAULT_SEND_IPI (1) |
|---|
| 32 | | -#else |
|---|
| 33 | | -#define DEFAULT_SEND_IPI (0) |
|---|
| 34 | | -#endif |
|---|
| 35 | | - |
|---|
| 36 | | -int no_broadcast = DEFAULT_SEND_IPI; |
|---|
| 37 | | - |
|---|
| 38 | | -static __init int no_ipi_broadcast(char *str) |
|---|
| 39 | | -{ |
|---|
| 40 | | - get_option(&str, &no_broadcast); |
|---|
| 41 | | - pr_info("Using %s mode\n", |
|---|
| 42 | | - no_broadcast ? "No IPI Broadcast" : "IPI Broadcast"); |
|---|
| 43 | | - return 1; |
|---|
| 44 | | -} |
|---|
| 45 | | -__setup("no_ipi_broadcast=", no_ipi_broadcast); |
|---|
| 46 | | - |
|---|
| 47 | | -static int __init print_ipi_mode(void) |
|---|
| 48 | | -{ |
|---|
| 49 | | - pr_info("Using IPI %s mode\n", |
|---|
| 50 | | - no_broadcast ? "No-Shortcut" : "Shortcut"); |
|---|
| 51 | | - return 0; |
|---|
| 52 | | -} |
|---|
| 53 | | -late_initcall(print_ipi_mode); |
|---|
| 17 | +#include "local.h" |
|---|
| 54 | 18 | |
|---|
| 55 | 19 | static int default_x86_32_early_logical_apicid(int cpu) |
|---|
| 56 | 20 | { |
|---|
| .. | .. |
|---|
| 184 | 148 | def_to_bigsmp = 0; |
|---|
| 185 | 149 | break; |
|---|
| 186 | 150 | } |
|---|
| 187 | | - /* If P4 and above fall through */ |
|---|
| 151 | + /* P4 and above */ |
|---|
| 152 | + fallthrough; |
|---|
| 153 | + case X86_VENDOR_HYGON: |
|---|
| 188 | 154 | case X86_VENDOR_AMD: |
|---|
| 189 | 155 | def_to_bigsmp = 1; |
|---|
| 190 | 156 | } |
|---|
| .. | .. |
|---|
| 204 | 170 | |
|---|
| 205 | 171 | if (apic->setup_apic_routing) |
|---|
| 206 | 172 | apic->setup_apic_routing(); |
|---|
| 207 | | - |
|---|
| 208 | | - if (x86_platform.apic_post_init) |
|---|
| 209 | | - x86_platform.apic_post_init(); |
|---|
| 210 | 173 | } |
|---|
| 211 | 174 | |
|---|
| 212 | 175 | void __init generic_apic_probe(void) |
|---|