goto out2;
 
        memset(&m, 0, sizeof(struct mce));
-       m.cpu = safe_smp_processor_id();
+       m.cpu = smp_processor_id();
        rdmsrl(MSR_IA32_MCG_STATUS, m.mcgstatus);
        if (!(m.mcgstatus & MCG_STATUS_RIPV))
                kill_it = 1;
 
        }
 }
 
-int safe_smp_processor_id(void)
-{
-       unsigned apicid, i;
-
-       if (disable_apic || !apic_mapped)
-               return 0;
-
-       apicid = hard_smp_processor_id();
-       if (apicid < NR_CPUS && x86_cpu_to_apicid[apicid] == apicid)
-               return apicid;
-
-       for (i = 0; i < NR_CPUS; ++i) {
-               if (x86_cpu_to_apicid[i] == apicid)
-                       return i;
-       }
-
-       /* No entries in x86_cpu_to_apicid?  Either no MPS|ACPI,
-        * or called too early.  Either way, we must be CPU 0. */
-       if (x86_cpu_to_apicid[0] == BAD_APICID)
-               return 0;
-
-       return 0; /* Should not happen */
-}
 
 void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * stack,
                struct stacktrace_ops *ops, void *data)
 {
-       const unsigned cpu = safe_smp_processor_id();
+       const unsigned cpu = smp_processor_id();
        unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr;
        unsigned used = 0;
 
 {
        unsigned long *stack;
        int i;
-       const int cpu = safe_smp_processor_id();
+       const int cpu = smp_processor_id();
        unsigned long *irqstack_end = (unsigned long *) (cpu_pda(cpu)->irqstackptr);
        unsigned long *irqstack = (unsigned long *) (cpu_pda(cpu)->irqstackptr - IRQSTACKSIZE);
 
        int i;
        int in_kernel = !user_mode(regs);
        unsigned long rsp;
-       const int cpu = safe_smp_processor_id(); 
+       const int cpu = smp_processor_id();
        struct task_struct *cur = cpu_pda(cpu)->pcurrent;
 
                rsp = regs->rsp;
 
 unsigned __kprobes long oops_begin(void)
 {
-       int cpu = safe_smp_processor_id();
+       int cpu = smp_processor_id();
        unsigned long flags;
 
        oops_enter();
         * We are in trouble anyway, lets at least try
         * to get a message out.
         */
-       printk(str, safe_smp_processor_id());
+       printk(str, smp_processor_id());
        show_registers(regs);
        if (kexec_should_crash(current))
                crash_kexec(regs);
 
        return GET_APIC_ID(*(unsigned int *)(APIC_BASE+APIC_ID));
 }
 
-extern int safe_smp_processor_id(void);
 extern int __cpu_disable(void);
 extern void __cpu_die(unsigned int cpu);
 extern void prefill_possible_map(void);
 
 #ifndef CONFIG_SMP
 #define stack_smp_processor_id() 0
-#define safe_smp_processor_id() 0
 #define cpu_logical_map(x) (x)
 #else
 #include <asm/thread_info.h>