[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:

  https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/include/asm/io-defs.h#n57

You'll get the implementation at:

  https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/include/asm/io.h#n584

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

  https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/include/asm/io.h#n542

Which will use:

  https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/include/asm/eeh.h#n417


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

cheers


More information about the Linuxppc-dev mailing list