aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2015-08-04 15:19:50 -0700
committerKevin Hilman <khilman@linaro.org>2015-08-04 15:19:50 -0700
commiteb57744377e833c82168b0e8487593d038a67551 (patch)
tree9f65ce76820d04fd9b25bd518dc232eaeb0dcba3 /drivers/acpi
parent69483e398f196d87ca3289f31ad3291bad94af60 (diff)
parent6c180de4a3687a2caec109f84bed0b40d9ced28e (diff)
Merge tag 'v3.14.49' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-linaro-lsk-v3.14
This is the 3.14.49 stable release * tag 'v3.14.49' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (126 commits) Linux 3.14.49 MIPS: KVM: Do not sign extend on unsigned MMIO load qla2xxx: Mark port lost when we receive an RSCN for it. Fix firmware loader uevent buffer NULL pointer dereference hpfs: hpfs_error: Remove static buffer, use vsprintf extension %pV instead arm64: Don't report clear pmds and puds as huge agp/intel: Fix typo in needs_ilk_vtd_wa() rbd: use GFP_NOIO in rbd_obj_request_create() 9p: don't leave a half-initialized inode sitting around 9p: forgetting to cancel request on interrupted zero-copy RPC SUNRPC: Fix a memory leak in the backchannel code nfs: increase size of EXCHANGE_ID name string buffer fixing infinite OPEN loop in 4.0 stateid recovery NFS: Fix size of NFSACL SETACL operations watchdog: omap: assert the counter being stopped before reprogramming of: return NUMA_NO_NODE from fallback of_node_to_nid() block: Do a full clone when splitting discard bios USB: usbfs: allow URBs to be reaped after disconnection dell-laptop: Fix allocating & freeing SMI buffer page ideapad: fix software rfkill setting ...
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpica/utxfinit.c10
-rw-r--r--drivers/acpi/bus.c56
2 files changed, 47 insertions, 19 deletions
diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c
index 246ef68681f4..2c3c578faa0a 100644
--- a/drivers/acpi/acpica/utxfinit.c
+++ b/drivers/acpi/acpica/utxfinit.c
@@ -175,10 +175,12 @@ acpi_status __init acpi_enable_subsystem(u32 flags)
* Obtain a permanent mapping for the FACS. This is required for the
* Global Lock and the Firmware Waking Vector
*/
- status = acpi_tb_initialize_facs();
- if (ACPI_FAILURE(status)) {
- ACPI_WARNING((AE_INFO, "Could not map the FACS table"));
- return_ACPI_STATUS(status);
+ if (!(flags & ACPI_NO_FACS_INIT)) {
+ status = acpi_tb_initialize_facs();
+ if (ACPI_FAILURE(status)) {
+ ACPI_WARNING((AE_INFO, "Could not map the FACS table"));
+ return_ACPI_STATUS(status);
+ }
}
#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index b48aefab57e8..60be8d0ef100 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -450,6 +450,16 @@ static int __init acpi_bus_init_irq(void)
u8 acpi_gbl_permanent_mmap;
+/**
+ * acpi_early_init - Initialize ACPICA and populate the ACPI namespace.
+ *
+ * The ACPI tables are accessible after this, but the handling of events has not
+ * been initialized and the global lock is not available yet, so AML should not
+ * be executed at this point.
+ *
+ * Doing this before switching the EFI runtime services to virtual mode allows
+ * the EfiBootServices memory to be freed slightly earlier on boot.
+ */
void __init acpi_early_init(void)
{
acpi_status status;
@@ -510,26 +520,42 @@ void __init acpi_early_init(void)
acpi_gbl_FADT.sci_interrupt = acpi_sci_override_gsi;
}
#endif
+ return;
+
+ error0:
+ disable_acpi();
+}
+
+/**
+ * acpi_subsystem_init - Finalize the early initialization of ACPI.
+ *
+ * Switch over the platform to the ACPI mode (if possible), initialize the
+ * handling of ACPI events, install the interrupt and global lock handlers.
+ *
+ * Doing this too early is generally unsafe, but at the same time it needs to be
+ * done before all things that really depend on ACPI. The right spot appears to
+ * be before finalizing the EFI initialization.
+ */
+void __init acpi_subsystem_init(void)
+{
+ acpi_status status;
+
+ if (acpi_disabled)
+ return;
status = acpi_enable_subsystem(~ACPI_NO_ACPI_ENABLE);
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX "Unable to enable ACPI\n");
- goto error0;
+ disable_acpi();
+ } else {
+ /*
+ * If the system is using ACPI then we can be reasonably
+ * confident that any regulators are managed by the firmware
+ * so tell the regulator core it has everything it needs to
+ * know.
+ */
+ regulator_has_full_constraints();
}
-
- /*
- * If the system is using ACPI then we can be reasonably
- * confident that any regulators are managed by the firmware
- * so tell the regulator core it has everything it needs to
- * know.
- */
- regulator_has_full_constraints();
-
- return;
-
- error0:
- disable_acpi();
- return;
}
static int __init acpi_bus_init(void)