diff mbox

[v2,2/6] ACPI: bus master reload not supported in reduced HW mode

Message ID 1385080915-23430-3-git-send-email-al.stone@linaro.org
State New
Headers show

Commit Message

Al Stone Nov. 22, 2013, 12:41 a.m. UTC
From: Al Stone <al.stone@linaro.org>

Remove the saving and restoring of bus master reload registers in
suspend/resume when in reduced 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 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Hanjun Guo Nov. 22, 2013, 3:06 a.m. UTC | #1
On 2013-11-22 8:41, al.stone@linaro.org wrote:
> From: Al Stone <al.stone@linaro.org>
> 
> Remove the saving and restoring of bus master reload registers in
> suspend/resume when in reduced 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 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> index 597cdab..b18e7ab 100644
> --- a/drivers/acpi/processor_idle.c
> +++ b/drivers/acpi/processor_idle.c
> @@ -202,7 +202,7 @@ static void lapic_timer_state_broadcast(struct acpi_processor *pr,
>  
>  #endif
>  
> -#ifdef CONFIG_PM_SLEEP
> +#if (IS_ENABLED(CONFIG_PM_SLEEP) && !IS_ENABLED(CONFIG_ACPI_REDUCED_HARDWARE))
>  static u32 saved_bm_rld;
>  
>  static int acpi_processor_suspend(void)
> @@ -236,7 +236,11 @@ void acpi_processor_syscore_exit(void)
>  {
>  	unregister_syscore_ops(&acpi_processor_syscore_ops);
>  }
> -#endif /* CONFIG_PM_SLEEP */

I think the code below is not needed, because acpi_processor_suspend/resume()
are not used by anywhere else.

> +#else
> +/* Bus master reload is not supported in reduced HW mode. */
> +static int acpi_processor_suspend(void) { return 0; }
> +static void acpi_processor_resume(void) { return; }
> +#endif

Thanks
Hanjun
Al Stone Nov. 27, 2013, 10:35 p.m. UTC | #2
On 11/21/2013 08:06 PM, Hanjun Guo wrote:
> On 2013-11-22 8:41, al.stone@linaro.org wrote:
>> From: Al Stone <al.stone@linaro.org>
>>
>> Remove the saving and restoring of bus master reload registers in
>> suspend/resume when in reduced 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 ++++++--
>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
>> index 597cdab..b18e7ab 100644
>> --- a/drivers/acpi/processor_idle.c
>> +++ b/drivers/acpi/processor_idle.c
>> @@ -202,7 +202,7 @@ static void lapic_timer_state_broadcast(struct acpi_processor *pr,
>>
>>   #endif
>>
>> -#ifdef CONFIG_PM_SLEEP
>> +#if (IS_ENABLED(CONFIG_PM_SLEEP) && !IS_ENABLED(CONFIG_ACPI_REDUCED_HARDWARE))
>>   static u32 saved_bm_rld;
>>
>>   static int acpi_processor_suspend(void)
>> @@ -236,7 +236,11 @@ void acpi_processor_syscore_exit(void)
>>   {
>>   	unregister_syscore_ops(&acpi_processor_syscore_ops);
>>   }
>> -#endif /* CONFIG_PM_SLEEP */
>
> I think the code below is not needed, because acpi_processor_suspend/resume()
> are not used by anywhere else.
>
>> +#else
>> +/* Bus master reload is not supported in reduced HW mode. */
>> +static int acpi_processor_suspend(void) { return 0; }
>> +static void acpi_processor_resume(void) { return; }
>> +#endif
>
> Thanks
> Hanjun
>

Agreed.  Removed in next version.
diff mbox

Patch

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 597cdab..b18e7ab 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -202,7 +202,7 @@  static void lapic_timer_state_broadcast(struct acpi_processor *pr,
 
 #endif
 
-#ifdef CONFIG_PM_SLEEP
+#if (IS_ENABLED(CONFIG_PM_SLEEP) && !IS_ENABLED(CONFIG_ACPI_REDUCED_HARDWARE))
 static u32 saved_bm_rld;
 
 static int acpi_processor_suspend(void)
@@ -236,7 +236,11 @@  void acpi_processor_syscore_exit(void)
 {
 	unregister_syscore_ops(&acpi_processor_syscore_ops);
 }
-#endif /* CONFIG_PM_SLEEP */
+#else
+/* Bus master reload is not supported in reduced HW mode. */
+static int acpi_processor_suspend(void) { return 0; }
+static void acpi_processor_resume(void) { return; }
+#endif
 
 #if defined(CONFIG_X86)
 static void tsc_check_state(int state)