On 11/09/2013 05:07 PM, al.stone@linaro.org wrote:
From: Al Stone ahs3@redhat.com
Remove the saving and restoring of bus master reload registers in suspend/resume when in reduces HW mode; according to the spec, no such registers should exist
Signed-off-by: Al Stone al.stone@linaro.org
drivers/acpi/processor_idle.c | 8 +++++--- include/acpi/acpixf.h | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 587f3cf..0125f54 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -219,15 +219,17 @@ static void lapic_timer_state_broadcast(struct acpi_processor *pr, #endif
#ifdef CONFIG_PM_SLEEP +#if (!ACPI_REDUCED_HARDWARE) static u32 saved_bm_rld; +#endif
-static int acpi_processor_suspend(void) +ACPI_HW_DEPENDENT_RETURN_INT(int acpi_processor_suspend(void)) { acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_RLD, &saved_bm_rld); return 0; }
-static void acpi_processor_resume(void) +ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_processor_resume(void)) { u32 resumed_bm_rld;
@@ -617,7 +619,7 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) case ACPI_STATE_C2: if (!cx->address) break;
cx->valid = 1;
cx->valid = 1; break;
case ACPI_STATE_C3:
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 85bfdbe..3eec2446 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -98,6 +98,9 @@ extern u8 acpi_gbl_disable_ssdt_table_load; #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ prototype;
+#define ACPI_HW_DEPENDENT_RETURN_INT(prototype) \
- prototype;
- #else #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \ static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);}
@@ -108,6 +111,9 @@ extern u8 acpi_gbl_disable_ssdt_table_load; #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ static ACPI_INLINE prototype {}
+#define ACPI_HW_DEPENDENT_RETURN_INT(prototype) \
static ACPI_INLINE prototype {return 0;}
#endif /* !ACPI_REDUCED_HARDWARE */
extern u32 acpi_rsdt_forced;
Hrm. This will not work at all upstream because of the way the macros are presumed to be used. I'll have to redo this back to the prior method. The problem is that the non-HW-reduced macros insist on a ';' in the wrong place; how I got this to compile I'll never know...