From: Al Stone <al.stone@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: linux-acpi@vger.kernel.org, linaro-acpi@lists.linaro.org,
Al Stone <ahs3@redhat.com>
Subject: Re: [PATCH 02/12] ACPI: bus master reload not supported in reduced HW mode
Date: Wed, 20 Nov 2013 14:11:34 -0700 [thread overview]
Message-ID: <528D2586.7010503@linaro.org> (raw)
In-Reply-To: <2902248.9mmxm8tccy@vostro.rjw.lan>
On 11/17/2013 02:56 PM, Rafael J. Wysocki wrote:
> On Saturday, November 09, 2013 06:36:12 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, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
>> index 35c8f2b..28079a6 100644
>> --- a/drivers/acpi/processor_idle.c
>> +++ b/drivers/acpi/processor_idle.c
>> @@ -210,6 +210,7 @@ static void lapic_timer_state_broadcast(struct acpi_processor *pr,
>> #endif
>>
>> #ifdef CONFIG_PM_SLEEP
>> +#if (!ACPI_REDUCED_HARDWARE)
>
> Why don't you use #ifndef CONFIG_ACPI_REDUCED_HARDWARE here?
>
> And I believe we don't need acpi_processor_syscore_ops in that case at all?
>
> So why don't you put the whole section under
>
> #if (IS_ENABLED(CONFIG_PM_SLEEP) && !IS_ENABLED(CONFIG_ACPI_REDUCED_HARDWARE)) ?
My original thinking was that ACPI_REDUCED_HARDWARE is the flag
being used in the ACPICA code. On re-thinking it (and I'll use
your suggestion, if you don't mind), is it fair to say that there
is essentially a policy of keeping the Linux acpi driver and the
ACPICA code as separate as possible? If so -- and I would think
it makes sense -- then the ACPI_REDUCED_HARDWARE flag should not
be used here, as suggested.
Thanks.
>> static u32 saved_bm_rld;
>>
>> static int acpi_processor_suspend(void)
>> @@ -228,6 +229,11 @@ static void acpi_processor_resume(void)
>>
>> acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, saved_bm_rld);
>> }
>> +#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 /* (!ACPI_REDUCED_HARDWARE) */
>>
>> static struct syscore_ops acpi_processor_syscore_ops = {
>> .suspend = acpi_processor_suspend,
>
> I'm not sure why you think that the changes below belong to this patch?
It doesn't. My bad. I'll remove this.
>> @@ -605,7 +611,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 d8f9457..27ef69b 100644
>> --- a/include/acpi/acpixf.h
>> +++ b/include/acpi/acpixf.h
>> @@ -99,6 +99,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);}
>> @@ -109,6 +112,9 @@ extern u8 acpi_gbl_disable_ssdt_table_load;
>> #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
>> static ACPI_INLINE prototype {return;}
>>
>> +#define ACPI_HW_DEPENDENT_RETURN_INT(prototype) \
>> + static ACPI_INLINE prototype {return 0;}
>> +
>> #endif /* !ACPI_REDUCED_HARDWARE */
>>
>> /*
>>
--
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Linaro Enterprise Group
al.stone@linaro.org
-----------------------------------
next prev parent reply other threads:[~2013-11-20 21:11 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-10 1:36 [PATCH 00/12] Hardware Reduced Mode cleanup for ACPI al.stone
2013-11-10 1:36 ` [PATCH 01/12] ACPI: introduce CONFIG_ACPI_REDUCED_HARDWARE to enable this ACPI mode al.stone
2013-11-17 22:29 ` Rafael J. Wysocki
[not found] ` <CAGHbJ3ArVr+4g8UHyxFSL9Bu2ehsUAqsapGuxYLgfoR4NfT02w@mail.gmail.com>
2013-11-18 13:24 ` Rafael J. Wysocki
[not found] ` <CAGHbJ3DkXQ1-kQSdzXZ7=YSNhTstebGrdX4qXygBWmh2vYe0Bw@mail.gmail.com>
2013-11-18 13:37 ` Rafael J. Wysocki
2013-11-19 7:32 ` Hanjun Guo
2013-11-19 13:10 ` Rafael J. Wysocki
2013-11-20 1:30 ` Hanjun Guo
2013-11-22 6:14 ` Zheng, Lv
2013-11-22 9:56 ` Hanjun Guo
2013-11-25 7:43 ` Zheng, Lv
2013-11-25 8:14 ` Zheng, Lv
2013-11-27 9:02 ` Hanjun Guo
2013-11-10 1:36 ` [PATCH 02/12] ACPI: bus master reload not supported in reduced HW mode al.stone
2013-11-17 21:56 ` Rafael J. Wysocki
2013-11-20 21:11 ` Al Stone [this message]
2013-11-21 0:31 ` Rafael J. Wysocki
2013-11-10 1:36 ` [PATCH 03/12] ACPI: clean up compiler warning about uninitialized field al.stone
2013-11-17 21:58 ` Rafael J. Wysocki
2013-11-20 21:13 ` Al Stone
2013-11-10 1:36 ` [PATCH 04/12] ACPI: HW reduced mode does not allow use of the FADT sci_interrupt field al.stone
2013-11-17 22:06 ` Rafael J. Wysocki
2013-11-20 21:24 ` Al Stone
2013-11-21 0:27 ` Rafael J. Wysocki
2013-11-21 19:36 ` Al Stone
2013-11-21 21:36 ` Rafael J. Wysocki
2013-11-21 22:19 ` Al Stone
2013-11-10 1:36 ` [PATCH 05/12] ACPI: ARM: exclude calls on ARM platforms, not include them on x86 al.stone
2013-11-17 22:08 ` Rafael J. Wysocki
2013-11-20 21:25 ` Al Stone
2013-11-22 6:19 ` Zheng, Lv
2013-11-10 1:36 ` [PATCH 06/12] ACPI: ensure several FADT fields are only used in HW reduced mode al.stone
2013-11-22 6:05 ` Zheng, Lv
2013-11-22 6:26 ` Zheng, Lv
2013-11-10 1:36 ` [PATCH 07/12] ACPI: do not reserve memory regions for some FADT entries " al.stone
2013-11-17 22:15 ` Rafael J. Wysocki
2013-11-20 21:27 ` Al Stone
2013-11-10 1:36 ` [PATCH 08/12] ACPI: in HW reduced mode, getting power latencies from FADT is not allowed al.stone
2013-11-17 22:17 ` Rafael J. Wysocki
2013-11-20 21:48 ` Al Stone
2013-11-10 1:36 ` [PATCH 09/12] ACPI: add clarifying comment about processor throttling in HW reduced mode al.stone
2013-11-17 22:20 ` Rafael J. Wysocki
2013-11-20 21:54 ` Al Stone
2013-11-21 0:14 ` Rafael J. Wysocki
2013-11-21 23:11 ` Al Stone
2013-11-10 1:36 ` [PATCH 10/12] ACPI: ACPI_FADT_C2_MP_SUPPORTED must be ignored " al.stone
2013-11-17 22:24 ` Rafael J. Wysocki
2013-11-20 21:55 ` Al Stone
2013-11-10 1:36 ` [PATCH 11/12] ACPI: use of ACPI_FADT_32BIT_TIMER is not allowed " al.stone
2013-11-17 22:26 ` Rafael J. Wysocki
2013-11-20 22:15 ` Al Stone
2013-11-21 23:43 ` Al Stone
2013-11-22 12:08 ` Rafael J. Wysocki
2013-11-10 1:36 ` [PATCH 12/12] ACPI: correct #ifdef so compilation without ACPI_REDUCED_HARDWARE works al.stone
2013-11-17 22:28 ` Rafael J. Wysocki
2013-11-20 22:17 ` Al Stone
2013-11-17 21:47 ` [PATCH 00/12] Hardware Reduced Mode cleanup for ACPI Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=528D2586.7010503@linaro.org \
--to=al.stone@linaro.org \
--cc=ahs3@redhat.com \
--cc=linaro-acpi@lists.linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.