linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: akpm@linux-foundation.org, Ingo Molnar <mingo@kernel.org>,
	Tony Luck <tony.luck@intel.com>,
	linux-nvdimm@lists.01.org, Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org,
	Andy Lutomirski <luto@amacapital.net>,
	linux-mm@kvack.org, Borislav Petkov <bp@alien8.de>,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] x86, pmem: use memcpy_mcsafe() for memcpy_from_pmem()
Date: Fri, 11 Mar 2016 15:50:01 -0700	[thread overview]
Message-ID: <20160311225001.GA30106@linux.intel.com> (raw)
In-Reply-To: <20160310191507.29771.46591.stgit@dwillia2-desk3.jf.intel.com>

On Thu, Mar 10, 2016 at 11:15:53AM -0800, Dan Williams wrote:
> Update the definition of memcpy_from_pmem() to return 0 or -EIO on
> error.  Implement x86::arch_memcpy_from_pmem() with memcpy_mcsafe().
> 
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Tony Luck <tony.luck@intel.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Andy Lutomirski <luto@amacapital.net>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
> Andrew, now that all the pre-requisites for this patch are in -next
> (tip/core/ras, tip/x86/asm, nvdimm/libnvdimm-for-next) may I ask you to
> carry it in -mm?
> 
> Alternatively I can do an octopus merge and post a branch, but that
> seems messy/risky for me to be merging 3 branches that are still subject
> to a merge window disposition.
> 
>  arch/x86/include/asm/pmem.h |    9 +++++++++
>  drivers/nvdimm/pmem.c       |    4 ++--
>  include/linux/pmem.h        |   14 ++++++++------
>  3 files changed, 19 insertions(+), 8 deletions(-)
<>
> diff --git a/include/linux/pmem.h b/include/linux/pmem.h
> index 3ec5309e29f3..c46c5cf6538e 100644
> --- a/include/linux/pmem.h
> +++ b/include/linux/pmem.h
> @@ -66,14 +66,16 @@ static inline void arch_invalidate_pmem(void __pmem *addr, size_t size)
>  #endif
>  
>  /*
> - * Architectures that define ARCH_HAS_PMEM_API must provide
> - * implementations for arch_memcpy_to_pmem(), arch_wmb_pmem(),
> - * arch_copy_from_iter_pmem(), arch_clear_pmem(), arch_wb_cache_pmem()
> - * and arch_has_wmb_pmem().

Why did you delete the above comment?  I believe it adds value?  Or do you
think the fact that another architecture will get compile errors if the arch_*
functions aren't defined is documentation enough?

> + * memcpy_from_pmem - read from persistent memory with error handling
> + * @dst: destination buffer
> + * @src: source buffer

Missing kerneldoc for @size?

Aside from those tiny nits:
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2016-03-11 22:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10 19:15 [PATCH] x86, pmem: use memcpy_mcsafe() for memcpy_from_pmem() Dan Williams
2016-03-11 22:50 ` Ross Zwisler [this message]
2016-03-11 23:03   ` Dan Williams

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=20160311225001.GA30106@linux.intel.com \
    --to=ross.zwisler@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    /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).