/* Perform harvest + restore, as we may not be coming from a previous successful save operation, and the hardware state is unknown.  */
int spu_restore(struct spu_state *new, struct spu *spu)
/* Perform harvest + restore, as we may not be coming from a previous successful save operation, and the hardware state is unknown.  */
int spu_restore(struct spu_state *new, struct spu *spu)
{
	int rc;
	acquire_spu_lock(spu);
	harvest(NULL, spu);
	spu->slb_replace = 0;
	rc = __do_spu_restore(new, spu);
	release_spu_lock(spu);
	if (rc) {
		panic("%s failed on SPU[%d] rc=%d.\n",
		       __func__, spu->number, rc);
	}
	return rc;
}