x86/init: Remove unused init ops
authorThomas Gleixner <tglx@linutronix.de>
Wed, 26 Aug 2020 11:16:30 +0000 (13:16 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 16 Sep 2020 14:52:28 +0000 (16:52 +0200)
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
arch/x86/include/asm/mpspec.h
arch/x86/include/asm/x86_init.h
arch/x86/kernel/mpparse.c
arch/x86/kernel/x86_init.c

index 606cbae..e90ac7e 100644 (file)
@@ -67,21 +67,11 @@ static inline void find_smp_config(void)
 #ifdef CONFIG_X86_MPPARSE
 extern void e820__memblock_alloc_reserved_mpc_new(void);
 extern int enable_update_mptable;
-extern int default_mpc_apic_id(struct mpc_cpu *m);
-extern void default_smp_read_mpc_oem(struct mpc_table *mpc);
-# ifdef CONFIG_X86_IO_APIC
-extern void default_mpc_oem_bus_info(struct mpc_bus *m, char *str);
-# else
-#  define default_mpc_oem_bus_info NULL
-# endif
 extern void default_find_smp_config(void);
 extern void default_get_smp_config(unsigned int early);
 #else
 static inline void e820__memblock_alloc_reserved_mpc_new(void) { }
 #define enable_update_mptable 0
-#define default_mpc_apic_id NULL
-#define default_smp_read_mpc_oem NULL
-#define default_mpc_oem_bus_info NULL
 #define default_find_smp_config x86_init_noop
 #define default_get_smp_config x86_init_uint_noop
 #endif
index 6807153..7cc32e7 100644 (file)
@@ -11,22 +11,12 @@ struct cpuinfo_x86;
 
 /**
  * struct x86_init_mpparse - platform specific mpparse ops
- * @mpc_record:                        platform specific mpc record accounting
  * @setup_ioapic_ids:          platform specific ioapic id override
- * @mpc_apic_id:               platform specific mpc apic id assignment
- * @smp_read_mpc_oem:          platform specific oem mpc table setup
- * @mpc_oem_pci_bus:           platform specific pci bus setup (default NULL)
- * @mpc_oem_bus_info:          platform specific mpc bus info
  * @find_smp_config:           find the smp configuration
  * @get_smp_config:            get the smp configuration
  */
 struct x86_init_mpparse {
-       void (*mpc_record)(unsigned int mode);
        void (*setup_ioapic_ids)(void);
-       int (*mpc_apic_id)(struct mpc_cpu *m);
-       void (*smp_read_mpc_oem)(struct mpc_table *mpc);
-       void (*mpc_oem_pci_bus)(struct mpc_bus *m);
-       void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name);
        void (*find_smp_config)(void);
        void (*get_smp_config)(unsigned int early);
 };
index baa2109..61d09bd 100644 (file)
@@ -46,11 +46,6 @@ static int __init mpf_checksum(unsigned char *mp, int len)
        return sum & 0xFF;
 }
 
-int __init default_mpc_apic_id(struct mpc_cpu *m)
-{
-       return m->apicid;
-}
-
 static void __init MP_processor_info(struct mpc_cpu *m)
 {
        int apicid;
@@ -61,7 +56,7 @@ static void __init MP_processor_info(struct mpc_cpu *m)
                return;
        }
 
-       apicid = x86_init.mpparse.mpc_apic_id(m);
+       apicid = m->apicid;
 
        if (m->cpuflag & CPU_BOOTPROCESSOR) {
                bootup_cpu = " (Bootup-CPU)";
@@ -73,7 +68,7 @@ static void __init MP_processor_info(struct mpc_cpu *m)
 }
 
 #ifdef CONFIG_X86_IO_APIC
-void __init default_mpc_oem_bus_info(struct mpc_bus *m, char *str)
+static void __init mpc_oem_bus_info(struct mpc_bus *m, char *str)
 {
        memcpy(str, m->bustype, 6);
        str[6] = 0;
@@ -84,7 +79,7 @@ static void __init MP_bus_info(struct mpc_bus *m)
 {
        char str[7];
 
-       x86_init.mpparse.mpc_oem_bus_info(m, str);
+       mpc_oem_bus_info(m, str);
 
 #if MAX_MP_BUSSES < 256
        if (m->busid >= MAX_MP_BUSSES) {
@@ -100,9 +95,6 @@ static void __init MP_bus_info(struct mpc_bus *m)
                mp_bus_id_to_type[m->busid] = MP_BUS_ISA;
 #endif
        } else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) {
-               if (x86_init.mpparse.mpc_oem_pci_bus)
-                       x86_init.mpparse.mpc_oem_pci_bus(m);
-
                clear_bit(m->busid, mp_bus_not_pci);
 #ifdef CONFIG_EISA
                mp_bus_id_to_type[m->busid] = MP_BUS_PCI;
@@ -198,8 +190,6 @@ static void __init smp_dump_mptable(struct mpc_table *mpc, unsigned char *mpt)
                        1, mpc, mpc->length, 1);
 }
 
-void __init default_smp_read_mpc_oem(struct mpc_table *mpc) { }
-
 static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
 {
        char str[16];
@@ -218,14 +208,7 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
        if (early)
                return 1;
 
-       if (mpc->oemptr)
-               x86_init.mpparse.smp_read_mpc_oem(mpc);
-
-       /*
-        *      Now process the configuration blocks.
-        */
-       x86_init.mpparse.mpc_record(0);
-
+       /* Now process the configuration blocks. */
        while (count < mpc->length) {
                switch (*mpt) {
                case MP_PROCESSOR:
@@ -256,7 +239,6 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
                        count = mpc->length;
                        break;
                }
-               x86_init.mpparse.mpc_record(1);
        }
 
        if (!num_processors)
index 123f1c1..cec6f6a 100644 (file)
@@ -67,11 +67,7 @@ struct x86_init_ops x86_init __initdata = {
        },
 
        .mpparse = {
-               .mpc_record             = x86_init_uint_noop,
                .setup_ioapic_ids       = x86_init_noop,
-               .mpc_apic_id            = default_mpc_apic_id,
-               .smp_read_mpc_oem       = default_smp_read_mpc_oem,
-               .mpc_oem_bus_info       = default_mpc_oem_bus_info,
                .find_smp_config        = default_find_smp_config,
                .get_smp_config         = default_get_smp_config,
        },