From a4714a898e85205e1118ec923cde43d88eb105f6 Mon Sep 17 00:00:00 2001 From: Randy Wright Date: Wed, 4 Jun 2014 08:55:59 -0700 Subject: 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 Signed-off-by: David E. Box [rjw: Changelog, simplified code] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/osl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1b_event_block); acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe0_block); acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe1_block); + if (acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) { + /* + * Use acpi_os_map_generic_address to pre-map the reset + * register if it's in system memory. + */ + int rv; + + rv = acpi_os_map_generic_address(&acpi_gbl_FADT.reset_register); + pr_debug(PREFIX "%s: map reset_reg status %d\n", __func__, rv); + } return AE_OK; } @@ -1826,6 +1836,8 @@ acpi_status acpi_os_terminate(void) acpi_os_unmap_generic_address(&acpi_gbl_FADT.xgpe0_block); acpi_os_unmap_generic_address(&acpi_gbl_FADT.xpm1b_event_block); acpi_os_unmap_generic_address(&acpi_gbl_FADT.xpm1a_event_block); + if (acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) + acpi_os_unmap_generic_address(&acpi_gbl_FADT.reset_register); destroy_workqueue(kacpid_wq); destroy_workqueue(kacpi_notify_wq); -- cgit v1.2.3 From 751109aad5834375ca9ed0dcfcd85a00cbf872b5 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Thu, 5 Jun 2014 22:47:35 +0200 Subject: ACPI / video: Change the default for video.use_native_backlight to 1 Now that we're hoping to have resolved all of the problems with video.use_native_backlight=1, make that the default at last. Link: http://marc.info/?l=linux-acpi&m=139716088401106&w=2 Signed-off-by: Rafael J. Wysocki --- drivers/acpi/video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 101fb090dcb9..fb9ffe9adc64 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -82,7 +82,7 @@ module_param(allow_duplicates, bool, 0644); * For Windows 8 systems: used to decide if video module * should skip registering backlight interface of its own. */ -static int use_native_backlight_param = -1; +static int use_native_backlight_param = 1; module_param_named(use_native_backlight, use_native_backlight_param, int, 0444); static bool use_native_backlight_dmi = false; -- cgit v1.2.3