linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: arnd@arndb.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com,
	tglx@linutronix.de, ross.zwisler@linux.intel.com,
	akpm@linux-foundation.org
Cc: jgross@suse.com, x86@kernel.org, toshi.kani@hp.com,
	linux-nvdimm@lists.01.org, mcgrof@suse.com,
	konrad.wilk@oracle.com, linux-kernel@vger.kernel.org,
	stefan.bader@canonical.com, luto@amacapital.net,
	linux-mm@kvack.org, geert@linux-m68k.org, hmh@hmh.eng.br,
	tj@kernel.org, hch@lst.de
Subject: [PATCH v2 0/4] pmem api, generic ioremap_cache, and memremap
Date: Sat, 30 May 2015 14:59:18 -0400	[thread overview]
Message-ID: <20150530185425.32590.3190.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)

The pmem api is responsible for shepherding data out to persistent
media.  The pmem driver uses this api, when available, to assert that
data is durable by the time bio_endio() is invoked.  When an
architecture or cpu can not make persistence guarantees the driver warns
and falls back to "best effort" implementation.

Changes since v1 [1]:

1/ Rebase on tip/master + Toshi's ioremap_wt() patches and enable
   ioremap_cache() to be used generically in drivers.  Fix
   devm_ioremap_resource() in the process.

2/ Rather than add yet another instance of "force cast away __iomem for
   non-io-memory" take the opportunity to introduce memremap() for this use
   case and fix up the current users that botch their handling of the
   __iomem annotation.

3/ Mandate that consumers of the pmem api handle the case when archs, or
   cpus within an arch are not able to make durability guarantees for
   writes to persistent memory.  See pmem_ops in drivers/block/pmem.c

4/ Drop the persistent_flush() api as there are no users until the BLK
   driver is introduced, and even then it is not a "flush to persistence"
   it is an invalidation of a previous mmio aperture setting
   (io_flush_cache_range()).

5/ Add persistent_remap() to the pmem api for the arch to pick its
   desired memory type that corresponds to the assumptions of
   persistent_copy() and persistent_sync().

[1]: https://lists.01.org/pipermail/linux-nvdimm/2015-May/000929.html

This boots and processes pmem writes on x86, cross-compile 0day results
are still pending.

---

Dan Williams (3):
      arch/*/asm/io.h: add ioremap_cache() to all architectures
      devm: fix ioremap_cache() usage
      arch: introduce memremap()

Ross Zwisler (1):
      arch, x86: cache management apis for persistent memory


 arch/arc/include/asm/io.h            |    1 
 arch/arm/include/asm/io.h            |    2 +
 arch/arm64/include/asm/io.h          |    2 +
 arch/arm64/kernel/efi.c              |    4 +
 arch/arm64/kernel/smp_spin_table.c   |   10 ++--
 arch/avr32/include/asm/io.h          |    1 
 arch/frv/include/asm/io.h            |    6 ++
 arch/m32r/include/asm/io.h           |    1 
 arch/m68k/include/asm/io_mm.h        |    7 +++
 arch/m68k/include/asm/io_no.h        |    5 ++
 arch/metag/include/asm/io.h          |    5 ++
 arch/microblaze/include/asm/io.h     |    1 
 arch/mn10300/include/asm/io.h        |    1 
 arch/nios2/include/asm/io.h          |    1 
 arch/s390/include/asm/io.h           |    1 
 arch/sparc/include/asm/io_32.h       |    1 
 arch/sparc/include/asm/io_64.h       |    1 
 arch/tile/include/asm/io.h           |    1 
 arch/x86/Kconfig                     |    1 
 arch/x86/include/asm/cacheflush.h    |   24 +++++++++
 arch/x86/include/asm/io.h            |    7 +++
 arch/x86/kernel/crash_dump_64.c      |    6 +-
 arch/x86/kernel/kdebugfs.c           |    8 +--
 arch/x86/kernel/ksysfs.c             |   28 +++++-----
 arch/x86/mm/ioremap.c                |   10 +---
 arch/xtensa/include/asm/io.h         |    3 +
 drivers/acpi/apei/einj.c             |    8 +--
 drivers/acpi/apei/erst.c             |   14 +++--
 drivers/block/pmem.c                 |   62 +++++++++++++++++++++--
 drivers/firmware/google/memconsole.c |    4 +
 include/asm-generic/io.h             |    8 +++
 include/asm-generic/iomap.h          |    4 +
 include/linux/device.h               |    5 ++
 include/linux/io.h                   |   38 ++++++++++++++
 include/linux/pmem.h                 |   93 ++++++++++++++++++++++++++++++++++
 lib/Kconfig                          |    3 +
 lib/devres.c                         |   48 ++++++++----------
 37 files changed, 347 insertions(+), 78 deletions(-)
 create mode 100644 include/linux/pmem.h

--
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:[~2015-05-30 19:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-30 18:59 Dan Williams [this message]
2015-05-30 18:59 ` [PATCH v2 1/4] arch/*/asm/io.h: add ioremap_cache() to all architectures Dan Williams
2015-06-01 22:36   ` Toshi Kani
2015-06-02  8:20     ` Arnd Bergmann
2015-06-02  8:38       ` Geert Uytterhoeven
2015-05-30 18:59 ` [PATCH v2 2/4] devm: fix ioremap_cache() usage Dan Williams
2015-05-30 20:52   ` Arnd Bergmann
2015-05-30 21:16     ` Dan Williams
2015-06-01 14:26       ` Arnd Bergmann
2015-05-30 18:59 ` [PATCH v2 3/4] arch: introduce memremap() Dan Williams
2015-05-30 21:00   ` Arnd Bergmann
2015-05-30 21:39     ` Dan Williams
2015-06-01 14:29       ` Arnd Bergmann
2015-05-30 18:59 ` [PATCH v2 4/4] arch, x86: cache management apis for persistent memory Dan Williams
2015-06-01  9:19   ` Paul Bolle
2015-06-01 11:39   ` Boaz Harrosh
2015-06-01 11:44     ` Boaz Harrosh
2015-06-01 16:07       ` Dan Williams
2015-06-01 16:22     ` 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=20150530185425.32590.3190.stgit@dwillia2-desk3.amr.corp.intel.com \
    --to=dan.j.williams@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=geert@linux-m68k.org \
    --cc=hch@lst.de \
    --cc=hmh@hmh.eng.br \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=luto@amacapital.net \
    --cc=mcgrof@suse.com \
    --cc=mingo@redhat.com \
    --cc=ross.zwisler@linux.intel.com \
    --cc=stefan.bader@canonical.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=toshi.kani@hp.com \
    --cc=x86@kernel.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).