x86_64: copied in smp code