/* Note that storage for the 'lscsa' is allocated separately, as it is by far the largest of the context save regions, and may need to be pinned or otherwise specially aligned.  */
int spu_init_csa(struct spu_state *csa)
/* Note that storage for the 'lscsa' is allocated separately, as it is by far the largest of the context save regions, and may need to be pinned or otherwise specially aligned.  */
int spu_init_csa(struct spu_state *csa)
{
	int rc;
	if (!csa)
		return -EINVAL;
	memset(csa, 0, sizeof(struct spu_state));
	rc = spu_alloc_lscsa(csa);
	if (rc)
		return rc;
	spin_lock_init(&csa->register_lock);
	init_prob(csa);
	init_priv1(csa);
	init_priv2(csa);
	return 0;
}