WSL2-Linux-Kernel/drivers
Rafael J. Wysocki b8fcd0e588 ACPICA: Preserve memory opregion mappings
The ACPICA's strategy with respect to the handling of memory mappings
associated with memory operation regions is to avoid mapping the
entire region at once which may be problematic at least in principle
(for example, it may lead to conflicts with overlapping mappings
having different attributes created by drivers).  It may also be
wasteful, because memory opregions on some systems take up vast
chunks of address space while the fields in those regions actually
accessed by AML are sparsely distributed.

For this reason, a one-page "window" is mapped for a given opregion
on the first memory access through it and if that "window" does not
cover an address range accessed through that opregion subsequently,
it is unmapped and a new "window" is mapped to replace it.  Next,
if the new "window" is not sufficient to acess memory through the
opregion in question in the future, it will be replaced with yet
another "window" and so on.  That may lead to a suboptimal sequence
of memory mapping and unmapping operations, for example if two fields
in one opregion separated from each other by a sufficiently wide
chunk of unused address space are accessed in an alternating pattern.

The situation may still be suboptimal if the deferred unmapping
introduced previously is supported by the OS layer.  For instance,
the alternating memory access pattern mentioned above may produce
a relatively long list of mappings to release with substantial
duplication among the entries in it, which could be avoided if
acpi_ex_system_memory_space_handler() did not release the mapping
used by it previously as soon as the current access was not covered
by it.

In order to improve that, modify acpi_ex_system_memory_space_handler()
to preserve all of the memory mappings created by it until the memory
regions associated with them go away.

Accordingly, update acpi_ev_system_memory_region_setup() to unmap all
memory associated with memory opregions that go away.

Reported-by: Dan Williams <dan.j.williams@intel.com>
Tested-by: Xiang Li <xiang.z.li@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-07-27 12:29:02 +02:00
..
accessibility
acpi ACPICA: Preserve memory opregion mappings 2020-07-27 12:29:02 +02:00
amba
android binder: fix null deref of proc->context 2020-06-23 07:54:46 +02:00
ata
atm
auxdisplay
base Power management fixes for 5.8-rc3 2020-06-26 12:32:11 -07:00
bcma
block
bluetooth
bus Fixes for omaps for v5.8 2020-06-28 14:41:55 +02:00
cdrom
char
clk clk: sifive: allocate sufficient memory for struct __prci_data 2020-06-25 15:04:13 -07:00
clocksource
connector
counter
cpufreq cpufreq: intel_pstate: Add one more OOB control bit 2020-06-23 17:24:32 +02:00
cpuidle cpuidle: Rearrange s2idle-specific idle state entry code 2020-06-25 13:52:53 +02:00
crypto
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware ARM: SoC fixes for v5.8 2020-06-28 14:55:18 -07:00
fpga FPGA Manager fixes for 5.8-rc1 2020-06-26 17:26:31 +02:00
fsi
gnss
gpio
gpu Short summary of fixes pull (less than what git shortlog provides): 2020-06-26 13:49:17 +10:00
greybus
hid
hsi
hv
hwmon
hwspinlock
hwtracing
i2c i2c: core: check returned size of emulated smbus block read 2020-06-26 10:18:35 +02:00
i3c
ide
idle
iio
infiniband IB/hfi1: Add atomic triggered sleep/wakeup 2020-06-24 16:13:38 -03:00
input
interconnect
iommu iommu/vt-d: Fix misuse of iommu_domain_identity_map() 2020-06-23 10:08:32 +02:00
ipack
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb
md - Quite a few DM zoned target fixes and a Zone append fix in DM core. 2020-06-27 08:57:16 -07:00
media media: omap3isp: remove cacheflush.h 2020-06-26 00:27:37 -07:00
memory
memstick
message scsi: mptscsih: Fix read sense data size 2020-06-24 00:23:17 -04:00
mfd
misc habanalabs: increase h/w timer when checking idle 2020-06-24 12:35:23 +03:00
mmc
most
mtd
mux
net wil6210: account for napi_gro_receive never returning GRO_DROP 2020-06-25 16:16:21 -07:00
nfc
ntb
nubus
nvdimm
nvme nvme-multipath: fix bogus request queue reference put 2020-06-24 18:41:20 +02:00
nvmem
of
opp
oprofile
parisc
parport
pci
pcmcia
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 SCSI fixes on 20200627 2020-06-27 15:20:03 -07:00
sbus
scsi scsi: lpfc: Avoid another null dereference in lpfc_sli4_hba_unset() 2020-06-23 23:56:52 -04:00
sfi
sh
siox
slimbus
soc ARM: OMAP fixes for v5.8 2020-06-28 14:57:14 -07:00
soundwire
spi spi: Fixes for v5.8 2020-06-22 09:49:59 -07:00
spmi
ssb
staging
target
tc
tee
thermal
thunderbolt
tty kdb: Switch to use safer dbg_io_ops over console APIs 2020-06-26 15:40:16 +01:00
uio
usb USB fixes for 5.8-rc3 2020-06-27 13:12:10 -07:00
vdpa
vfio vfio/pci: Fix SR-IOV VF handling with MMIO blocking 2020-06-25 11:04:23 -06:00
vhost
video Short summary of fixes pull (less than what git shortlog provides): 2020-06-26 13:49:17 +10:00
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile