[Cbe-oss-dev] [rfc] spufs: support multi-platform priv1 access

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Apr 21 12:08:52 EST 2006


> +static const struct spu_priv1_ops priv1_ops =
> +{
> +	.int_mask_and = int_mask_and,
> +	.int_mask_or = int_mask_or,
> +	.int_mask_set = int_mask_set,
> +	.int_mask_get = int_mask_get,
> +	.int_stat_clear = int_stat_clear,
> +	.int_stat_get = int_stat_get,
> +	.int_route_set = int_route_set,
> +	.mfc_dar_get = mfc_dar_get,
> +	.mfc_dsisr_get = mfc_dsisr_get,
> +	.mfc_dsisr_set = mfc_dsisr_set,
> +	.mfc_sdr_set = mfc_sdr_set,
> +	.mfc_sr1_set = mfc_sr1_set,
> +	.mfc_sr1_get = mfc_sr1_get,
> +	.mfc_tclass_id_set = mfc_tclass_id_set,
> +	.mfc_tclass_id_get = mfc_tclass_id_get,
> +	.smm_pgsz_set = smm_pgsz_set,
> +	.tlb_invalidate = tlb_invalidate,
> +	.resource_allocation_groupID_set = resource_allocation_groupID_set,
> +	.resource_allocation_groupID_get = resource_allocation_groupID_get,
> +	.resource_allocation_enable_set = resource_allocation_enable_set,
> +	.resource_allocation_enable_get = resource_allocation_enable_get,
> +};

Looks a bit too fine-grained to me... we'll pay a very high overhead if
we need to do an indirect function call for example for getting the DAR,
the DSISR, etc... We should probably invent a smarter API that allows to
get more than one of those at once in cases where it makes sense
(typically like DAR/DSISR) or better, get a higher level API in place.

Ben.





More information about the cbe-oss-dev mailing list