[PATCH] cxl: Add kernel API to allow a context to operate with relocate disabled

Michael Ellerman mpe at ellerman.id.au
Fri May 6 12:23:32 AEST 2016


On Wed, 2016-05-04 at 18:07 +0200, Frederic Barrat wrote:

> Hi Ian,
> 
> The principle is fine, but the cxl_start_context2 API bothers me a bit. 
> Would something similar to this make sense, I think it would keep the 
> API cleaner:
> 
> /* new kernel-only API */
> void cxl_set_translation_mode(struct cxl_context *ctx, bool real_mode)
> 
> For mlx5, the call sequence would be:
> 	ctx = cxl_dev_context_init()
> 	cxl_set_translation_mode(ctx, true)
> 	cxl_start_context(ctx)

I'd prefer that if it works.

The new "2" API and the bool being passed everywhere is a bit smelly.

cheers



More information about the Linuxppc-dev mailing list