linux-imx/include
Rafael J. Wysocki 042cde4288 ACPI / PNP: Reserve ACPI resources at the fs_initcall_sync stage
commit 0294112ee3 upstream.

This effectively reverts the following three commits:

 7bc10388cc ACPI / resources: free memory on error in add_region_before()
 0f1b414d19 ACPI / PNP: Avoid conflicting resource reservations
 b9a5e5e18f ACPI / init: Fix the ordering of acpi_reserve_resources()

(commit b9a5e5e18f introduced regressions some of which, but not
all, were addressed by commit 0f1b414d19 and commit 7bc10388cc
was a fixup on top of the latter) and causes ACPI fixed hardware
resources to be reserved at the fs_initcall_sync stage of system
initialization.

The story is as follows.  First, a boot regression was reported due
to an apparent resource reservation ordering change after a commit
that shouldn't lead to such changes.  Investigation led to the
conclusion that the problem happened because acpi_reserve_resources()
was executed at the device_initcall() stage of system initialization
which wasn't strictly ordered with respect to driver initialization
(and with respect to the initialization of the pcieport driver in
particular), so a random change causing the device initcalls to be
run in a different order might break things.

The response to that was to attempt to run acpi_reserve_resources()
as soon as we knew that ACPI would be in use (commit b9a5e5e18f).
However, that turned out to be too early, because it caused resource
reservations made by the PNP system driver to fail on at least one
system and that failure was addressed by commit 0f1b414d19.

That fix still turned out to be insufficient, though, because
calling acpi_reserve_resources() before the fs_initcall stage of
system initialization caused a boot regression to happen on the
eCAFE EC-800-H20G/S netbook.  That meant that we only could call
acpi_reserve_resources() at the fs_initcall initialization stage
or later, but then we might just as well call it after the PNP
initalization in which case commit 0f1b414d19 wouldn't be
necessary any more.

For this reason, the changes made by commit 0f1b414d19 are reverted
(along with a memory leak fixup on top of that commit), the changes
made by commit b9a5e5e18f that went too far are reverted too and
acpi_reserve_resources() is changed into fs_initcall_sync, which
will cause it to be executed after the PNP subsystem initialization
(which is an fs_initcall) and before device initcalls (including
the pcieport driver initialization) which should avoid the initial
issue.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=100581
Link: http://marc.info/?t=143092384600002&r=1&w=2
Link: https://bugzilla.kernel.org/show_bug.cgi?id=99831
Link: http://marc.info/?t=143389402600001&r=1&w=2
Fixes: b9a5e5e18f "ACPI / init: Fix the ordering of acpi_reserve_resources()"
Reported-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
2017-04-11 08:04:33 +02:00
..
acpi ACPICA: Tables: Fix an issue that FACS initialization is performed twice 2015-08-04 16:52:26 +02:00
asm-generic asm-generic: make copy_from_user() zero the destination properly 2016-09-29 11:14:35 +02:00
clocksource ARM: SoC cleanups for 3.12 2013-09-06 13:21:16 -07:00
crypto crypto: crypto_memneq - add equality testing of memory regions w/o timing leaks 2016-04-23 09:24:42 +02:00
drm drm/radeon: add new OLAND pci id 2015-08-25 16:57:10 +02:00
dt-bindings ARM: dts: Fix pinctrl mask for omap3 2013-10-08 10:37:29 -07:00
keys
kvm arm/arm64: KVM: Require in-kernel vgic for the arch timers 2015-04-30 11:15:13 +02:00
linux ACPI / PNP: Reserve ACPI resources at the fs_initcall_sync stage 2017-04-11 08:04:33 +02:00
math-emu
media media: vb2: fix VBI/poll regression 2014-10-13 16:09:20 +02:00
memory
misc
net ipv6: simplify detection of first operational link-local address on interface 2017-03-03 11:31:19 +01:00
pcmcia
ras
rdma RDMA/core: Fix incorrect structure packing for booleans 2017-03-13 21:40:35 +01:00
rxrpc
scsi scsi: do not issue SCSI RSOC command to Promise Vtrak E610f 2014-09-17 16:55:06 +02:00
sound ALSA: rawmidi: Make snd_rawmidi_transmit() race-free 2016-04-11 16:43:51 +02:00
target target: Fix race for SCF_COMPARE_AND_WRITE_POST checking 2016-03-03 12:45:57 +01:00
trace tracing: Add #undef to fix compile error 2017-03-28 15:49:12 +02:00
uapi netlink: remove mmapped netlink support 2017-04-07 09:17:43 +02:00
video fbdev changes for 3.12: 2013-09-05 09:49:32 -07:00
xen xen: Add RING_COPY_REQUEST() 2016-04-11 16:43:45 +02:00
Kbuild