linux-stable/drivers
Pavel Tatashin 9f960da72b device-dax: "Hotremove" persistent memory that is used like normal RAM
It is now allowed to use persistent memory like a regular RAM, but
currently there is no way to remove this memory until machine is
rebooted.

This work expands the functionality to also allows hotremoving
previously hotplugged persistent memory, and recover the device for use
for other purposes.

To hotremove persistent memory, the management software must first
offline all memory blocks of dax region, and than unbind it from
device-dax/kmem driver.  So, operations should look like this:

  echo offline > /sys/devices/system/memory/memoryN/state
  ...
  echo dax0.0 > /sys/bus/dax/drivers/kmem/unbind

Note: if unbind is done without offlining memory beforehand, it won't be
possible to do dax0.0 hotremove, and dax's memory is going to be part of
System RAM until reboot.

Link: http://lkml.kernel.org/r/20190517215438.6487-4-pasha.tatashin@soleen.com
Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: James Morris <jmorris@namei.org>
Cc: Sasha Levin <sashal@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Ross Zwisler <zwisler@kernel.org>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Yaowei Bai <baiyaowei@cmss.chinamobile.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jérôme Glisse <jglisse@redhat.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-07-16 19:23:24 -07:00
..
accessibility
acpi pci-v5.3-changes 2019-07-15 20:44:49 -07:00
amba Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
android
ata for-5.3/libata-20190708 2019-07-09 10:59:26 -07:00
atm
auxdisplay It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
base Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
bcma
block for-linus-20190715 2019-07-15 21:20:52 -07:00
bluetooth Bluetooth: btusb: Add protocol support for MediaTek MT7663U USB devices 2019-07-06 21:44:25 +02:00
bus
cdrom
char Some small fixes for various things, nothing huge, mostly found 2019-07-13 15:07:02 -07:00
clk - Core Frameworks 2019-07-15 20:18:40 -07:00
clocksource clocksource/drivers/npcm: Fix misuse of GENMASK macro 2019-07-10 11:05:26 +02:00
connector
counter Staging / IIO driver update for 5.3-rc1 2019-07-11 15:36:02 -07:00
cpufreq Merge branch 'pm-cpufreq' 2019-07-08 11:00:02 +02:00
cpuidle
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-07-08 20:57:08 -07:00
dax device-dax: "Hotremove" persistent memory that is used like normal RAM 2019-07-16 19:23:24 -07:00
dca
devfreq
dio
dma This pull-request contains the following changes for MTD: 2019-07-13 15:42:44 -07:00
dma-buf drm main pull request for v5.3-rc1 (sans mm changes) 2019-07-15 19:04:27 -07:00
edac
eisa
extcon
firewire
firmware Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
fpga Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
fsi
gnss
gpio Merge branch 'i2c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-07-15 21:10:39 -07:00
gpu pci-v5.3-changes 2019-07-15 20:44:49 -07:00
hid stream_open related bits for Linux 5.3 2019-07-14 17:08:08 -07:00
hsi
hv - Add a module description to the Hyper-V vmbus module. 2019-07-12 15:28:38 -07:00
hwmon Char / Misc driver patches for 5.3-rc1 2019-07-11 15:34:05 -07:00
hwspinlock
hwtracing coresight: Make the coresight_device_fwnode_match declaration's fwnode parameter const 2019-07-12 14:42:05 -07:00
i2c Merge branch 'i2c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-07-15 21:10:39 -07:00
i3c * Drop support for 10-bit I2C addresses 2019-07-09 09:04:31 -07:00
ide It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
idle
iio Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
infiniband 5.3 Merge window RDMA pull request 2019-07-15 20:38:15 -07:00
input stream_open related bits for Linux 5.3 2019-07-14 17:08:08 -07:00
interconnect
iommu dma-mapping updates for Linux 5.3 2019-07-12 15:13:55 -07:00
ipack TTY / Serial driver updates for 5.3-rc1 2019-07-11 15:38:21 -07:00
irqchip irqchip/gic-v3-its: Fix misuse of GENMASK macro 2019-07-10 11:04:17 +02:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-07-11 10:55:49 -07:00
leds LED updates for 5.3-rc1 2019-07-09 08:59:39 -07:00
lightnvm
macintosh powerpc updates for 5.3 2019-07-13 16:08:36 -07:00
mailbox - stm32: race fix by adding a spinlock 2019-07-14 16:36:51 -07:00
mcb
md for-linus-20190715 2019-07-15 21:20:52 -07:00
media Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-07-11 10:55:49 -07:00
memory Char / Misc driver patches for 5.3-rc1 2019-07-11 15:34:05 -07:00
memstick MMC core: 2019-07-11 18:11:21 -07:00
message SCSI misc on 20190709 2019-07-11 15:14:01 -07:00
mfd - Core Frameworks 2019-07-15 20:18:40 -07:00
misc Merge branch 'i2c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-07-15 21:10:39 -07:00
mmc MMC core: 2019-07-11 18:11:21 -07:00
mtd This pull-request contains the following changes for MTD: 2019-07-13 15:42:44 -07:00
mux
net kernel: fix typos and some coding style in comments 2019-07-16 19:23:21 -07:00
nfc nfc: st-nci: remove redundant assignment to variable r 2019-07-02 12:00:50 -07:00
ntb
nubus
nvdimm Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" 2019-07-10 18:43:43 -07:00
nvme for-linus-20190715 2019-07-15 21:20:52 -07:00
nvmem Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
of Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
opp pci-v5.3-changes 2019-07-15 20:44:49 -07:00
oprofile
parisc
parport It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
pci pci-v5.3-changes 2019-07-15 20:44:49 -07:00
pcmcia It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
perf arm64 updates for 5.3: 2019-07-08 09:54:55 -07:00
phy
pinctrl This is the bulk of pin control changes for the v5.3 kernel 2019-07-13 15:02:27 -07:00
platform Merge branch 'i2c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-07-15 21:10:39 -07:00
pnp
power power supply and reset changes for the v5.3 series 2019-07-15 21:06:15 -07:00
powercap Merge branch 'x86-topology-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-07-08 18:28:44 -07:00
pps drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl 2019-07-16 19:23:24 -07:00
ps3
ptp
pwm pwm: Changes for v5.3-rc1 2019-07-09 08:57:45 -07:00
rapidio drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings 2019-07-16 19:23:24 -07:00
ras
regulator - Core Frameworks 2019-07-15 20:18:40 -07:00
remoteproc
reset
rpmsg
rtc - Core Frameworks 2019-07-15 20:18:40 -07:00
s390 s390 updates for the 5.3 merge window #2 2019-07-12 15:39:22 -07:00
sbus
scsi for-linus-20190715 2019-07-15 21:20:52 -07:00
sfi
sh
siox
slimbus
sn
soc pci-v5.3-changes 2019-07-15 20:44:49 -07:00
soundwire soundwire updates for v5.3-rc1 2019-07-05 08:15:08 +02:00
spi Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
spmi
ssb
staging drm main pull request for v5.3-rc1 (sans mm changes) 2019-07-15 19:04:27 -07:00
target SCSI misc on 20190709 2019-07-11 15:14:01 -07:00
tc
tee
thermal Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
thunderbolt Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
tty powerpc updates for 5.3 2019-07-13 16:08:36 -07:00
uio
usb Merge branch 'i2c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-07-15 21:10:39 -07:00
uwb
vfio
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-07-11 10:55:49 -07:00
video - New Functionality 2019-07-16 09:25:04 -07:00
virt
virtio
visorbus
vlynq
vme
w1
watchdog Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
xen mm/pgtable: drop pgtable_t variable from pte_fn_t functions 2019-07-12 11:05:46 -07:00
zorro
Kconfig
Makefile