diff options
author | Randy Wright <rwright@hp.com> | 2014-06-04 11:55:59 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-06-05 08:36:40 -0400 |
commit | a4714a898e85205e1118ec923cde43d88eb105f6 (patch) | |
tree | 17f3011a638e8c17f6df28d608dc6cf0647128f7 /drivers/acpi/osl.c | |
parent | 72013795a73f8536d3346fa90379c987bcad0cc8 (diff) |
ACPI: Fix bug when ACPI reset register is implemented in system memory
Use acpi_os_map_generic_address to pre-map the reset register if it is
memory mapped, thereby preventing the BUG_ON() in line 1319 of
mm/vmalloc.c from triggering during panic-triggered reboots.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=77131
Signed-off-by: Randy Wright <rwright@hp.com>
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
[rjw: Changelog, simplified code]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r-- | drivers/acpi/osl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 6776c599816f..88cddf84d245 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -1798,6 +1798,16 @@ acpi_status __init acpi_os_initialize(void) | |||
1798 | acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1b_event_block); | 1798 | acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1b_event_block); |
1799 | acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe0_block); | 1799 | acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe0_block); |
1800 | acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe1_block); | 1800 | acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe1_block); |
1801 | if (acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) { | ||
1802 | /* | ||
1803 | * Use acpi_os_map_generic_address to pre-map the reset | ||
1804 | * register if it's in system memory. | ||
1805 | */ | ||
1806 | int rv; | ||
1807 | |||
1808 | rv = acpi_os_map_generic_address(&acpi_gbl_FADT.reset_register); | ||
1809 | pr_debug(PREFIX "%s: map reset_reg status %d\n", __func__, rv); | ||
1810 | } | ||
1801 | 1811 | ||
1802 | return AE_OK; | 1812 | return AE_OK; |
1803 | } | 1813 | } |
@@ -1826,6 +1836,8 @@ acpi_status acpi_os_terminate(void) | |||
1826 | acpi_os_unmap_generic_address(&acpi_gbl_FADT.xgpe0_block); | 1836 | acpi_os_unmap_generic_address(&acpi_gbl_FADT.xgpe0_block); |
1827 | acpi_os_unmap_generic_address(&acpi_gbl_FADT.xpm1b_event_block); | 1837 | acpi_os_unmap_generic_address(&acpi_gbl_FADT.xpm1b_event_block); |
1828 | acpi_os_unmap_generic_address(&acpi_gbl_FADT.xpm1a_event_block); | 1838 | acpi_os_unmap_generic_address(&acpi_gbl_FADT.xpm1a_event_block); |
1839 | if (acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) | ||
1840 | acpi_os_unmap_generic_address(&acpi_gbl_FADT.reset_register); | ||
1829 | 1841 | ||
1830 | destroy_workqueue(kacpid_wq); | 1842 | destroy_workqueue(kacpid_wq); |
1831 | destroy_workqueue(kacpi_notify_wq); | 1843 | destroy_workqueue(kacpi_notify_wq); |