hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/x86/kernel/mpparse.c
....@@ -11,7 +11,6 @@
1111 #include <linux/mm.h>
1212 #include <linux/init.h>
1313 #include <linux/delay.h>
14
-#include <linux/bootmem.h>
1514 #include <linux/memblock.h>
1615 #include <linux/kernel_stat.h>
1716 #include <linux/mc146818rtc.h>
....@@ -20,11 +19,11 @@
2019 #include <linux/smp.h>
2120 #include <linux/pci.h>
2221
22
+#include <asm/io_apic.h>
23
+#include <asm/acpi.h>
2324 #include <asm/irqdomain.h>
2425 #include <asm/mtrr.h>
2526 #include <asm/mpspec.h>
26
-#include <asm/pgalloc.h>
27
-#include <asm/io_apic.h>
2827 #include <asm/proto.h>
2928 #include <asm/bios_ebda.h>
3029 #include <asm/e820/api.h>
....@@ -46,11 +45,6 @@
4645 return sum & 0xFF;
4746 }
4847
49
-int __init default_mpc_apic_id(struct mpc_cpu *m)
50
-{
51
- return m->apicid;
52
-}
53
-
5448 static void __init MP_processor_info(struct mpc_cpu *m)
5549 {
5650 int apicid;
....@@ -61,7 +55,7 @@
6155 return;
6256 }
6357
64
- apicid = x86_init.mpparse.mpc_apic_id(m);
58
+ apicid = m->apicid;
6559
6660 if (m->cpuflag & CPU_BOOTPROCESSOR) {
6761 bootup_cpu = " (Bootup-CPU)";
....@@ -73,7 +67,7 @@
7367 }
7468
7569 #ifdef CONFIG_X86_IO_APIC
76
-void __init default_mpc_oem_bus_info(struct mpc_bus *m, char *str)
70
+static void __init mpc_oem_bus_info(struct mpc_bus *m, char *str)
7771 {
7872 memcpy(str, m->bustype, 6);
7973 str[6] = 0;
....@@ -84,7 +78,7 @@
8478 {
8579 char str[7];
8680
87
- x86_init.mpparse.mpc_oem_bus_info(m, str);
81
+ mpc_oem_bus_info(m, str);
8882
8983 #if MAX_MP_BUSSES < 256
9084 if (m->busid >= MAX_MP_BUSSES) {
....@@ -100,9 +94,6 @@
10094 mp_bus_id_to_type[m->busid] = MP_BUS_ISA;
10195 #endif
10296 } else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) {
103
- if (x86_init.mpparse.mpc_oem_pci_bus)
104
- x86_init.mpparse.mpc_oem_pci_bus(m);
105
-
10697 clear_bit(m->busid, mp_bus_not_pci);
10798 #ifdef CONFIG_EISA
10899 mp_bus_id_to_type[m->busid] = MP_BUS_PCI;
....@@ -198,8 +189,6 @@
198189 1, mpc, mpc->length, 1);
199190 }
200191
201
-void __init default_smp_read_mpc_oem(struct mpc_table *mpc) { }
202
-
203192 static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
204193 {
205194 char str[16];
....@@ -218,14 +207,7 @@
218207 if (early)
219208 return 1;
220209
221
- if (mpc->oemptr)
222
- x86_init.mpparse.smp_read_mpc_oem(mpc);
223
-
224
- /*
225
- * Now process the configuration blocks.
226
- */
227
- x86_init.mpparse.mpc_record(0);
228
-
210
+ /* Now process the configuration blocks. */
229211 while (count < mpc->length) {
230212 switch (*mpt) {
231213 case MP_PROCESSOR:
....@@ -256,7 +238,6 @@
256238 count = mpc->length;
257239 break;
258240 }
259
- x86_init.mpparse.mpc_record(1);
260241 }
261242
262243 if (!num_processors)
....@@ -312,7 +293,7 @@
312293 case 2:
313294 if (i == 0 || i == 13)
314295 continue; /* IRQ0 & IRQ13 not connected */
315
- /* fall through */
296
+ fallthrough;
316297 default:
317298 if (i == 2)
318299 continue; /* IRQ2 is never connected */
....@@ -356,7 +337,7 @@
356337 default:
357338 pr_err("???\nUnknown standard configuration %d\n",
358339 mpc_default_type);
359
- /* fall through */
340
+ fallthrough;
360341 case 1:
361342 case 5:
362343 memcpy(bus.bustype, "ISA ", 6);