smp: patches from 3.5 mainline