i386: es7000 build breakage fix
[firefly-linux-kernel-4.4.55.git] / include / asm-i386 / mach-es7000 / mach_apic.h
index b5f3f0d0b2bcc1f4573e5652837ff2b7009f9040..caec64be516d4c47f713b3f5d086d1ad7cf9e88a 100644 (file)
@@ -73,15 +73,12 @@ static inline void init_apic_ldr(void)
        apic_write_around(APIC_LDR, val);
 }
 
-extern void es7000_sw_apic(void);
-static inline void enable_apic_mode(void)
-{
-       es7000_sw_apic();
-       return;
-}
+#ifndef CONFIG_X86_GENERICARCH
+extern void enable_apic_mode(void);
+#endif
 
 extern int apic_version [MAX_APICS];
-static inline void clustered_apic_check(void)
+static inline void setup_apic_routing(void)
 {
        int apic = bios_cpu_apicid[smp_processor_id()];
        printk("Enabling APIC mode:  %s.  Using %d I/O APICs, target cpus %lx\n",
@@ -123,9 +120,13 @@ extern u8 cpu_2_logical_apicid[];
 /* Mapping from cpu number to logical apicid */
 static inline int cpu_to_logical_apicid(int cpu)
 {
+#ifdef CONFIG_SMP
        if (cpu >= NR_CPUS)
               return BAD_APICID;
        return (int)cpu_2_logical_apicid[cpu];
+#else
+       return logical_smp_processor_id();
+#endif
 }
 
 static inline int mpc_apic_id(struct mpc_config_processor *m, struct mpc_config_translation *unused)