amd64: Fix a bug in cpu_prepare_lwp().