]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPI / init: Fix the ordering of acpi_reserve_resources()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 7 May 2015 19:19:39 +0000 (21:19 +0200)
committerSasha Levin <sasha.levin@oracle.com>
Wed, 10 Jun 2015 17:42:40 +0000 (13:42 -0400)
commitbeeaeeac0f3ea0ad59fbf2ff86e956b1504e16f6
tree81d54db0db0f0060c565e21178dcad1330abc8e3
parentf991e4e397c331d9c5ee45f30e362d95581720f6
ACPI / init: Fix the ordering of acpi_reserve_resources()

[ Upstream commit b9a5e5e18fbf223502c0b2264c15024e393da928 ]

Since acpi_reserve_resources() is defined as a device_initcall(),
there's no guarantee that it will be executed in the right order
with respect to the rest of the ACPI initialization code.  On some
systems this leads to breakage if, for example, the address range
that should be reserved for the ACPI fixed registers is given to
the PCI host bridge instead if the race is won by the wrong code
path.

Fix this by turning acpi_reserve_resources() into a void function
and calling it directly from within the ACPI initialization sequence.

Reported-and-tested-by: George McCollister <george.mccollister@gmail.com>
Link: http://marc.info/?t=143092384600002&r=1&w=2
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/acpi/osl.c