/* Acquire locks, perform the save operation then return.  */
int spu_save(struct spu_state *prev, struct spu *spu)
/* Acquire locks, perform the save operation then return.  */
int spu_save(struct spu_state *prev, struct spu *spu)
{
	int rc;
	acquire_spu_lock(spu);
	rc = __do_spu_save(prev, spu);
	release_spu_lock(spu);
	if (rc != 0 && rc != 2 && rc != 6) {
		panic("%s failed on SPU[%d], rc=%d.\n",
		      __func__, spu->number, rc);
	}
	return 0;
}