Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/init: Remove unused init ops

Some past platform removal forgot to get rid of this unused ballast.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20200826112330.806095671@linutronix.de

+4 -46
-10
arch/x86/include/asm/mpspec.h
··· 67 67 #ifdef CONFIG_X86_MPPARSE 68 68 extern void e820__memblock_alloc_reserved_mpc_new(void); 69 69 extern int enable_update_mptable; 70 - extern int default_mpc_apic_id(struct mpc_cpu *m); 71 - extern void default_smp_read_mpc_oem(struct mpc_table *mpc); 72 - # ifdef CONFIG_X86_IO_APIC 73 - extern void default_mpc_oem_bus_info(struct mpc_bus *m, char *str); 74 - # else 75 - # define default_mpc_oem_bus_info NULL 76 - # endif 77 70 extern void default_find_smp_config(void); 78 71 extern void default_get_smp_config(unsigned int early); 79 72 #else 80 73 static inline void e820__memblock_alloc_reserved_mpc_new(void) { } 81 74 #define enable_update_mptable 0 82 - #define default_mpc_apic_id NULL 83 - #define default_smp_read_mpc_oem NULL 84 - #define default_mpc_oem_bus_info NULL 85 75 #define default_find_smp_config x86_init_noop 86 76 #define default_get_smp_config x86_init_uint_noop 87 77 #endif
-10
arch/x86/include/asm/x86_init.h
··· 11 11 12 12 /** 13 13 * struct x86_init_mpparse - platform specific mpparse ops 14 - * @mpc_record: platform specific mpc record accounting 15 14 * @setup_ioapic_ids: platform specific ioapic id override 16 - * @mpc_apic_id: platform specific mpc apic id assignment 17 - * @smp_read_mpc_oem: platform specific oem mpc table setup 18 - * @mpc_oem_pci_bus: platform specific pci bus setup (default NULL) 19 - * @mpc_oem_bus_info: platform specific mpc bus info 20 15 * @find_smp_config: find the smp configuration 21 16 * @get_smp_config: get the smp configuration 22 17 */ 23 18 struct x86_init_mpparse { 24 - void (*mpc_record)(unsigned int mode); 25 19 void (*setup_ioapic_ids)(void); 26 - int (*mpc_apic_id)(struct mpc_cpu *m); 27 - void (*smp_read_mpc_oem)(struct mpc_table *mpc); 28 - void (*mpc_oem_pci_bus)(struct mpc_bus *m); 29 - void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name); 30 20 void (*find_smp_config)(void); 31 21 void (*get_smp_config)(unsigned int early); 32 22 };
+4 -22
arch/x86/kernel/mpparse.c
··· 46 46 return sum & 0xFF; 47 47 } 48 48 49 - int __init default_mpc_apic_id(struct mpc_cpu *m) 50 - { 51 - return m->apicid; 52 - } 53 - 54 49 static void __init MP_processor_info(struct mpc_cpu *m) 55 50 { 56 51 int apicid; ··· 56 61 return; 57 62 } 58 63 59 - apicid = x86_init.mpparse.mpc_apic_id(m); 64 + apicid = m->apicid; 60 65 61 66 if (m->cpuflag & CPU_BOOTPROCESSOR) { 62 67 bootup_cpu = " (Bootup-CPU)"; ··· 68 73 } 69 74 70 75 #ifdef CONFIG_X86_IO_APIC 71 - void __init default_mpc_oem_bus_info(struct mpc_bus *m, char *str) 76 + static void __init mpc_oem_bus_info(struct mpc_bus *m, char *str) 72 77 { 73 78 memcpy(str, m->bustype, 6); 74 79 str[6] = 0; ··· 79 84 { 80 85 char str[7]; 81 86 82 - x86_init.mpparse.mpc_oem_bus_info(m, str); 87 + mpc_oem_bus_info(m, str); 83 88 84 89 #if MAX_MP_BUSSES < 256 85 90 if (m->busid >= MAX_MP_BUSSES) { ··· 95 100 mp_bus_id_to_type[m->busid] = MP_BUS_ISA; 96 101 #endif 97 102 } else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) { 98 - if (x86_init.mpparse.mpc_oem_pci_bus) 99 - x86_init.mpparse.mpc_oem_pci_bus(m); 100 - 101 103 clear_bit(m->busid, mp_bus_not_pci); 102 104 #ifdef CONFIG_EISA 103 105 mp_bus_id_to_type[m->busid] = MP_BUS_PCI; ··· 190 198 1, mpc, mpc->length, 1); 191 199 } 192 200 193 - void __init default_smp_read_mpc_oem(struct mpc_table *mpc) { } 194 - 195 201 static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early) 196 202 { 197 203 char str[16]; ··· 208 218 if (early) 209 219 return 1; 210 220 211 - if (mpc->oemptr) 212 - x86_init.mpparse.smp_read_mpc_oem(mpc); 213 - 214 - /* 215 - * Now process the configuration blocks. 216 - */ 217 - x86_init.mpparse.mpc_record(0); 218 - 221 + /* Now process the configuration blocks. */ 219 222 while (count < mpc->length) { 220 223 switch (*mpt) { 221 224 case MP_PROCESSOR: ··· 239 256 count = mpc->length; 240 257 break; 241 258 } 242 - x86_init.mpparse.mpc_record(1); 243 259 } 244 260 245 261 if (!num_processors)
-4
arch/x86/kernel/x86_init.c
··· 67 67 }, 68 68 69 69 .mpparse = { 70 - .mpc_record = x86_init_uint_noop, 71 70 .setup_ioapic_ids = x86_init_noop, 72 - .mpc_apic_id = default_mpc_apic_id, 73 - .smp_read_mpc_oem = default_smp_read_mpc_oem, 74 - .mpc_oem_bus_info = default_mpc_oem_bus_info, 75 71 .find_smp_config = default_find_smp_config, 76 72 .get_smp_config = default_get_smp_config, 77 73 },