linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>, linuxppc-dev@lists.ozlabs.org
Cc: Michael Neuling <mikey@neuling.org>,
	Ian Munsie <imunsie@au1.ibm.com>,
	Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
Subject: Re: [v5] cxl: Export AFU error buffer via sysfs
Date: Fri, 22 May 2015 12:45:55 +1000 (AEST)	[thread overview]
Message-ID: <20150522024555.1FD8614077A@ozlabs.org> (raw)
In-Reply-To: <1432195530-31382-1-git-send-email-vaibhav@linux.vnet.ibm.com>

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

      reply	other threads:[~2015-05-22  2:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21  8:05 [PATCH v5] cxl: Export AFU error buffer via sysfs Vaibhav Jain
2015-05-22  2:45 ` Michael Ellerman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150522024555.1FD8614077A@ozlabs.org \
    --to=mpe@ellerman.id.au \
    --cc=imunsie@au1.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=vaibhav@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).