x86: move suspend wakeup code to C