hc
2024-05-10 ee930fffee469d076998274a2ca55e13dc1efb67
kernel/arch/x86/kernel/apic/probe_32.c
....@@ -1,56 +1,20 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Default generic APIC driver. This handles up to 8 CPUs.
34 *
45 * Copyright 2003 Andi Kleen, SuSE Labs.
5
- * Subject to the GNU Public License, v.2
66 *
77 * Generic x86 APIC driver probe layer.
88 */
9
-#include <linux/threads.h>
10
-#include <linux/cpumask.h>
119 #include <linux/export.h>
12
-#include <linux/string.h>
13
-#include <linux/kernel.h>
14
-#include <linux/ctype.h>
15
-#include <linux/init.h>
1610 #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
-
2311 #include <linux/smp.h>
24
-#include <asm/ipi.h>
2512
26
-#include <linux/interrupt.h>
13
+#include <asm/io_apic.h>
14
+#include <asm/apic.h>
2715 #include <asm/acpi.h>
28
-#include <asm/e820/api.h>
2916
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"
5418
5519 static int default_x86_32_early_logical_apicid(int cpu)
5620 {
....@@ -184,7 +148,9 @@
184148 def_to_bigsmp = 0;
185149 break;
186150 }
187
- /* If P4 and above fall through */
151
+ /* P4 and above */
152
+ fallthrough;
153
+ case X86_VENDOR_HYGON:
188154 case X86_VENDOR_AMD:
189155 def_to_bigsmp = 1;
190156 }
....@@ -204,9 +170,6 @@
204170
205171 if (apic->setup_apic_routing)
206172 apic->setup_apic_routing();
207
-
208
- if (x86_platform.apic_post_init)
209
- x86_platform.apic_post_init();
210173 }
211174
212175 void __init generic_apic_probe(void)