[v5] cxl: Export AFU error buffer via sysfs

Michael Ellerman mpe at ellerman.id.au
Fri May 22 12:45:55 AEST 2015

On Thu, 2015-21-05 at 08:05:30 UTC, Vaibhav Jain wrote:
> Export the "AFU Error Buffer" via sysfs attribute (afu_err_buf). AFU
> error buffer is used by the AFU to report application specific
> errors. The contents of this buffer are AFU specific and are intended to
> be interpreted by the application interacting with the afu.
> Testing:
> 	- Build against pseries le/be configs.
> 	- Run testing with a special version of memcpy afu on a 'be'
> 	kernel.
> Change-log:
> v4 -> v5
> 	- Improved documentation in cxl_afu_read_err_buffer function to
> 	address why I am using '_memcpy_fromio' instead of
> 	'memcpy_fromio'

> +	/*
> +	 * using '_memcpy_fromio' instead of 'memcpy_fromio' as on powerpc
> +	 * arch its gauranteed to use 8/4 bytes aligned reads. This may
> +	 * not be the case with other archs.
> +	 */

Please just use memcpy_fromio().

Via the definition at:


You'll get the implementation at:


Which because there is no hook defined will use the implementation at:


Which will use:


Which calls _memcpy_fromio() and also checks for EEH errors.


More information about the Linuxppc-dev mailing list