Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34a984f7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-pmem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull PMEM driver from Ingo Molnar:
 "This is the initial support for the pmem block device driver:
  persistent non-volatile memory space mapped into the system's physical
  memory space as large physical memory regions.

  The driver is based on Intel code, written by Ross Zwisler, with fixes
  by Boaz Harrosh, integrated with x86 e820 memory resource management
  and tidied up by Christoph Hellwig.

  Note that there were two other separate pmem driver submissions to
  lkml: but apparently all parties (Ross Zwisler, Boaz Harrosh) are
  reasonably happy with this initial version.

  This version enables minimal support that enables persistent memory
  devices out in the wild to work as block devices, identified through a
  magic (non-standard) e820 flag and auto-discovered if
  CONFIG_X86_PMEM_LEGACY=y, or added explicitly through manipulating the
  memory maps via the "memmap=..." boot option with the new, special '!'
  modifier character.

  Limitations: this is a regular block device, and since the pmem areas
  are not struct page backed, they are invisible to the rest of the
  system (other than the block IO device), so direct IO to/from pmem
  areas, direct mmap() or XIP is not possible yet.  The page cache will
  also shadow and double buffer pmem contents, etc.

  Initial support is for x86"

* 'x86-pmem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  drivers/block/pmem: Fix 32-bit build warning in pmem_alloc()
  drivers/block/pmem: Add a driver for persistent memory
  x86/mm: Add support for the non-standard protected e820 type
parents 90d1c087 4c1eaa23
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1972,6 +1972,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
			         or
			         memmap=0x10000$0x18690000

	memmap=nn[KMG]!ss[KMG]
			[KNL,X86] Mark specific memory as protected.
			Region of memory to be used, from ss to ss+nn.
			The memory region may be marked as e820 type 12 (0xc)
			and is NVDIMM or ADR memory.

	memory_corruption_check=0/1 [X86]
			Some BIOSes seem to corrupt the first 64k of
			memory when doing things like suspend/resume.
+6 −0
Original line number Diff line number Diff line
@@ -8130,6 +8130,12 @@ S: Maintained
F:	Documentation/blockdev/ramdisk.txt
F:	drivers/block/brd.c

PERSISTENT MEMORY DRIVER
M:	Ross Zwisler <ross.zwisler@linux.intel.com>
L:	linux-nvdimm@lists.01.org
S:	Supported
F:	drivers/block/pmem.c

RANDOM NUMBER DRIVER
M:	"Theodore Ts'o" <tytso@mit.edu>
S:	Maintained
+10 −0
Original line number Diff line number Diff line
@@ -1421,6 +1421,16 @@ config ILLEGAL_POINTER_VALUE

source "mm/Kconfig"

config X86_PMEM_LEGACY
	bool "Support non-standard NVDIMMs and ADR protected memory"
	help
	  Treat memory marked using the non-standard e820 type of 12 as used
	  by the Intel Sandy Bridge-EP reference BIOS as protected memory.
	  The kernel will offer these regions to the 'pmem' driver so
	  they can be used for persistent storage.

	  Say Y if unsure.

config HIGHPTE
	bool "Allocate 3rd-level pagetables from highmem"
	depends on HIGHMEM
+10 −0
Original line number Diff line number Diff line
@@ -33,6 +33,16 @@
#define E820_NVS	4
#define E820_UNUSABLE	5

/*
 * This is a non-standardized way to represent ADR or NVDIMM regions that
 * persist over a reboot.  The kernel will ignore their special capabilities
 * unless the CONFIG_X86_PMEM_LEGACY=y option is set.
 *
 * ( Note that older platforms also used 6 for the same type of memory,
 *   but newer versions switched to 12 as 6 was assigned differently.  Some
 *   time they will learn... )
 */
#define E820_PRAM	12

/*
 * reserved RAM used by kernel itself
+1 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@ obj-$(CONFIG_KVM_GUEST) += kvm.o kvmclock.o
obj-$(CONFIG_PARAVIRT)		+= paravirt.o paravirt_patch_$(BITS).o
obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= paravirt-spinlocks.o
obj-$(CONFIG_PARAVIRT_CLOCK)	+= pvclock.o
obj-$(CONFIG_X86_PMEM_LEGACY)	+= pmem.o

obj-$(CONFIG_PCSPKR_PLATFORM)	+= pcspeaker.o

Loading