linux/drivers
Daniel Jordan 79eb597cba mm: add account_locked_vm utility function
locked_vm accounting is done roughly the same way in five places, so
unify them in a helper.

Include the helper's caller in the debug print to distinguish between
callsites.

Error codes stay the same, so user-visible behavior does too.  The one
exception is that the -EPERM case in tce_account_locked_vm is removed
because Alexey has never seen it triggered.

[daniel.m.jordan@oracle.com: v3]
  Link: http://lkml.kernel.org/r/20190529205019.20927-1-daniel.m.jordan@oracle.com
[sfr@canb.auug.org.au: fix mm/util.c]
Link: http://lkml.kernel.org/r/20190524175045.26897-1-daniel.m.jordan@oracle.com
Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Cc: Alan Tull <atull@kernel.org>
Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Jason Gunthorpe <jgg@mellanox.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Moritz Fischer <mdf@kernel.org>
Cc: Paul Mackerras <paulus@ozlabs.org>
Cc: Steve Sistare <steven.sistare@oracle.com>
Cc: Wu Hao <hao.wu@intel.com>
Cc: Ira Weiny <ira.weiny@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:25 -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 mm: add account_locked_vm utility function 2019-07-16 19:23:25 -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 mm: add account_locked_vm utility function 2019-07-16 19:23:25 -07:00
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